small patch to fix cross compiling on sh
authorMike Frysinger <vapier@gentoo.org>
Thu, 9 Dec 2004 05:57:03 +0000 (05:57 +0000)
committerMike Frysinger <vapier@gentoo.org>
Thu, 9 Dec 2004 05:57:03 +0000 (05:57 +0000)
sys-devel/gcc/files/3.4.3/gcc-3.4.3-cross-compile.patch [new file with mode: 0644]
sys-devel/gcc/gcc-3.4.3-r1.ebuild

diff --git a/sys-devel/gcc/files/3.4.3/gcc-3.4.3-cross-compile.patch b/sys-devel/gcc/files/3.4.3/gcc-3.4.3-cross-compile.patch
new file mode 100644 (file)
index 0000000..ad4c128
--- /dev/null
@@ -0,0 +1,18 @@
+--- gcc/config/sh/linux.h.orig 2004-12-08 23:59:43.001668912 -0500
++++ gcc/config/sh/linux.h      2004-12-09 00:00:22.244703064 -0500
+@@ -154,6 +154,7 @@
+ /* Do code reading to identify a signal frame, and set the frame
+    state data appropriately.  See unwind-dw2.c for the structs.  */
+ 
++#ifndef inhibit_libc
+ #ifdef IN_LIBGCC2
+ #include <signal.h>
+ #include <sys/ucontext.h>
+@@ -304,6 +305,7 @@
+ 
+ #endif /* defined (__SH5__) */
+ #endif /* IN_LIBGCC2 */
++#endif /* inhibit libc */
+ 
+ /* For SH3 and SH4, we use a slot of the unwind frame which correspond
+    to a fake register number 16 as a placeholder for the return address
index a8da5b3405fa625795414659df9e3921a0db6582..bb5795357ec23d77352fc8c5c67fd6294ac0403e 100644 (file)
@@ -1,6 +1,6 @@
 # Copyright 1999-2004 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-devel/gcc/gcc-3.4.3-r1.ebuild,v 1.7 2004/12/05 17:19:04 lv Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-devel/gcc/gcc-3.4.3-r1.ebuild,v 1.8 2004/12/09 05:57:03 vapier Exp $
 
 DESCRIPTION="The GNU Compiler Collection.  Includes C/C++, java compilers, pie+ssp extensions, Haj Ten Brugge runtime bounds checking"
 
@@ -180,6 +180,9 @@ src_unpack() {
        epatch ${FILESDIR}/3.4.2/gcc34-m32-no-sse2.patch
        epatch ${FILESDIR}/3.4.2/gcc34-fix-sse2_pinsrw.patch
 
+       # Fix cross-compiling
+       epatch ${FILESDIR}/3.4.3/gcc-3.4.3-cross-compile.patch
+
        if use amd64 && use multilib ; then
                # this should hack around the GCC_NO_EXECUTABLES bug
                epatch ${FILESDIR}/3.4.1/gcc-3.4.1-glibc-is-native.patch