From e6a3149428ef2d42d9a9df78a19c2e52496f3deb Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Fri, 22 May 2009 09:42:20 +0100 Subject: gcc: Add 4.3.3 and switch to for Moblin Signed-off-by: Richard Purdie --- .../gcc/gcc-4.3.3/fedora/gcc43-i386-libgomp.patch | 61 ++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 meta/packages/gcc/gcc-4.3.3/fedora/gcc43-i386-libgomp.patch (limited to 'meta/packages/gcc/gcc-4.3.3/fedora/gcc43-i386-libgomp.patch') diff --git a/meta/packages/gcc/gcc-4.3.3/fedora/gcc43-i386-libgomp.patch b/meta/packages/gcc/gcc-4.3.3/fedora/gcc43-i386-libgomp.patch new file mode 100644 index 000000000..2ad3b24d8 --- /dev/null +++ b/meta/packages/gcc/gcc-4.3.3/fedora/gcc43-i386-libgomp.patch @@ -0,0 +1,61 @@ +Build i386.rpm libgomp and libsupc++.a(guard.o) as i486+, pre-i486 +hardware isn't supported because NPTL doesn't support it anyway. + +--- libgomp/configure.tgt.jj 2008-01-10 20:53:48.000000000 +0100 ++++ libgomp/configure.tgt 2008-03-27 12:44:51.000000000 +0100 +@@ -44,14 +44,14 @@ if test $enable_linux_futex = yes; then + ;; + + # Note that bare i386 is not included here. We need cmpxchg. +- i[456]86-*-linux*) ++ i[3456]86-*-linux*) + config_path="linux/x86 linux posix" + case " ${CC} ${CFLAGS} " in + *" -m64 "*) + ;; + *) + if test -z "$with_arch"; then +- XCFLAGS="${XCFLAGS} -march=i486 -mtune=${target_cpu}" ++ XCFLAGS="${XCFLAGS} -march=i486 -mtune=generic" + fi + esac + ;; +@@ -63,7 +63,7 @@ if test $enable_linux_futex = yes; then + config_path="linux/x86 linux posix" + case " ${CC} ${CFLAGS} " in + *" -m32 "*) +- XCFLAGS="${XCFLAGS} -march=i486 -mtune=i686" ++ XCFLAGS="${XCFLAGS} -march=i486 -mtune=generic" + ;; + esac + ;; +--- libstdc++-v3/libsupc++/guard.cc.jj 2008-03-01 00:58:24.000000000 +0100 ++++ libstdc++-v3/libsupc++/guard.cc 2008-03-27 14:08:44.000000000 +0100 +@@ -35,6 +35,27 @@ + #include + #include + #include ++#if defined __i386__ && !defined _GLIBCXX_ATOMIC_BUILTINS ++# define _GLIBCXX_ATOMIC_BUILTINS 1 ++# define __sync_val_compare_and_swap(a, b, c) \ ++ ({ \ ++ typedef char sltast[sizeof (*a) == sizeof (int) ? 1 : -1]; \ ++ int sltas; \ ++ __asm __volatile ("lock; cmpxchgl %3, (%1)" \ ++ : "=a" (sltas) \ ++ : "r" (a), "0" (b), "r" (c) : "memory"); \ ++ sltas; \ ++ }) ++# define __sync_lock_test_and_set(a, b) \ ++ ({ \ ++ typedef char sltast[sizeof (*a) == sizeof (int) ? 1 : -1]; \ ++ int sltas; \ ++ __asm __volatile ("xchgl (%1), %0" \ ++ : "=r" (sltas) \ ++ : "r" (a), "0" (b) : "memory"); \ ++ sltas; \ ++ }) ++#endif + #if defined(__GTHREADS) && defined(__GTHREAD_HAS_COND) \ + && defined(_GLIBCXX_ATOMIC_BUILTINS) && defined(_GLIBCXX_HAVE_LINUX_FUTEX) + # include -- cgit v1.2.3