diff options
Diffstat (limited to 'meta/recipes-devtools/gcc/gcc-4.3.3/fedora/gcc43-i386-libgomp.patch')
-rw-r--r-- | meta/recipes-devtools/gcc/gcc-4.3.3/fedora/gcc43-i386-libgomp.patch | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/meta/recipes-devtools/gcc/gcc-4.3.3/fedora/gcc43-i386-libgomp.patch b/meta/recipes-devtools/gcc/gcc-4.3.3/fedora/gcc43-i386-libgomp.patch new file mode 100644 index 0000000000..2ad3b24d89 --- /dev/null +++ b/meta/recipes-devtools/gcc/gcc-4.3.3/fedora/gcc43-i386-libgomp.patch | |||
@@ -0,0 +1,61 @@ | |||
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. | ||
3 | |||
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 | ||
7 | ;; | ||
8 | |||
9 | # Note that bare i386 is not included here. We need cmpxchg. | ||
10 | - i[456]86-*-linux*) | ||
11 | + i[3456]86-*-linux*) | ||
12 | config_path="linux/x86 linux posix" | ||
13 | case " ${CC} ${CFLAGS} " in | ||
14 | *" -m64 "*) | ||
15 | ;; | ||
16 | *) | ||
17 | if test -z "$with_arch"; then | ||
18 | - XCFLAGS="${XCFLAGS} -march=i486 -mtune=${target_cpu}" | ||
19 | + XCFLAGS="${XCFLAGS} -march=i486 -mtune=generic" | ||
20 | fi | ||
21 | esac | ||
22 | ;; | ||
23 | @@ -63,7 +63,7 @@ if test $enable_linux_futex = yes; then | ||
24 | config_path="linux/x86 linux posix" | ||
25 | case " ${CC} ${CFLAGS} " in | ||
26 | *" -m32 "*) | ||
27 | - XCFLAGS="${XCFLAGS} -march=i486 -mtune=i686" | ||
28 | + XCFLAGS="${XCFLAGS} -march=i486 -mtune=generic" | ||
29 | ;; | ||
30 | esac | ||
31 | ;; | ||
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 | ||
34 | @@ -35,6 +35,27 @@ | ||
35 | #include <new> | ||
36 | #include <ext/atomicity.h> | ||
37 | #include <ext/concurrence.h> | ||
38 | +#if defined __i386__ && !defined _GLIBCXX_ATOMIC_BUILTINS | ||
39 | +# define _GLIBCXX_ATOMIC_BUILTINS 1 | ||
40 | +# define __sync_val_compare_and_swap(a, b, c) \ | ||
41 | + ({ \ | ||
42 | + typedef char sltast[sizeof (*a) == sizeof (int) ? 1 : -1]; \ | ||
43 | + int sltas; \ | ||
44 | + __asm __volatile ("lock; cmpxchgl %3, (%1)" \ | ||
45 | + : "=a" (sltas) \ | ||
46 | + : "r" (a), "0" (b), "r" (c) : "memory"); \ | ||
47 | + sltas; \ | ||
48 | + }) | ||
49 | +# define __sync_lock_test_and_set(a, b) \ | ||
50 | + ({ \ | ||
51 | + typedef char sltast[sizeof (*a) == sizeof (int) ? 1 : -1]; \ | ||
52 | + int sltas; \ | ||
53 | + __asm __volatile ("xchgl (%1), %0" \ | ||
54 | + : "=r" (sltas) \ | ||
55 | + : "r" (a), "0" (b) : "memory"); \ | ||
56 | + sltas; \ | ||
57 | + }) | ||
58 | +#endif | ||
59 | #if defined(__GTHREADS) && defined(__GTHREAD_HAS_COND) \ | ||
60 | && defined(_GLIBCXX_ATOMIC_BUILTINS) && defined(_GLIBCXX_HAVE_LINUX_FUTEX) | ||
61 | # include <climits> | ||