This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] PR target/70454: Check --with-arch=/--with-arch-32= for 32-bit x86 libgomp library


If --with-arch-32= is used to configure GCC, it should be used to
compile 32-bit x86 libgomp 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.
---
 libgomp/configure.tgt | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/libgomp/configure.tgt b/libgomp/configure.tgt
index 77e73f0..c99b620 100644
--- a/libgomp/configure.tgt
+++ b/libgomp/configure.tgt
@@ -79,14 +79,15 @@ if test x$enable_linux_futex = xyes; then
 	esac
 	;;
 
-    # Similar jiggery-pokery for x86_64 multilibs, except here we
-    # can't rely on the --with-arch configure option, since that
-    # applies to the 64-bit side.
     x86_64-*-linux*)
 	config_path="linux/x86 linux posix"
 	case " ${CC} ${CFLAGS} " in
 	  *" -m32 "*)
-	    XCFLAGS="${XCFLAGS} -march=i486 -mtune=generic"
+	    # 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"
+	    fi
 	    ;;
 	esac
 	;;
-- 
2.5.5


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]