⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 crosstool-0.38_patches_gcc-4.0.2_gcc-4.0.2-softfloat.patch

📁 做好的交叉编译工具链
💻 PATCH
字号:
Index: crosstool-0.38/patches/gcc-4.0.2/gentoo-gcc-4.0.2-softfloat.patch===================================================================--- /dev/null+++ crosstool-0.38/patches/gcc-4.0.2/gentoo-gcc-4.0.2-softfloat.patch@@ -0,0 +1,103 @@+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++_NOTE_: This patch has been modified!+- gcc is patched to generate softvfp gerardless if the user specifies -msoft-float or not+- this avoids ugly linking errors in "das U-Boot"++Index: gcc-4.0.2/gcc/config/arm/elf.h+===================================================================+--- gcc-4.0.2.orig/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:-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+ +Index: gcc-4.0.2/gcc/config/arm/linux-elf.h+===================================================================+--- gcc-4.0.2.orig/gcc/config/arm/linux-elf.h++++ gcc-4.0.2/gcc/config/arm/linux-elf.h+@@ -32,18 +32,22 @@+ #define NO_IMPLICIT_EXTERN_C+ + #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 (0)+ ++#undef  SUBTARGET_EXTRA_ASM_SPEC++#define SUBTARGET_EXTRA_ASM_SPEC "%{mhard-float:-mfpu=fpa} \++  %{!mhard-float:-mfpu=softvfp}"+++ #define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm6+ + #define SUBTARGET_EXTRA_LINK_SPEC " -m armelf_linux -p"+ + #undef  MULTILIB_DEFAULTS+ #define MULTILIB_DEFAULTS \+-	{ "marm", "mlittle-endian", "mhard-float", "mno-thumb-interwork" }++	{ "marm", "mlittle-endian", "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+@@ -118,7 +122,7 @@+ + /* NWFPE always understands FPA instructions.  */+ #undef  FPUTYPE_DEFAULT+-#define FPUTYPE_DEFAULT FPUTYPE_FPA_EMU3++#define FPUTYPE_DEFAULT FPUTYPE_VFP+ + /* Call the function profiler with a given profile label.  */+ #undef  ARM_FUNCTION_PROFILER+Index: gcc-4.0.2/gcc/config/arm/t-linux+===================================================================+--- gcc-4.0.2.orig/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

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -