diff options
author | 2005-08-05 22:15:05 +0000 | |
---|---|---|
committer | 2005-08-05 22:15:05 +0000 | |
commit | 1e3e97ca6d0254416996b4bec2ae07a4cb51d98e (patch) | |
tree | c759dbc323813ca0ad3df2ad9803ff7261ed8a00 /sys-devel | |
parent | moved to patchtarball (diff) | |
download | gentoo-2-1e3e97ca6d0254416996b4bec2ae07a4cb51d98e.tar.gz gentoo-2-1e3e97ca6d0254416996b4bec2ae07a4cb51d98e.tar.bz2 gentoo-2-1e3e97ca6d0254416996b4bec2ae07a4cb51d98e.zip |
Merge soft-float support by Yuri Vasilevski #75585.
(Portage version: 2.0.51.22-r2)
Diffstat (limited to 'sys-devel')
-rw-r--r-- | sys-devel/gcc/ChangeLog | 6 | ||||
-rw-r--r-- | sys-devel/gcc/files/3.4.4/gcc-3.4.4-softfloat.patch | 156 | ||||
-rw-r--r-- | sys-devel/gcc/gcc-3.4.4.ebuild | 4 |
3 files changed, 164 insertions, 2 deletions
diff --git a/sys-devel/gcc/ChangeLog b/sys-devel/gcc/ChangeLog index 49b5929103d2..f306779732eb 100644 --- a/sys-devel/gcc/ChangeLog +++ b/sys-devel/gcc/ChangeLog @@ -1,6 +1,10 @@ # ChangeLog for sys-devel/gcc # Copyright 1999-2005 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-devel/gcc/ChangeLog,v 1.440 2005/07/30 23:41:59 halcy0n Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-devel/gcc/ChangeLog,v 1.441 2005/08/05 22:15:05 vapier Exp $ + + 05 Aug 2005; Mike Frysinger <vapier@gentoo.org> + +files/3.4.4/gcc-3.4.4-softfloat.patch, gcc-3.4.4.ebuild: + Merge soft-float support by Yuri Vasilevski #75585. *gcc-4.1.0_beta20050730 (30 Jul 2005) diff --git a/sys-devel/gcc/files/3.4.4/gcc-3.4.4-softfloat.patch b/sys-devel/gcc/files/3.4.4/gcc-3.4.4-softfloat.patch new file mode 100644 index 000000000000..9646bed63726 --- /dev/null +++ b/sys-devel/gcc/files/3.4.4/gcc-3.4.4-softfloat.patch @@ -0,0 +1,156 @@ +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-3.4.4/gcc/config/arm/coff.h ++++ gcc-3.4.4/gcc/config/arm/coff.h +@@ -31,11 +31,16 @@ + #define TARGET_VERSION fputs (" (ARM/coff)", stderr) + + #undef TARGET_DEFAULT +-#define TARGET_DEFAULT (ARM_FLAG_SOFT_FLOAT | ARM_FLAG_APCS_32 | ARM_FLAG_APCS_FRAME | ARM_FLAG_MMU_TRAPS) ++#define TARGET_DEFAULT \ ++ ( ARM_FLAG_SOFT_FLOAT \ ++ | ARM_FLAG_VFP \ ++ | ARM_FLAG_APCS_32 \ ++ | ARM_FLAG_APCS_FRAME \ ++ | ARM_FLAG_MMU_TRAPS ) + + #ifndef MULTILIB_DEFAULTS + #define MULTILIB_DEFAULTS \ +- { "marm", "mlittle-endian", "msoft-float", "mapcs-32", "mno-thumb-interwork" } ++ { "marm", "mlittle-endian", "mapcs-32", "mno-thumb-interwork" } + #endif + + /* This is COFF, but prefer stabs. */ +--- gcc-3.4.4/gcc/config/arm/elf.h ++++ gcc-3.4.4/gcc/config/arm/elf.h +@@ -46,7 +46,9 @@ + + #ifndef SUBTARGET_ASM_FLOAT_SPEC + #define SUBTARGET_ASM_FLOAT_SPEC "\ +-%{mapcs-float:-mfloat} %{msoft-float:-mfpu=softfpa}" ++%{mapcs-float:-mfloat} \ ++%{mhard-float:-mfpu=fpa} \ ++%{!mhard-float: %{msoft-float:-mfpu=softvfp} %{!msoft-float:-mfpu=softvfp}}" + #endif + + #ifndef ASM_SPEC +@@ -106,12 +108,17 @@ + #endif + + #ifndef TARGET_DEFAULT +-#define TARGET_DEFAULT (ARM_FLAG_SOFT_FLOAT | ARM_FLAG_APCS_32 | ARM_FLAG_APCS_FRAME | ARM_FLAG_MMU_TRAPS) ++#define TARGET_DEFAULT \ ++ (ARM_FLAG_SOFT_FLOAT \ ++ | ARM_FLAG_VFP \ ++ | ARM_FLAG_APCS_32 \ ++ | ARM_FLAG_APCS_FRAME \ ++ | ARM_FLAG_MMU_TRAPS ) + #endif + + #ifndef MULTILIB_DEFAULTS + #define MULTILIB_DEFAULTS \ +- { "marm", "mlittle-endian", "msoft-float", "mapcs-32", "mno-thumb-interwork", "fno-leading-underscore" } ++ { "marm", "mlittle-endian", "mapcs-32", "mno-thumb-interwork", "fno-leading-underscore" } + #endif + + #define TARGET_ASM_FILE_START_APP_OFF true +--- gcc-3.4.4/gcc/config/arm/linux-elf.h ++++ gcc-3.4.4/gcc/config/arm/linux-elf.h +@@ -44,20 +44,33 @@ + #define TARGET_LINKER_EMULATION "armelf_linux" + #endif + +-/* Default is to use APCS-32 mode. */ ++/* ++ * Default is to use APCS-32 mode with soft-vfp. ++ * The old Linux default for floats can be achieved with -mhard-float ++ * or with the configure --with-float=hard option. ++ * If -msoft-float or --with-float=soft is used then software float ++ * support will be used just like the default but with the legacy ++ * big endian word ordering for double float representation instead. ++ */ + #undef TARGET_DEFAULT + #define TARGET_DEFAULT \ + ( ARM_FLAG_APCS_32 | \ ++ ARM_FLAG_SOFT_FLOAT | \ ++ ARM_FLAG_VFP | \ + ARM_FLAG_MMU_TRAPS | \ + TARGET_ENDIAN_DEFAULT ) + ++#undef SUBTARGET_EXTRA_ASM_SPEC ++#define SUBTARGET_EXTRA_ASM_SPEC "%{mhard-float:-mfpu=fpa} \ ++%{!mhard-float: %{msoft-float:-mfpu=softvfp} %{!msoft-float:-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", "mapcs-32", "mno-thumb-interwork" } ++ { "marm", TARGET_ENDIAN_OPTION, "mapcs-32", "mno-thumb-interwork" } + + #define CPP_APCS_PC_DEFAULT_SPEC "-D__APCS_32__" + +@@ -72,7 +85,7 @@ + %{shared:-lc} \ + %{!shared:%{profile:-lc_p}%{!profile:-lc}}" + +-#define LIBGCC_SPEC "%{msoft-float:-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-3.4.4/gcc/config/arm/t-linux ++++ gcc-3.4.4/gcc/config/arm/t-linux +@@ -4,7 +4,10 @@ + 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 + + # MULTILIB_OPTIONS = mhard-float/msoft-float + # MULTILIB_DIRNAMES = hard-float soft-float +--- gcc-3.4.4/gcc/config/arm/unknown-elf.h ++++ gcc-3.4.4/gcc/config/arm/unknown-elf.h +@@ -30,7 +30,12 @@ + + /* Default to using APCS-32 and software floating point. */ + #ifndef TARGET_DEFAULT +-#define TARGET_DEFAULT (ARM_FLAG_SOFT_FLOAT | ARM_FLAG_APCS_32 | ARM_FLAG_APCS_FRAME | ARM_FLAG_MMU_TRAPS) ++#define TARGET_DEFAULT \ ++ ( ARM_FLAG_SOFT_FLOAT \ ++ | ARM_FLAG_VFP \ ++ | ARM_FLAG_APCS_32 \ ++ | ARM_FLAG_APCS_FRAME \ ++ | ARM_FLAG_MMU_TRAPS ) + #endif + + /* Now we define the strings used to build the spec file. */ +--- gcc-3.4.4/gcc/config/arm/xscale-elf.h ++++ gcc-3.4.4/gcc/config/arm/xscale-elf.h +@@ -51,9 +51,9 @@ + + #define SUBTARGET_EXTRA_ASM_SPEC "%{!mcpu=*:-mcpu=xscale} \ + %{mhard-float:-mfpu=fpa} \ +- %{!mhard-float: %{msoft-float:-mfpu=softfpa;:-mfpu=softvfp}}" ++ %{!mhard-float: %{msoft-float:-mfpu=softvfp} %{!msoft-float:-mfpu=softvfp}}" + + #ifndef MULTILIB_DEFAULTS + #define MULTILIB_DEFAULTS \ +- { "mlittle-endian", "mno-thumb-interwork", "marm", "msoft-float" } ++ { "mlittle-endian", "mno-thumb-interwork", "marm" } + #endif diff --git a/sys-devel/gcc/gcc-3.4.4.ebuild b/sys-devel/gcc/gcc-3.4.4.ebuild index 14b316c2c195..fcb8b035fdbf 100644 --- a/sys-devel/gcc/gcc-3.4.4.ebuild +++ b/sys-devel/gcc/gcc-3.4.4.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-devel/gcc/gcc-3.4.4.ebuild,v 1.23 2005/07/31 23:17:01 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-devel/gcc/gcc-3.4.4.ebuild,v 1.24 2005/08/05 22:15:05 vapier Exp $ MAN_VER="" PATCH_VER="1.4" @@ -97,6 +97,8 @@ src_unpack() { # Fix cross-compiling epatch "${FILESDIR}"/3.4.4/gcc-3.4.4-cross-compile.patch + [[ ${CTARGET} == *-softfloat-* ]] && epatch "${FILESDIR}"/3.4.4/gcc-3.4.4-softfloat.patch + # Arch stuff case $(tc-arch) in mips) |