This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH] PR target/70454: Check --with-arch=/--with-arch-32= for 32-bit x86 libitm library
- From: "H.J. Lu" <hongjiu dot lu at intel dot com>
- To: gcc-patches at gcc dot gnu dot org, ubizjak at gmail dot com
- Date: Wed, 30 Mar 2016 06:04:48 -0700
- Subject: [PATCH] PR target/70454: Check --with-arch=/--with-arch-32= for 32-bit x86 libitm library
- Authentication-results: sourceware.org; auth=none
- Reply-to: "H.J. Lu" <hjl dot tools at gmail dot com>
If --with-arch-32= is used to configure GCC, it should be used to
compile 32-bit x86 libitm library. Since --with-arch for 64-bit
> i486, we can use it for 32-bit target library.
Tested on x86-64, with and without --with-arch=. OK for stage 1?
H.J.
PR target/70454
* configure.tgt: Use --with-arch=/--with-arch-32= for 32-bit
x86 target library.
---
libitm/configure.tgt | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/libitm/configure.tgt b/libitm/configure.tgt
index e84382f..13e7cde 100644
--- a/libitm/configure.tgt
+++ b/libitm/configure.tgt
@@ -102,8 +102,12 @@ case "${target_cpu}" in
x86_64)
case " ${CC} ${CFLAGS} " in
*" -m32 "*)
- XCFLAGS="${XCFLAGS} -march=i486 -mtune=generic"
- XCFLAGS="${XCFLAGS} -fomit-frame-pointer"
+ # Since --with-arch for 64-bit > i486, we can use it for
+ # for 32-bit.
+ if test -z "$with_arch_32" && test -z "$with_arch"; then
+ XCFLAGS="${XCFLAGS} -march=i486 -mtune=generic"
+ XCFLAGS="${XCFLAGS} -fomit-frame-pointer"
+ fi
;;
esac
XCFLAGS="${XCFLAGS} -mrtm"
--
2.5.5