diff options
author | rearnsha <rearnsha@138bc75d-0d04-0410-961f-82ee72b054a4> | 2017-10-20 12:33:39 +0000 |
---|---|---|
committer | rearnsha <rearnsha@138bc75d-0d04-0410-961f-82ee72b054a4> | 2017-10-20 12:33:39 +0000 |
commit | 3ebb1bac73fedb02994e61b48f1d7e4facf7e17c (patch) | |
tree | 46cfe6bcfdeb5f89d75190f67fa79507e9e0abb7 | |
parent | c4d42df2a3a74e837717f07c2ab1517ef64bfc0a (diff) | |
download | gcc-3ebb1bac73fedb02994e61b48f1d7e4facf7e17c.tar.gz |
[arm] Fix architecture selection when building libatomic with automatic FPU selection
Libatomic builds a few functions for Arm with an explicit -march
option. This option does not specify an FPU, which can lead to
problems when targeting a hard-float or softfp environment since the
architecture appears to be incompatible with the selected ABI.
The fix is simple enough, just add +fp (the minimum floating point
option) to the architecture. We don't use anything from the FP
architecture, so it shouldn't really change anything; and if we are
building for -mfloat-abi=soft the canonicalization process will remove
the unnecessary fp attributes anyway.
* Makefile.am: (IFUNC_OPTIONS): Set the architecture to
-march=armv7-a+fp on Linux/Arm.
* Makefile.in: Regenerated.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@253935 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | libatomic/ChangeLog | 6 | ||||
-rw-r--r-- | libatomic/Makefile.am | 2 | ||||
-rw-r--r-- | libatomic/Makefile.in | 2 |
3 files changed, 8 insertions, 2 deletions
diff --git a/libatomic/ChangeLog b/libatomic/ChangeLog index 835ea6c5093..eed12e63a68 100644 --- a/libatomic/ChangeLog +++ b/libatomic/ChangeLog @@ -1,3 +1,9 @@ +2017-10-20 Richard Earnshaw <rearnsha@arm.com> + + * Makefile.am: (IFUNC_OPTIONS): Set the architecture to + -march=armv7-a+fp on Linux/Arm. + * Makefile.in: Regenerated. + 2017-10-02 Martin Sebor <msebor@redhat.com> PR c/81854 diff --git a/libatomic/Makefile.am b/libatomic/Makefile.am index d731406fdbd..9c457008232 100644 --- a/libatomic/Makefile.am +++ b/libatomic/Makefile.am @@ -123,7 +123,7 @@ libatomic_la_LIBADD = $(foreach s,$(SIZES),$(addsuffix _$(s)_.lo,$(SIZEOBJS))) ## On a target-specific basis, include alternates to be selected by IFUNC. if HAVE_IFUNC if ARCH_ARM_LINUX -IFUNC_OPTIONS = -march=armv7-a -DHAVE_KERNEL64 +IFUNC_OPTIONS = -march=armv7-a+fp -DHAVE_KERNEL64 libatomic_la_LIBADD += $(foreach s,$(SIZES),$(addsuffix _$(s)_1_.lo,$(SIZEOBJS))) libatomic_la_LIBADD += $(addsuffix _8_2_.lo,$(SIZEOBJS)) endif diff --git a/libatomic/Makefile.in b/libatomic/Makefile.in index f6eeab312ea..0f0382e0713 100644 --- a/libatomic/Makefile.in +++ b/libatomic/Makefile.in @@ -346,7 +346,7 @@ M_SRC = $(firstword $(filter %/$(M_FILE), $(all_c_files))) libatomic_la_LIBADD = $(foreach s,$(SIZES),$(addsuffix \ _$(s)_.lo,$(SIZEOBJS))) $(am__append_1) $(am__append_2) \ $(am__append_3) -@ARCH_ARM_LINUX_TRUE@@HAVE_IFUNC_TRUE@IFUNC_OPTIONS = -march=armv7-a -DHAVE_KERNEL64 +@ARCH_ARM_LINUX_TRUE@@HAVE_IFUNC_TRUE@IFUNC_OPTIONS = -march=armv7-a+fp -DHAVE_KERNEL64 @ARCH_I386_TRUE@@HAVE_IFUNC_TRUE@IFUNC_OPTIONS = -march=i586 @ARCH_X86_64_TRUE@@HAVE_IFUNC_TRUE@IFUNC_OPTIONS = -mcx16 libatomic_convenience_la_SOURCES = $(libatomic_la_SOURCES) |