diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2018-12-24 15:36:46 +0000 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2018-12-24 15:36:46 +0000 |
commit | 2a15bb4c21792825ebc98028bbcfff4bb76230eb (patch) | |
tree | 78d658bfc8a6fa5463435afbe598bd3847a26be0 /sys-devel/gcc/files/4.1.0 | |
parent | 7e363b923a5933e24521c24eafc75492fa4f5826 (diff) |
import the toolchain from gentoo tree, increase revisions so they cannot beat us
Diffstat (limited to 'sys-devel/gcc/files/4.1.0')
-rw-r--r-- | sys-devel/gcc/files/4.1.0/gcc-4.1.0-cross-compile.patch | 40 | ||||
-rw-r--r-- | sys-devel/gcc/files/4.1.0/gcc-4.1.0-fast-math-i386-Os-workaround.patch | 64 |
2 files changed, 104 insertions, 0 deletions
diff --git a/sys-devel/gcc/files/4.1.0/gcc-4.1.0-cross-compile.patch b/sys-devel/gcc/files/4.1.0/gcc-4.1.0-cross-compile.patch new file mode 100644 index 00000000..523caa48 --- /dev/null +++ b/sys-devel/gcc/files/4.1.0/gcc-4.1.0-cross-compile.patch @@ -0,0 +1,40 @@ +Some notes on the 'bootstrap with or without libc headers' debate: +http://linuxfromscratch.org/pipermail/lfs-dev/2005-July/052409.html +http://gcc.gnu.org/ml/gcc/2005-07/msg01195.html + +--- gcc/unwind-dw2.c ++++ gcc/unwind-dw2.c +@@ -253,9 +253,11 @@ + } + #endif + ++#ifndef inhibit_libc + #ifdef MD_UNWIND_SUPPORT + #include MD_UNWIND_SUPPORT + #endif ++#endif + + /* Extract any interesting information from the CIE for the translation + unit F belongs to. Return a pointer to the byte after the augmentation, +--- gcc/configure ++++ gcc/configure +@@ -12857,7 +12857,7 @@ then + | powerpc*-*-*,powerpc64*-*-*) + CROSS="$CROSS -DNATIVE_CROSS" ;; + esac +-elif test "x$TARGET_SYSTEM_ROOT" != x; then ++elif test "x$TARGET_SYSTEM_ROOT" != x -o $build != $host; then + SYSTEM_HEADER_DIR=$build_system_header_dir + fi + +--- gcc/configure.ac ++++ gcc/configure.ac +@@ -1717,7 +1717,7 @@ then + | powerpc*-*-*,powerpc64*-*-*) + CROSS="$CROSS -DNATIVE_CROSS" ;; + esac +-elif test "x$TARGET_SYSTEM_ROOT" != x; then ++elif test "x$TARGET_SYSTEM_ROOT" != x -o $build != $host; then + SYSTEM_HEADER_DIR=$build_system_header_dir + fi + diff --git a/sys-devel/gcc/files/4.1.0/gcc-4.1.0-fast-math-i386-Os-workaround.patch b/sys-devel/gcc/files/4.1.0/gcc-4.1.0-fast-math-i386-Os-workaround.patch new file mode 100644 index 00000000..6090d66d --- /dev/null +++ b/sys-devel/gcc/files/4.1.0/gcc-4.1.0-fast-math-i386-Os-workaround.patch @@ -0,0 +1,64 @@ +workaround for lame stack packing on i386 ... + + - build gcc with -Os (crtfastmath.o to be specific) + - crtfastmath.o is installed into gcc libdir + - run gcc with -ffast-math and get crtfastmath.o linked in + - resulting compiled app segfaults due to init code in + crtfastmath.o that has mis-aligned structure on stack + +http://bugs.gentoo.org/147020 +http://gcc.gnu.org/PR28621 + +this is supposed to be fixed in current 4.1 branch, but i'm unable to get +the fix to work so until i can figure out what i'm doing wrong, we'll use +this workaround for now. + +--- gcc-4.1.1/gcc/config/i386/crtfastmath.c ++++ gcc-4.1.1/gcc/config/i386/crtfastmath.c +@@ -37,6 +37,23 @@ + #define FXSAVE (1 << 24) + #define SSE (1 << 25) + ++struct ++{ ++ unsigned short int cwd; ++ unsigned short int swd; ++ unsigned short int twd; ++ unsigned short int fop; ++ long int fip; ++ long int fcs; ++ long int foo; ++ long int fos; ++ long int mxcsr; ++ long int mxcsr_mask; ++ long int st_space[32]; ++ long int xmm_space[32]; ++ long int padding[56]; ++} __attribute__ ((aligned (16))) fxsave; ++ + static void __attribute__((constructor)) + set_fast_math (void) + { +@@ -75,22 +92,6 @@ + if (edx & FXSAVE) + { + /* Check if DAZ is available. */ +- struct +- { +- unsigned short int cwd; +- unsigned short int swd; +- unsigned short int twd; +- unsigned short int fop; +- long int fip; +- long int fcs; +- long int foo; +- long int fos; +- long int mxcsr; +- long int mxcsr_mask; +- long int st_space[32]; +- long int xmm_space[32]; +- long int padding[56]; +- } __attribute__ ((aligned (16))) fxsave; + + __builtin_memset (&fxsave, 0, sizeof (fxsave)); + |