1 Build i386.rpm libgomp and libsupc++.a(guard.o) as i486+, pre-i486
2 hardware isn't supported because NPTL doesn't support it anyway.
4 --- libgomp/configure.tgt.jj 2008-01-10 20:53:48.000000000 +0100
5 +++ libgomp/configure.tgt 2008-03-27 12:44:51.000000000 +0100
6 @@ -44,14 +44,14 @@ if test $enable_linux_futex = yes; then
9 # Note that bare i386 is not included here. We need cmpxchg.
12 config_path="linux/x86 linux posix"
13 case " ${CC} ${CFLAGS} " in
17 if test -z "$with_arch"; then
18 - XCFLAGS="${XCFLAGS} -march=i486 -mtune=${target_cpu}"
19 + XCFLAGS="${XCFLAGS} -march=i486 -mtune=generic"
23 @@ -63,7 +63,7 @@ if test $enable_linux_futex = yes; then
24 config_path="linux/x86 linux posix"
25 case " ${CC} ${CFLAGS} " in
27 - XCFLAGS="${XCFLAGS} -march=i486 -mtune=i686"
28 + XCFLAGS="${XCFLAGS} -march=i486 -mtune=generic"
32 --- libstdc++-v3/libsupc++/guard.cc.jj 2008-03-01 00:58:24.000000000 +0100
33 +++ libstdc++-v3/libsupc++/guard.cc 2008-03-27 14:08:44.000000000 +0100
36 #include <ext/atomicity.h>
37 #include <ext/concurrence.h>
38 +#if defined __i386__ && !defined _GLIBCXX_ATOMIC_BUILTINS_4
39 +# define _GLIBCXX_ATOMIC_BUILTINS_4 1
40 +# define __sync_val_compare_and_swap(a, b, c) \
42 + typedef char sltast[sizeof (*a) == sizeof (int) ? 1 : -1]; \
44 + __asm __volatile ("lock; cmpxchgl %3, (%1)" \
46 + : "r" (a), "0" (b), "r" (c) : "memory"); \
49 +# define __sync_lock_test_and_set(a, b) \
51 + typedef char sltast[sizeof (*a) == sizeof (int) ? 1 : -1]; \
53 + __asm __volatile ("xchgl (%1), %0" \
55 + : "r" (a), "0" (b) : "memory"); \
59 #if defined(__GTHREADS) && defined(__GTHREAD_HAS_COND) \
60 && defined(_GLIBCXX_ATOMIC_BUILTINS_4) && defined(_GLIBCXX_HAVE_LINUX_FUTEX)