This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH] Don't build 32-bit libatomic with -march=i486 on x86-64
- From: "H.J. Lu" <hongjiu dot lu at intel dot com>
- To: gcc-patches at gcc dot gnu dot org
- Cc: Uros Bizjak <ubizjak at gmail dot com>
- Date: Tue, 19 Apr 2016 08:07:35 -0700
- Subject: [PATCH] Don't build 32-bit libatomic with -march=i486 on x86-64
- Authentication-results: sourceware.org; auth=none
- Reply-to: "H.J. Lu" <hjl dot tools at gmail dot com>
Gcc uses the same -march= for both -m32 and -m64 on x86-64 unless
--with-arch-32= is used. There is no need for -march=i486 to compile
32-bit libatomic on x86-64.
Tested on x86-64. OK for trunk?
H.J.
---
PR target/70454
* configure.tgt (XCFLAGS): Don't add -march=i486 to compile
32-bit x86 target library on x86-64.
---
libatomic/configure.tgt | 10 ++--------
1 file changed, 2 insertions(+), 8 deletions(-)
diff --git a/libatomic/configure.tgt b/libatomic/configure.tgt
index c5470d7..bbb93fc 100644
--- a/libatomic/configure.tgt
+++ b/libatomic/configure.tgt
@@ -81,14 +81,8 @@ case "${target_cpu}" in
try_ifunc=yes
;;
x86_64)
- case " ${CC} ${CFLAGS} " in
- *" -m32 "*)
- XCFLAGS="${XCFLAGS} -march=i486 -mtune=generic"
- XCFLAGS="${XCFLAGS} -fomit-frame-pointer"
- ;;
- *)
- ;;
- esac
+ # Since 64-bit arch > i486, we can use the same -march= to build
+ # both 32-bit and 64-bit target libraries.
ARCH=x86
# ??? Detect when -mcx16 is already enabled.
try_ifunc=yes
--
2.5.5