This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Don't build 32-bit libitm with -march=i486 on x86-64
- From: "H.J. Lu" <hjl dot tools at gmail dot com>
- To: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Cc: Uros Bizjak <ubizjak at gmail dot com>
- Date: Wed, 20 Apr 2016 07:44:12 -0700
- Subject: Re: [PATCH] Don't build 32-bit libitm with -march=i486 on x86-64
- Authentication-results: sourceware.org; auth=none
- References: <20160419150850 dot GA17799 at intel dot com>
On Tue, Apr 19, 2016 at 8:08 AM, H.J. Lu <hongjiu.lu@intel.com> wrote:
> 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 libitm 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 target library on x86-64.
Here is the updated patch. Tested on x86-64. OK for trunk?
--
H.J.
From 9c156365db19ba3326e98dccf1cd8cc19b1af2fb Mon Sep 17 00:00:00 2001
From: "H.J. Lu" <hjl.tools@gmail.com>
Date: Wed, 30 Mar 2016 05:57:48 -0700
Subject: [PATCH 3/3] Don't build 32-bit libitm with -march=i486 on x86-64
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 libitm on x86-64.
PR target/70454
* configure.tgt (XCFLAGS): Don't add -march=i486 to compile
32-bit target library on x86-64.
---
libitm/configure.tgt | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/libitm/configure.tgt b/libitm/configure.tgt
index e84382f..2a271ef 100644
--- a/libitm/configure.tgt
+++ b/libitm/configure.tgt
@@ -100,12 +100,8 @@ case "${target_cpu}" in
;;
x86_64)
- case " ${CC} ${CFLAGS} " in
- *" -m32 "*)
- XCFLAGS="${XCFLAGS} -march=i486 -mtune=generic"
- XCFLAGS="${XCFLAGS} -fomit-frame-pointer"
- ;;
- esac
+ # x86_64 compiler passes -march=x86_64 by default when building
+ # 32bit target libraries.
XCFLAGS="${XCFLAGS} -mrtm"
ARCH=x86
;;
--
2.5.5