|
|
dc1507 |
Build i386.rpm libgomp and libsupc++.a(guard.o) as i486+, pre-i486
|
|
|
dc1507 |
hardware isn't supported because NPTL doesn't support it anyway.
|
|
|
dc1507 |
|
|
|
dc1507 |
--- libgomp/configure.tgt.jj 2008-01-10 20:53:48.000000000 +0100
|
|
|
dc1507 |
+++ libgomp/configure.tgt 2008-03-27 12:44:51.000000000 +0100
|
|
|
dc1507 |
@@ -44,14 +44,14 @@ if test $enable_linux_futex = yes; then
|
|
|
dc1507 |
;;
|
|
|
dc1507 |
|
|
|
dc1507 |
# Note that bare i386 is not included here. We need cmpxchg.
|
|
|
dc1507 |
- i[456]86-*-linux*)
|
|
|
dc1507 |
+ i[3456]86-*-linux*)
|
|
|
dc1507 |
config_path="linux/x86 linux posix"
|
|
|
dc1507 |
case " ${CC} ${CFLAGS} " in
|
|
|
dc1507 |
*" -m64 "*)
|
|
|
dc1507 |
;;
|
|
|
dc1507 |
*)
|
|
|
dc1507 |
if test -z "$with_arch"; then
|
|
|
dc1507 |
- XCFLAGS="${XCFLAGS} -march=i486 -mtune=${target_cpu}"
|
|
|
dc1507 |
+ XCFLAGS="${XCFLAGS} -march=i486 -mtune=generic"
|
|
|
dc1507 |
fi
|
|
|
dc1507 |
esac
|
|
|
dc1507 |
;;
|
|
|
dc1507 |
@@ -63,7 +63,7 @@ if test $enable_linux_futex = yes; then
|
|
|
dc1507 |
config_path="linux/x86 linux posix"
|
|
|
dc1507 |
case " ${CC} ${CFLAGS} " in
|
|
|
dc1507 |
*" -m32 "*)
|
|
|
dc1507 |
- XCFLAGS="${XCFLAGS} -march=i486 -mtune=i686"
|
|
|
dc1507 |
+ XCFLAGS="${XCFLAGS} -march=i486 -mtune=generic"
|
|
|
dc1507 |
;;
|
|
|
dc1507 |
esac
|
|
|
dc1507 |
;;
|
|
|
dc1507 |
--- libstdc++-v3/libsupc++/guard.cc.jj 2008-03-01 00:58:24.000000000 +0100
|
|
|
dc1507 |
+++ libstdc++-v3/libsupc++/guard.cc 2008-03-27 14:08:44.000000000 +0100
|
|
|
dc1507 |
@@ -35,6 +35,27 @@
|
|
|
dc1507 |
#include <new>
|
|
|
dc1507 |
#include <ext/atomicity.h>
|
|
|
dc1507 |
#include <ext/concurrence.h>
|
|
|
dc1507 |
+#if defined __i386__ && !defined _GLIBCXX_ATOMIC_BUILTINS_4
|
|
|
dc1507 |
+# define _GLIBCXX_ATOMIC_BUILTINS_4 1
|
|
|
dc1507 |
+# define __sync_val_compare_and_swap(a, b, c) \
|
|
|
dc1507 |
+ ({ \
|
|
|
dc1507 |
+ typedef char sltast[sizeof (*a) == sizeof (int) ? 1 : -1]; \
|
|
|
dc1507 |
+ int sltas; \
|
|
|
dc1507 |
+ __asm __volatile ("lock; cmpxchgl %3, (%1)" \
|
|
|
dc1507 |
+ : "=a" (sltas) \
|
|
|
dc1507 |
+ : "r" (a), "0" (b), "r" (c) : "memory"); \
|
|
|
dc1507 |
+ sltas; \
|
|
|
dc1507 |
+ })
|
|
|
dc1507 |
+# define __sync_lock_test_and_set(a, b) \
|
|
|
dc1507 |
+ ({ \
|
|
|
dc1507 |
+ typedef char sltast[sizeof (*a) == sizeof (int) ? 1 : -1]; \
|
|
|
dc1507 |
+ int sltas; \
|
|
|
dc1507 |
+ __asm __volatile ("xchgl (%1), %0" \
|
|
|
dc1507 |
+ : "=r" (sltas) \
|
|
|
dc1507 |
+ : "r" (a), "0" (b) : "memory"); \
|
|
|
dc1507 |
+ sltas; \
|
|
|
dc1507 |
+ })
|
|
|
dc1507 |
+#endif
|
|
|
dc1507 |
#if defined(__GTHREADS) && defined(__GTHREAD_HAS_COND) \
|
|
|
dc1507 |
&& defined(_GLIBCXX_ATOMIC_BUILTINS_4) && defined(_GLIBCXX_HAVE_LINUX_FUTEX)
|
|
|
dc1507 |
# include <climits>
|