aboutsummaryrefslogtreecommitdiff
path: root/libgomp
diff options
context:
space:
mode:
Diffstat (limited to 'libgomp')
-rw-r--r--libgomp/configure.tgt35
1 files changed, 15 insertions, 20 deletions
diff --git a/libgomp/configure.tgt b/libgomp/configure.tgt
index 1863287f..be06be0 100644
--- a/libgomp/configure.tgt
+++ b/libgomp/configure.tgt
@@ -73,28 +73,23 @@ if test x$enable_linux_futex = xyes; then
;;
# Note that bare i386 is not included here. We need cmpxchg.
- i[456]86-*-linux*)
+ i[456]86-*-linux* | x86_64-*-linux*)
config_path="linux/x86 linux posix"
- case " ${CC} ${CFLAGS} " in
- *" -m64 "*|*" -mx32 "*)
- ;;
- *)
- if test -z "$with_arch"; then
- XCFLAGS="${XCFLAGS} -march=i486 -mtune=${target_cpu}"
- fi
- 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 "*)
+ cat > conftestx.c <<EOF
+#ifndef __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4
+#error need -march=i486
+#endif
+EOF
+ if ${CC} ${CFLAGS} -E conftestx.c > /dev/null 2>&1; then
+ :
+ else
+ if test "${target_cpu}" = x86_64; then
XCFLAGS="${XCFLAGS} -march=i486 -mtune=generic"
- ;;
- esac
+ else
+ XCFLAGS="${XCFLAGS} -march=i486 -mtune=${target_cpu}"
+ fi
+ fi
+ rm -f conftestx.c
;;
# Note that sparcv7 and sparcv8 is not included here. We need cas.