Go to file
Joseph Myers e610393ca7 Make soft-fp symbols into compat symbols for powerpc*-*-linux*.
Continuing preparations for implementing
TARGET_ATOMIC_ASSIGN_EXPAND_FENV for powerpc*-*-linux* soft-float and
e500, this patch makes soft-fp symbols used for those targets into
compat symbols when building with glibc >= 2.19, so that they are only
in shared libgcc for existing binaries requiring them, not in static
libgcc and not available for new links using shared libgcc.  Instead,
new links will get the symbols from libc, which has exported all of
them since 2.19.  (Actually all the symbols were exported from glibc
since 2.4, but some of them were exported by glibc as compat symbols
only - because of a confusion between deliberately present soft-fp
symbols and old accidental reexports of libgcc functions from glibc
2.0 - until 2.19.)

This allows user floating-point arithmetic to interoperate properly
with the state handled by <fenv.h> functions, whether software state
(for soft-float; TLS variables that don't form a public part of
glibc's ABI, so can only be accessed directly by functions within
glibc) or hardware state (for e500 - the copies of the soft-fp
functions in glibc being built to interoperate with the hardware state
whereas those in libgcc aren't).  Previously only glibc's own
functions, and those operations done in hardware on e500, properly
worked with that state, not direct floating-point arithmetic
operations that were implemented in software.

The intended next step is the actual TARGET_ATOMIC_ASSIGN_EXPAND_FENV
implementation.

The test of glibc >= 2.19 uses the same --with-glibc-version configure
option as in the gcc/ directory (but differently implemented; in gcc/
the fallback is to examine headers to find the version, while in
libgcc/ we can use compile for the target and so use AC_COMPUTE_INT).
The TARGET_ATOMIC_ASSIGN_EXPAND_FENV implementation will also only do
anything for glibc >= 2.19, as it will depend on generating calls to
functions __atomic_feholdexcept __atomic_feclearexcept
__atomic_feupdateenv that were added in 2.19 for that purpose (even
for e500, inline code is not readily possible because of the need to
make prctl syscalls from the implementation of these functions).

In order to make symbols compat symbols, the soft-fp files need
wrapping with generated wrappers including asm .symver directives,
which need to name the symbol version in question.  This is extracted
by an awk script from an intermediate stage of generating the .map
file for linking libgcc (that .map itself depends on the objects that
go into the library, so can't be used for this purpose as that would
mean a circular dependency); the extraction is not fully general
regarding the features available in .map generation, but suffices for
the present purpose.

It would make sense for hardfp.c symbols to be compat symbols as well
(in the cases where hardfp.c gets used, the functions in question
should not be used for new links), but this isn't required for the
present purpose, which is only concerned with ensuring that where
functions that should be affected by rounding modes or exceptions get
used, those functions are actually affected by those rounding modes or
exceptions.

Tested with no regressions with cross to powerpc-linux-gnu
(soft-float); c11-atomic-exec-5.c moves from UNSUPPORTED to FAIL, as
expected, now that floating-point arithmetic in user programs uses the
same state as <fenv.h> functions, so the fenv_exceptions test passes,
but TARGET_ATOMIC_ASSIGN_EXPAND_FENV isn't yet implemented.  (For
e500, c11-atomic-exec-5.c was already FAILing, as enough operations
worked with the hardware state for the fenv_exceptions effective
target test to pass.)  Also verified that the exported symbols and
versions are unchanged, with the expected symbols becoming compat
symbols at the same versions, and that with --with-glibc-version=2.18
the symbols remain normal rather than compat symbols.

	* Makefile.in (libgcc.map.in): New target.
	(libgcc.map): Use libgcc.map.in.
	* config/t-softfp (softfp_compat): New variable to be set by
	users.
	[$(softfp_compat) = y] (softfp_map_dep, softfp_set_symver): New
	variables.
	[$(softfp_compat) = y] (softfp_file_list): Use files in the build
	directory.
	[$(softfp_compat) = y] ($(softfp_file_list)): Generate wrappers
	that use compat symbols and disable all code unless [SHARED].
	* config/t-softfp-compat: New file.
	* find-symver.awk: New file.
	* configure.ac (--with-glibc-version): New configure option.
	(ppc_fp_compat): New variable set for powerpc*-*-linux*.
	* configure: Regenerate.
	* config.host (powerpc*-*-linux*): Use ${ppc_fp_compat} for
	soft-float and e500.

From-SVN: r216942
2014-10-30 17:28:30 +00:00
INSTALL README: Do not mention CVS. 2014-10-12 15:05:28 +00:00
boehm-gc Fix gnu11 fallout on SPARC 2014-10-23 08:39:19 +00:00
config Let GDB reuse GCC's parser. 2014-10-27 17:21:42 +00:00
contrib remove score-* support 2014-10-04 14:53:41 +00:00
fixincludes inclhack.def (glibc_c99_inline_4): Add pthread.h to files. 2014-10-21 12:58:26 +02:00
gcc c-objc-common.c (c_tree_printer): For a typedef name, print the stripped version as well, if they're not the same. 2014-10-30 17:22:12 +00:00
gnattools Makefile.in (TOOLS_FLAGS_TO_PASS_CROSS): Robustify. 2014-02-23 16:30:11 +00:00
include longlong.h: Disable alpha umul_ppmm for old g++ 2014-10-28 13:22:40 -07:00
intl Fix unportable shell quoting. 2010-09-27 20:19:41 +00:00
libada Makefile.in: Add CFLAGS_FOR_TARGET to GNATLIBCFLAGS_FOR_C. 2014-08-12 19:47:09 +00:00
libatomic configure.tgt: Add cygwin to supported targets. 2014-08-19 16:55:37 +02:00
libbacktrace internal.h (backtrace_atomic_load_pointer): Fix to return void *. 2014-10-23 22:40:37 +00:00
libcc1 configure.ac: Remove -Werror addition to WARN_FLAGS. 2014-10-29 12:38:00 +01:00
libcilkrts configure.ac: Move pthread affinity test to the place where '-pthread' passed to CFLAGS. 2014-08-12 11:06:44 +00:00
libcpp gengtype.h (obstack_chunk_alloc, [...]): Remove cast. 2014-10-22 12:11:31 +10:30
libdecnumber re PR c/59871 (No unused value warning for comma expression) 2014-01-23 19:04:29 +00:00
libffi configure.ac: If the compiler supports -Qunused-arguments... 2014-10-15 15:32:41 +00:00
libgcc Make soft-fp symbols into compat symbols for powerpc*-*-linux*. 2014-10-30 17:28:30 +00:00
libgfortran PR 63589 Fix splitting of PATH in find_addr2line. 2014-10-20 10:53:37 +03:00
libgo debug/elf: add power64 support along with relocation test 2014-10-28 22:57:35 +00:00
libgomp affinity-1.c: Include <sys/wait.h>. 2014-10-06 11:54:24 +00:00
libiberty Add strtoll and strtoull to libiberty. 2014-10-28 09:43:20 +00:00
libitm memcpy-1.c: Declare getpagesize. 2014-10-06 12:35:06 +00:00
libjava libffi.exp (load_gcc_lib): Register loaded libs. 2014-05-20 08:20:06 +00:00
libobjc re PR libobjc/61920 (libobjc has undefined symbols on powerpc*-linux-gnu) 2014-07-27 13:15:17 +00:00
libquadmath re PR libquadmath/55821 (Release tarballs (unconditionally) install libquadmath.info when libquadmath is not supported) 2014-10-21 08:59:17 +00:00
libsanitizer IPA ICF fallout: fox for libasan and pr43077-1.c 2014-10-16 16:56:21 +00:00
libssp * ssp.c (fail): Avoid -Wformat-security warning. 2013-12-07 09:10:02 +01:00
libstdc++-v3 configure.host (aix5+): New stanza. 2014-10-30 10:20:50 -04:00
libvtv Fix up ChangeLog entries (name, e-mail, formatting, otherwise). 2013-10-23 21:30:54 +00:00
lto-plugin Properly set gcc_build_dir for in-tree build 2014-08-26 07:47:15 -07:00
maintainer-scripts Add svn:executable property for generate_libstdcxx_web_docs. 2014-10-30 11:11:38 +01:00
zlib Add --enable-host-shared configuration option 2013-10-15 20:33:55 +00:00
.dir-locals.el * .dir-locals.el: Add. 2013-10-16 18:25:31 +00:00
.gitignore Ignore gcc_update output 2014-06-18 17:47:18 -07:00
ABOUT-NLS
COPYING
COPYING.LIB
COPYING.RUNTIME Licensing changes to GPLv3 resp. GPLv3 with GCC Runtime Exception. 2009-04-09 17:00:19 +02:00
COPYING3
COPYING3.LIB
ChangeLog Build a shared host libiberty also for libcc1's benefit. 2014-10-30 11:06:37 +01:00
ChangeLog.tree-ssa
MAINTAINERS MAINTAINERS: Change my email address. 2014-10-29 09:14:53 +00:00
Makefile.def Let GDB reuse GCC's parser. 2014-10-27 17:21:42 +00:00
Makefile.in Let GDB reuse GCC's parser. 2014-10-27 17:21:42 +00:00
Makefile.tpl Support slim LTO bootstrap 2014-09-01 16:41:28 +00:00
README * README: Document use of ranges of years in copyright notices. 2012-07-16 15:01:34 +01:00
compile Update automake-provided files in the toplevel. 2009-08-22 11:47:16 +00:00
config-ml.in * config-ml.in: Robustify ac_configure_args parsing. 2014-06-13 16:32:29 +02:00
config.guess * config.sub, config.guess: Import from upstream. 2014-05-01 20:51:11 +00:00
config.rpath Remove freebsd1 from libtool.m4 macros and config.rpath. 2011-02-13 11:45:53 +00:00
config.sub Import config.sub from upstream. No changes to config.guess. 2014-07-28 17:53:25 +00:00
configure Build a shared host libiberty also for libcc1's benefit. 2014-10-30 11:06:37 +01:00
configure.ac Build a shared host libiberty also for libcc1's benefit. 2014-10-30 11:06:37 +01:00
depcomp Update automake-provided files in the toplevel. 2009-08-22 11:47:16 +00:00
install-sh Update automake-provided files in the toplevel. 2009-08-22 11:47:16 +00:00
libtool-ldflags re PR sanitizer/56781 (boostrap-asan failure: fixincl fails to link (missing -lasan)) 2014-04-17 14:23:28 +02:00
libtool.m4 libtool.m4 (_LT_ENABLE_LOCK <ld -m flags>): Remove non-canonical ppc host match. 2013-09-20 19:17:52 +09:30
ltgcc.m4 libtool.m4: Update to libtool 2.2.6. 2008-09-26 16:21:02 +00:00
ltmain.sh Ensure libgcc_s unwinder is always used on 64-bit Solaris 10+/x86 (PR target/59788) 2014-02-04 09:31:38 +00:00
ltoptions.m4 Sync from git Libtool and regenerate. 2009-12-05 17:18:53 +00:00
ltsugar.m4 libtool.m4: Update to libtool 2.2.6. 2008-09-26 16:21:02 +00:00
ltversion.m4 Sync from git Libtool and regenerate. 2009-12-05 17:18:53 +00:00
lt~obsolete.m4 Sync from git Libtool and regenerate. 2009-12-05 17:18:53 +00:00
missing Update automake-provided files in the toplevel. 2009-08-22 11:47:16 +00:00
mkdep
mkinstalldirs Update automake-provided files in the toplevel. 2009-08-22 11:47:16 +00:00
move-if-change Import move-if-change script from gnulib. 2011-02-12 15:48:30 +00:00
symlink-tree
ylwrap Update automake-provided files in the toplevel. 2009-08-22 11:47:16 +00:00

README

This directory contains the GNU Compiler Collection (GCC).

The GNU Compiler Collection is free software.  See the files whose
names start with COPYING for copying permission.  The manuals, and
some of the runtime libraries, are under different terms; see the
individual source files for details.

The directory INSTALL contains copies of the installation information
as HTML and plain text.  The source of this information is
gcc/doc/install.texi.  The installation information includes details
of what is included in the GCC sources and what files GCC installs.

See the file gcc/doc/gcc.texi (together with other files that it
includes) for usage and porting information.  An online readable
version of the manual is in the files gcc/doc/gcc.info*.

See http://gcc.gnu.org/bugs/ for how to report bugs usefully.

Copyright years on GCC source files may be listed using range
notation, e.g., 1987-2012, indicating that every year in the range,
inclusive, is a copyrightable year that could otherwise be listed
individually.