]> git.draconx.ca Git - gentoo-draconx.git/blob - sys-devel/gcc/files/4.3.2/gcc-4.3.2-softfloat.patch
Add gcc with fixed POD dependencies.
[gentoo-draconx.git] / sys-devel / gcc / files / 4.3.2 / gcc-4.3.2-softfloat.patch
1 The hunk for gcc/config/arm/t-linux comes from:
2 http://gcc.gnu.org/PR14352
3
4 The rest is a custom job by Yuri Vasilevski.
5
6 The idea here is that we add soft float support into the spec file
7 so that we don't have to worry about packages stripping out softfloat
8 flags from CFLAGS/CXXFLAGS.
9
10 http://bugs.gentoo.org/75585
11
12 --- gcc-4.0.2/gcc/config/arm/elf.h
13 +++ gcc-4.0.2/gcc/config/arm/elf.h
14 @@ -45,8 +45,9 @@
15  #endif
16
17  #ifndef SUBTARGET_ASM_FLOAT_SPEC
18 -#define SUBTARGET_ASM_FLOAT_SPEC "\
19 -%{mapcs-float:-mfloat}"
20 +#define SUBTARGET_ASM_FLOAT_SPEC "%{mapcs-float:-mfloat} \
21 +  %{mhard-float:-mfpu=fpa} \
22 +  %{!mhard-float: %{msoft-float:-mfpu=softfpa;:-mfpu=softvfp}}"
23  #endif
24
25  #ifndef ASM_SPEC
26 @@ -58,8 +59,6 @@
27  %{mapcs-*:-mapcs-%*} \
28  %(subtarget_asm_float_spec) \
29  %{mthumb-interwork:-mthumb-interwork} \
30 -%{msoft-float:-mfloat-abi=soft} %{mhard-float:-mfloat-abi=hard} \
31 -%{mfloat-abi=*} %{mfpu=*} \
32  %(subtarget_extra_asm_spec)"
33  #endif
34
35 --- gcc-4.0.2/gcc/config/arm/linux-elf.h
36 +++ gcc-4.0.2/gcc/config/arm/linux-elf.h
37 @@ -28,7 +28,7 @@
38  #define TARGET_VERSION  fputs (" (ARM GNU/Linux with ELF)", stderr);
39
40  #undef  TARGET_DEFAULT_FLOAT_ABI
41 -#define TARGET_DEFAULT_FLOAT_ABI ARM_FLOAT_ABI_HARD
42 +#define TARGET_DEFAULT_FLOAT_ABI ARM_FLOAT_ABI_SOFT
43
44  /* TARGET_BIG_ENDIAN_DEFAULT is set in
45     config.gcc for big endian configurations.  */
46 @@ -44,6 +44,10 @@
47
48  #undef  TARGET_DEFAULT
49  #define TARGET_DEFAULT (TARGET_ENDIAN_DEFAULT)
50 +#undef  SUBTARGET_EXTRA_ASM_SPEC
51 +#define SUBTARGET_EXTRA_ASM_SPEC "%{mhard-float:-mfpu=fpa} \
52 +  %{!mhard-float: %{msoft-float:-mfpu=softfpa;:-mfpu=softvfp}}"
53 +
54
55  #define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm6
56
57 @@ -51,7 +55,7 @@
58
59  #undef  MULTILIB_DEFAULTS
60  #define MULTILIB_DEFAULTS \
61 -       { "marm", "mlittle-endian", "mhard-float", "mno-thumb-interwork" }
62 +       { "marm", TARGET_ENDIAN_OPTION, "msoft-float", "mno-thumb-interwork" }
63
64  /* Now we define the strings used to build the spec file.  */
65  #undef  LIB_SPEC
66 @@ -60,7 +64,7 @@
67     %{shared:-lc} \
68     %{!shared:%{profile:-lc_p}%{!profile:-lc}}"
69
70 -#define LIBGCC_SPEC "%{msoft-float:-lfloat} %{mfloat-abi=soft*:-lfloat} -lgcc"
71 +#define LIBGCC_SPEC "-lgcc"
72
73  #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2"
74
75 --- gcc-4.0.2/gcc/config/arm/t-linux
76 +++ gcc-4.0.2/gcc/config/arm/t-linux
77 @@ -4,7 +4,10 @@ TARGET_LIBGCC2_CFLAGS = -fomit-frame-poi
78  LIBGCC2_DEBUG_CFLAGS = -g0
79
80  LIB1ASMSRC = arm/lib1funcs.asm
81 -LIB1ASMFUNCS = _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_lnx
82 +LIB1ASMFUNCS = _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_lnx \
83 +       _negdf2 _addsubdf3 _muldivdf3 _cmpdf2 _unorddf2 _fixdfsi _fixunsdfsi \
84 +       _truncdfsf2 _negsf2 _addsubsf3 _muldivsf3 _cmpsf2 _unordsf2 \
85 +       _fixsfsi _fixunssfsi _floatdidf _floatdisf
86
87  # MULTILIB_OPTIONS = mhard-float/msoft-float
88  # MULTILIB_DIRNAMES = hard-float soft-float