diff options
author | Mike Frysinger <vapier@gentoo.org> | 2014-10-17 17:40:17 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2014-10-17 17:40:17 +0000 |
commit | ea357f086ee73706ae5f7e18d12a6add17f8e338 (patch) | |
tree | 72e35f71c1926f02a0d3236fdc165ff17b3a80c7 /4.0.4 | |
parent | Backport PR60155 to stable too. (diff) | |
download | gcc-patches-ea357f086ee73706ae5f7e18d12a6add17f8e338.tar.gz gcc-patches-ea357f086ee73706ae5f7e18d12a6add17f8e338.tar.bz2 gcc-patches-ea357f086ee73706ae5f7e18d12a6add17f8e338.zip |
move patches from gcc $FILESDIR
Diffstat (limited to '4.0.4')
-rw-r--r-- | 4.0.4/gentoo/08_all_gcc-4.1-cross-compile.patch | 40 | ||||
-rw-r--r-- | 4.0.4/gentoo/12_all_gcc-4.0.2-softfloat.patch | 84 |
2 files changed, 124 insertions, 0 deletions
diff --git a/4.0.4/gentoo/08_all_gcc-4.1-cross-compile.patch b/4.0.4/gentoo/08_all_gcc-4.1-cross-compile.patch new file mode 100644 index 0000000..e14b57a --- /dev/null +++ b/4.0.4/gentoo/08_all_gcc-4.1-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 + # This is just $(TARGET_SYSTEM_ROOT)$(NATIVE_SYSTEM_HEADER_DIR) + SYSTEM_HEADER_DIR='$(CROSS_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 + # This is just $(TARGET_SYSTEM_ROOT)$(NATIVE_SYSTEM_HEADER_DIR) + SYSTEM_HEADER_DIR='$(CROSS_SYSTEM_HEADER_DIR)' + fi diff --git a/4.0.4/gentoo/12_all_gcc-4.0.2-softfloat.patch b/4.0.4/gentoo/12_all_gcc-4.0.2-softfloat.patch new file mode 100644 index 0000000..e49fea6 --- /dev/null +++ b/4.0.4/gentoo/12_all_gcc-4.0.2-softfloat.patch @@ -0,0 +1,84 @@ +The hunk for gcc/config/arm/t-linux comes from: +http://gcc.gnu.org/PR14352 + +The rest is a custom job by Yuri Vasilevski. + +The idea here is that we add soft float support into the spec file +so that we don't have to worry about packages stripping out softfloat +flags from CFLAGS/CXXFLAGS. + +http://bugs.gentoo.org/75585 + +--- gcc-4.0.2/gcc/config/arm/elf.h ++++ gcc-4.0.2/gcc/config/arm/elf.h +@@ -45,8 +45,9 @@ + #endif + + #ifndef SUBTARGET_ASM_FLOAT_SPEC +-#define SUBTARGET_ASM_FLOAT_SPEC "\ +-%{mapcs-float:-mfloat}" ++#define SUBTARGET_ASM_FLOAT_SPEC "%{mapcs-float:-mfloat} \ ++ %{mhard-float:-mfpu=fpa} \ ++ %{!mhard-float: %{msoft-float:-mfpu=softfpa;:-mfpu=softvfp}}" + #endif + + #ifndef ASM_SPEC +@@ -58,8 +59,6 @@ + %{mapcs-*:-mapcs-%*} \ + %(subtarget_asm_float_spec) \ + %{mthumb-interwork:-mthumb-interwork} \ +-%{msoft-float:-mfloat-abi=soft} %{mhard-float:-mfloat-abi=hard} \ +-%{mfloat-abi=*} %{mfpu=*} \ + %(subtarget_extra_asm_spec)" + #endif + +--- gcc-4.0.2/gcc/config/arm/linux-elf.h ++++ gcc-4.0.2/gcc/config/arm/linux-elf.h +@@ -32,18 +32,22 @@ + #endif + + #undef TARGET_DEFAULT_FLOAT_ABI +-#define TARGET_DEFAULT_FLOAT_ABI ARM_FLOAT_ABI_HARD ++#define TARGET_DEFAULT_FLOAT_ABI ARM_FLOAT_ABI_SOFT + + #undef TARGET_DEFAULT + #define TARGET_DEFAULT (TARGET_ENDIAN_DEFAULT) + ++#undef SUBTARGET_EXTRA_ASM_SPEC ++#define SUBTARGET_EXTRA_ASM_SPEC "%{mhard-float:-mfpu=fpa} \ ++ %{!mhard-float: %{msoft-float:-mfpu=softfpa;:-mfpu=softvfp}}" ++ + #define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm6 + + #define SUBTARGET_EXTRA_LINK_SPEC " -m " TARGET_LINKER_EMULATION " -p" + + #undef MULTILIB_DEFAULTS + #define MULTILIB_DEFAULTS \ +- { "marm", TARGET_ENDIAN_OPTION, "mhard-float", "mno-thumb-interwork" } ++ { "marm", TARGET_ENDIAN_OPTION, "msoft-float", "mno-thumb-interwork" } + + /* The GNU C++ standard library requires that these macros be defined. */ + #undef CPLUSPLUS_CPP_SPEC +@@ -56,7 +60,7 @@ + %{shared:-lc} \ + %{!shared:%{profile:-lc_p}%{!profile:-lc}}" + +-#define LIBGCC_SPEC "%{msoft-float:-lfloat} %{mfloat-abi=soft*:-lfloat} -lgcc" ++#define LIBGCC_SPEC "-lgcc" + + /* Provide a STARTFILE_SPEC appropriate for GNU/Linux. Here we add + the GNU/Linux magical crtbegin.o file (see crtstuff.c) which +--- gcc-4.0.2/gcc/config/arm/t-linux ++++ gcc-4.0.2/gcc/config/arm/t-linux +@@ -4,7 +4,10 @@ TARGET_LIBGCC2_CFLAGS = -fomit-frame-poi + LIBGCC2_DEBUG_CFLAGS = -g0 + + LIB1ASMSRC = arm/lib1funcs.asm +-LIB1ASMFUNCS = _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_lnx ++LIB1ASMFUNCS = _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_lnx \ ++ _negdf2 _addsubdf3 _muldivdf3 _cmpdf2 _unorddf2 _fixdfsi _fixunsdfsi \ ++ _truncdfsf2 _negsf2 _addsubsf3 _muldivsf3 _cmpsf2 _unordsf2 \ ++ _fixsfsi _fixunssfsi _floatdidf _floatdisf + + # MULTILIB_OPTIONS = mhard-float/msoft-float + # MULTILIB_DIRNAMES = hard-float soft-float |