gcc: Merge in the major cleanup I made in OE.dev

git-svn-id: https://svn.o-hand.com/repos/poky/trunk@4038 311d38ba-8fff-0310-9ca6-ca027cbcb966
This commit is contained in:
Richard Purdie 2008-03-18 10:41:39 +00:00
parent 402c7dcb27
commit 1255ee64ee
95 changed files with 22779 additions and 16962 deletions

View File

@ -1,22 +0,0 @@
--- gcc/gcc/regrename.c~ 2004-01-14 17:55:20.000000000 +0000
+++ gcc/gcc/regrename.c 2005-02-28 07:24:25.893015200 +0000
@@ -671,7 +671,8 @@
case SET:
scan_rtx (insn, &SET_SRC (x), class, action, OP_IN, 0);
- scan_rtx (insn, &SET_DEST (x), class, action, OP_OUT, 0);
+ scan_rtx (insn, &SET_DEST (x), class, action,
+ GET_CODE (PATTERN (insn)) == COND_EXEC ? OP_INOUT : OP_OUT, 0);
return;
case STRICT_LOW_PART:
@@ -696,7 +697,8 @@
abort ();
case CLOBBER:
- scan_rtx (insn, &SET_DEST (x), class, action, OP_OUT, 1);
+ scan_rtx (insn, &SET_DEST (x), class, action,
+ GET_CODE (PATTERN (insn)) == COND_EXEC ? OP_INOUT : OP_OUT, 0);
return;
case EXPR_LIST:

File diff suppressed because it is too large Load Diff

View File

@ -1,32 +0,0 @@
Index: gcc-3.4.3/gcc/configure
===================================================================
--- gcc-3.4.3.orig/gcc/configure 2004-11-04 23:14:05.000000000 -0500
+++ gcc-3.4.3/gcc/configure 2005-03-11 14:41:06.373910320 -0500
@@ -9916,11 +9916,6 @@
BUILD_PREFIX=build-
BUILD_PREFIX_1=build-
BUILD_CFLAGS='$(INTERNAL_CFLAGS) $(T_CFLAGS) $(CFLAGS_FOR_BUILD)'
-
- if test "x$TARGET_SYSTEM_ROOT" = x; then
- STMP_FIXINC=
- STMP_FIXPROTO=
- fi
fi
# Expand extra_headers to include complete path.
Index: gcc-3.4.3/gcc/configure.ac
===================================================================
--- gcc-3.4.3.orig/gcc/configure.ac 2004-09-23 20:43:53.000000000 -0400
+++ gcc-3.4.3/gcc/configure.ac 2005-03-11 14:40:55.256600408 -0500
@@ -1524,11 +1524,6 @@
BUILD_PREFIX=build-
BUILD_PREFIX_1=build-
BUILD_CFLAGS='$(INTERNAL_CFLAGS) $(T_CFLAGS) $(CFLAGS_FOR_BUILD)'
-
- if test "x$TARGET_SYSTEM_ROOT" = x; then
- STMP_FIXINC=
- STMP_FIXPROTO=
- fi
fi
# Expand extra_headers to include complete path.

View File

@ -1,30 +0,0 @@
#
# Patch managed by http://www.holgerschurig.de/patcher.html
#
--- gcc-3.4.1/gcc/config.gcc~gcc-3.4.0-arm-bigendian-uclibc
+++ gcc-3.4.1/gcc/config.gcc
@@ -666,6 +666,11 @@
;;
arm*-*-linux-uclibc*) # ARM GNU/Linux with ELF - uClibc
tm_file="dbxelf.h elfos.h linux.h arm/elf.h arm/linux-gas.h arm/linux-elf.h arm/aout.h arm/arm.h"
+ case $target in
+ arm*b-*)
+ tm_defines="TARGET_BIG_ENDIAN_DEFAULT=1 $tm_defines"
+ ;;
+ esac
tmake_file="t-slibgcc-elf-ver t-linux-uclibc arm/t-linux"
extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
gnu_ld=yes
--- gcc-3.4.1/gcc/config/arm/linux-elf.h~gcc-3.4.0-arm-bigendian-uclibc
+++ gcc-3.4.1/gcc/config/arm/linux-elf.h
@@ -120,7 +120,7 @@
%{rdynamic:-export-dynamic} \
%{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2} \
-X \
- %{mbig-endian:-EB}" \
+ %{mbig-endian:-EB} %{mlittle-endian:-EL}" \
SUBTARGET_EXTRA_LINK_SPEC
#endif

View File

@ -1,70 +0,0 @@
By Lennert Buytenhek <buytenh@wantstofly.org>
Adds support for arm*b-linux* big-endian ARM targets
See http://gcc.gnu.org/PR16350
diff -urN gcc-3.4.0.orig/gcc/config/arm/linux-elf.h gcc-3.4.0/gcc/config/arm/linux-elf.h
--- gcc-3.4.0.orig/gcc/config/arm/linux-elf.h 2004-01-31 07:18:11.000000000 +0100
+++ gcc-3.4.0/gcc/config/arm/linux-elf.h 2004-07-02 14:46:29.225443757 +0200
@@ -30,17 +30,34 @@
/* Do not assume anything about header files. */
#define NO_IMPLICIT_EXTERN_C
+/*
+ * 'config.gcc' defines TARGET_BIG_ENDIAN_DEFAULT as 1 for arm*b-*
+ * (big endian) configurations.
+ */
+#if TARGET_BIG_ENDIAN_DEFAULT
+#define TARGET_ENDIAN_DEFAULT ARM_FLAG_BIG_END
+#define TARGET_ENDIAN_OPTION "mbig-endian"
+#define TARGET_LINKER_EMULATION "armelfb_linux"
+#else
+#define TARGET_ENDIAN_DEFAULT 0
+#define TARGET_ENDIAN_OPTION "mlittle-endian"
+#define TARGET_LINKER_EMULATION "armelf_linux"
+#endif
+
/* Default is to use APCS-32 mode. */
#undef TARGET_DEFAULT
-#define TARGET_DEFAULT (ARM_FLAG_APCS_32 | ARM_FLAG_MMU_TRAPS)
+#define TARGET_DEFAULT \
+ ( ARM_FLAG_APCS_32 | \
+ ARM_FLAG_MMU_TRAPS | \
+ TARGET_ENDIAN_DEFAULT )
#define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm6
-#define SUBTARGET_EXTRA_LINK_SPEC " -m armelf_linux -p"
+#define SUBTARGET_EXTRA_LINK_SPEC " -m " TARGET_LINKER_EMULATION " -p"
#undef MULTILIB_DEFAULTS
#define MULTILIB_DEFAULTS \
- { "marm", "mlittle-endian", "mhard-float", "mapcs-32", "mno-thumb-interwork" }
+ { "marm", TARGET_ENDIAN_OPTION, "mhard-float", "mapcs-32", "mno-thumb-interwork" }
#define CPP_APCS_PC_DEFAULT_SPEC "-D__APCS_32__"
@@ -89,7 +106,7 @@
%{rdynamic:-export-dynamic} \
%{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2} \
-X \
- %{mbig-endian:-EB}" \
+ %{mbig-endian:-EB} %{mlittle-endian:-EL}" \
SUBTARGET_EXTRA_LINK_SPEC
#define TARGET_OS_CPP_BUILTINS() LINUX_TARGET_OS_CPP_BUILTINS()
diff -urN gcc-3.4.0.orig/gcc/config.gcc gcc-3.4.0/gcc/config.gcc
--- gcc-3.4.0.orig/gcc/config.gcc 2004-04-17 04:28:24.000000000 +0200
+++ gcc-3.4.0/gcc/config.gcc 2004-07-02 14:44:40.045822542 +0200
@@ -666,6 +666,11 @@
;;
arm*-*-linux*) # ARM GNU/Linux with ELF
tm_file="dbxelf.h elfos.h linux.h arm/elf.h arm/linux-gas.h arm/linux-elf.h arm/aout.h arm/arm.h"
+ case $target in
+ arm*b-*)
+ tm_defines="TARGET_BIG_ENDIAN_DEFAULT=1 $tm_defines"
+ ;;
+ esac
tmake_file="t-slibgcc-elf-ver t-linux arm/t-linux"
extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
gnu_ld=yes

View File

@ -1,24 +0,0 @@
# Fixes errors like the following when building glibc (or any other executable
# or shared library) when using gcc 3.4.0 for ARM with softfloat:
#
# .../libc_pic.os(.text+0x15834): In function `__modf': undefined reference to `__subdf3'
# .../libc_pic.os(.text+0x158b8): In function `__modf': undefined reference to `__subdf3'
# .../libc_pic.os(.text+0x1590c): In function `scalbn': undefined reference to `__muldf3'
# .../libc_pic.os(.text+0x15e94): In function `__ldexpf': undefined reference to `__eqsf2'
# .../libc_pic.os(.text+0xcee4c): In function `monstartup': undefined reference to `__fixsfsi'
diff -urNd gcc-3.4.0-orig/gcc/config/arm/t-linux gcc-3.4.0/gcc/config/arm/t-linux
--- gcc-3.4.0-orig/gcc/config/arm/t-linux 2003-09-20 23:09:07.000000000 +0200
+++ gcc-3.4.0/gcc/config/arm/t-linux 2004-05-01 20:31:59.102846400 +0200
@@ -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

View File

@ -1,24 +0,0 @@
# Dimitry Andric <dimitry@andric.com>, 2004-05-01
#
# * Removed the extra -lfloat option from LIBGCC_SPEC, since it isn't needed
# anymore. (The required functions are now in libgcc.)
#
# Fixes errors like
# arm-softfloat-linux-gnu/3.4.0/../../../../arm-softfloat-linux-gnu/bin/ld: cannot find -lfloat
# collect2: ld returned 1 exit status
# make[2]: *** [arm-softfloat-linux-gnu/gcc-3.4.0-glibc-2.3.2/build-glibc/iconvdata/ISO8859-1.so] Error 1
# when building glibc-2.3.3 with gcc-3.4.0 for arm-softfloat
diff -urNd gcc-3.4.0-orig/gcc/config/arm/linux-elf.h gcc-3.4.0/gcc/config/arm/linux-elf.h
--- gcc-3.4.0-orig/gcc/config/arm/linux-elf.h 2004-01-31 07:18:11.000000000 +0100
+++ gcc-3.4.0/gcc/config/arm/linux-elf.h 2004-05-01 19:19:06.935979200 +0200
@@ -55,7 +73,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

View File

@ -1,256 +0,0 @@
#
# Submitted:
#
# Dimitry Andric <dimitry@andric.com>, 2004-05-01
#
# Description:
#
# Nicholas Pitre released this patch for gcc soft-float support here:
# http://lists.arm.linux.org.uk/pipermail/linux-arm/2003-October/006436.html
#
# This version has been adapted to work with gcc 3.4.0.
#
# The original patch doesn't distinguish between softfpa and softvfp modes
# in the way Nicholas Pitre probably meant. His description is:
#
# "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."
#
# Which means the following:
#
# * If you compile without -mhard-float or -msoft-float, you should get
# software floating point, using the VFP format. The produced object file
# should have these flags in its header:
#
# private flags = 600: [APCS-32] [VFP float format] [software FP]
#
# * If you compile with -mhard-float, you should get hardware floating point,
# which always uses the FPA format. Object file header flags should be:
#
# private flags = 0: [APCS-32] [FPA float format]
#
# * If you compile with -msoft-float, you should get software floating point,
# using the FPA format. This is done for compatibility reasons with many
# existing distributions. Object file header flags should be:
#
# private flags = 200: [APCS-32] [FPA float format] [software FP]
#
# The original patch from Nicholas Pitre contained the following constructs:
#
# #define SUBTARGET_EXTRA_ASM_SPEC "%{!mcpu=*:-mcpu=xscale} \
# %{mhard-float:-mfpu=fpa} \
# %{!mhard-float: %{msoft-float:-mfpu=softfpa;:-mfpu=softvfp}}"
#
# However, gcc doesn't accept this ";:" notation, used in the 3rd line. This
# is probably the reason Robert Schwebel modified it to:
#
# #define SUBTARGET_EXTRA_ASM_SPEC "%{!mcpu=*:-mcpu=xscale} \
# %{mhard-float:-mfpu=fpa} \
# %{!mhard-float: %{msoft-float:-mfpu=softfpa -mfpu=softvfp}}"
#
# But this causes the following behaviour:
#
# * If you compile without -mhard-float or -msoft-float, the compiler generates
# software floating point instructions, but *nothing* is passed to the
# assembler, which results in an object file which has flags:
#
# private flags = 0: [APCS-32] [FPA float format]
#
# This is not correct!
#
# * If you compile with -mhard-float, the compiler generates hardware floating
# point instructions, and passes "-mfpu=fpa" to the assembler, which results
# in an object file which has the same flags as in the previous item, but now
# those *are* correct.
#
# * If you compile with -msoft-float, the compiler generates software floating
# point instructions, and passes "-mfpu=softfpa -mfpu=softvfp" (in that
# order) to the assembler, which results in an object file with flags:
#
# private flags = 600: [APCS-32] [VFP float format] [software FP]
#
# This is not correct, because the last "-mfpu=" option on the assembler
# command line determines the actual FPU convention used (which should be FPA
# in this case).
#
# Therefore, I modified this patch to get the desired behaviour. Every
# instance of the notation:
#
# %{msoft-float:-mfpu=softfpa -mfpu=softvfp}
#
# was changed to:
#
# %{msoft-float:-mfpu=softfpa} %{!msoft-float:-mfpu=softvfp}
#
# I also did the following:
#
# * Modified all TARGET_DEFAULT macros I could find to include ARM_FLAG_VFP, to
# be consistent with Nicholas' original patch.
# * Removed any "msoft-float" or "mhard-float" from all MULTILIB_DEFAULTS
# macros I could find. I think that if you compile without any options, you
# would like to get the defaults. :)
# * Removed the extra -lfloat option from LIBGCC_SPEC, since it isn't needed
# anymore. (The required functions are now in libgcc.)
diff -urNd gcc-3.4.0-orig/gcc/config/arm/coff.h gcc-3.4.0/gcc/config/arm/coff.h
--- gcc-3.4.0-orig/gcc/config/arm/coff.h 2004-02-24 15:25:22.000000000 +0100
+++ gcc-3.4.0/gcc/config/arm/coff.h 2004-05-01 19:07:06.059409600 +0200
@@ -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. */
diff -urNd gcc-3.4.0-orig/gcc/config/arm/elf.h gcc-3.4.0/gcc/config/arm/elf.h
--- gcc-3.4.0-orig/gcc/config/arm/elf.h 2004-02-24 15:25:22.000000000 +0100
+++ gcc-3.4.0/gcc/config/arm/elf.h 2004-05-01 19:12:16.976486400 +0200
@@ -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=softfpa} %{!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
diff -urNd gcc-3.4.0-orig/gcc/config/arm/linux-elf.h gcc-3.4.0/gcc/config/arm/linux-elf.h
--- gcc-3.4.0-orig/gcc/config/arm/linux-elf.h 2004-01-31 07:18:11.000000000 +0100
+++ gcc-3.4.0/gcc/config/arm/linux-elf.h 2004-05-01 19:19:06.935979200 +0200
@@ -30,9 +30,27 @@
/* Do not assume anything about header files. */
#define NO_IMPLICIT_EXTERN_C
-/* 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_MMU_TRAPS)
+#define TARGET_DEFAULT \
+ ( ARM_FLAG_APCS_32 \
+ | ARM_FLAG_SOFT_FLOAT \
+ | ARM_FLAG_VFP \
+ | ARM_FLAG_MMU_TRAPS )
+
+#undef SUBTARGET_EXTRA_ASM_SPEC
+#define SUBTARGET_EXTRA_ASM_SPEC "\
+%{!mcpu=*:-mcpu=xscale} \
+%{mhard-float:-mfpu=fpa} \
+%{!mhard-float: %{msoft-float:-mfpu=softfpa} %{!msoft-float:-mfpu=softvfp}}"
#define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm6
@@ -40,7 +58,7 @@
#undef MULTILIB_DEFAULTS
#define MULTILIB_DEFAULTS \
- { "marm", "mlittle-endian", "mhard-float", "mapcs-32", "mno-thumb-interwork" }
+ { "marm", "mlittle-endian", "mapcs-32", "mno-thumb-interwork" }
#define CPP_APCS_PC_DEFAULT_SPEC "-D__APCS_32__"
@@ -55,7 +73,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
diff -urNd gcc-3.4.0-orig/gcc/config/arm/t-linux gcc-3.4.0/gcc/config/arm/t-linux
--- gcc-3.4.0-orig/gcc/config/arm/t-linux 2003-09-20 23:09:07.000000000 +0200
+++ gcc-3.4.0/gcc/config/arm/t-linux 2004-05-01 20:31:59.102846400 +0200
@@ -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
diff -urNd gcc-3.4.0-orig/gcc/config/arm/unknown-elf.h gcc-3.4.0/gcc/config/arm/unknown-elf.h
--- gcc-3.4.0-orig/gcc/config/arm/unknown-elf.h 2004-02-24 15:25:22.000000000 +0100
+++ gcc-3.4.0/gcc/config/arm/unknown-elf.h 2004-05-01 19:09:09.016212800 +0200
@@ -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. */
diff -urNd gcc-3.4.0-orig/gcc/config/arm/xscale-elf.h gcc-3.4.0/gcc/config/arm/xscale-elf.h
--- gcc-3.4.0-orig/gcc/config/arm/xscale-elf.h 2003-07-02 01:26:43.000000000 +0200
+++ gcc-3.4.0/gcc/config/arm/xscale-elf.h 2004-05-01 20:15:36.620105600 +0200
@@ -49,11 +49,12 @@
endian, regardless of the endian-ness of the memory
system. */
-#define SUBTARGET_EXTRA_ASM_SPEC "%{!mcpu=*:-mcpu=xscale} \
- %{mhard-float:-mfpu=fpa} \
- %{!mhard-float: %{msoft-float:-mfpu=softfpa;:-mfpu=softvfp}}"
+#define SUBTARGET_EXTRA_ASM_SPEC "\
+%{!mcpu=*:-mcpu=xscale} \
+%{mhard-float:-mfpu=fpa} \
+%{!mhard-float: %{msoft-float:-mfpu=softfpa} %{!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

View File

@ -1,442 +0,0 @@
diff -urN gcc-3.4.1-dist/boehm-gc/configure gcc-3.4.1/boehm-gc/configure
--- gcc-3.4.1-dist/boehm-gc/configure 2004-07-01 14:14:03.000000000 -0500
+++ gcc-3.4.1/boehm-gc/configure 2004-08-12 16:22:57.000000000 -0500
@@ -1947,6 +1947,11 @@
lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
;;
+linux-uclibc*)
+ lt_cv_deplibs_check_method=pass_all
+ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
+ ;;
+
netbsd*)
if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
diff -urN gcc-3.4.1-dist/boehm-gc/ltconfig gcc-3.4.1/boehm-gc/ltconfig
--- gcc-3.4.1-dist/boehm-gc/ltconfig 2002-11-20 09:59:06.000000000 -0600
+++ gcc-3.4.1/boehm-gc/ltconfig 2004-08-12 15:54:42.000000000 -0500
@@ -1981,6 +1981,23 @@
fi
;;
+linux-uclibc*)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
+ soname_spec='${libname}${release}.so$major'
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
+ file_magic_cmd=/usr/bin/file
+ file_magic_test_file=`echo /lib/libuClibc-*.so`
+
+ # Assume using the uClibc dynamic linker.
+ dynamic_linker="uClibc ld.so"
+ ;;
+
netbsd*)
version_type=sunos
if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
diff -urN gcc-3.4.1-dist/gcc/config/arm/linux-elf.h gcc-3.4.1/gcc/config/arm/linux-elf.h
--- gcc-3.4.1-dist/gcc/config/arm/linux-elf.h 2004-01-31 00:18:11.000000000 -0600
+++ gcc-3.4.1/gcc/config/arm/linux-elf.h 2004-08-12 15:54:42.000000000 -0500
@@ -81,6 +81,18 @@
"%{!shared:crtend.o%s} %{shared:crtendS.o%s} crtn.o%s"
#undef LINK_SPEC
+#ifdef USE_UCLIBC
+#define LINK_SPEC "%{h*} %{version:-v} \
+ %{b} %{Wl,*:%*} \
+ %{static:-Bstatic} \
+ %{shared:-shared} \
+ %{symbolic:-Bsymbolic} \
+ %{rdynamic:-export-dynamic} \
+ %{!dynamic-linker:-dynamic-linker /lib/ld-uClibc.so.0} \
+ -X \
+ %{mbig-endian:-EB}" \
+ SUBTARGET_EXTRA_LINK_SPEC
+#else
#define LINK_SPEC "%{h*} %{version:-v} \
%{b} %{Wl,*:%*} \
%{static:-Bstatic} \
@@ -91,6 +103,7 @@
-X \
%{mbig-endian:-EB}" \
SUBTARGET_EXTRA_LINK_SPEC
+#endif
#define TARGET_OS_CPP_BUILTINS() LINUX_TARGET_OS_CPP_BUILTINS()
diff -urN gcc-3.4.1-dist/gcc/config/cris/linux.h gcc-3.4.1/gcc/config/cris/linux.h
--- gcc-3.4.1-dist/gcc/config/cris/linux.h 2003-11-28 21:08:09.000000000 -0600
+++ gcc-3.4.1/gcc/config/cris/linux.h 2004-08-12 15:54:43.000000000 -0500
@@ -79,6 +79,25 @@
#undef CRIS_DEFAULT_CPU_VERSION
#define CRIS_DEFAULT_CPU_VERSION CRIS_CPU_NG
+#ifdef USE_UCLIBC
+
+#undef CRIS_SUBTARGET_VERSION
+#define CRIS_SUBTARGET_VERSION " - cris-axis-linux-uclibc"
+
+#undef CRIS_LINK_SUBTARGET_SPEC
+#define CRIS_LINK_SUBTARGET_SPEC \
+ "-mcrislinux\
+ -rpath-link include/asm/../..%s\
+ %{shared} %{static}\
+ %{symbolic:-Bdynamic} %{shlib:-Bdynamic} %{static:-Bstatic}\
+ %{!shared: \
+ %{!static: \
+ %{rdynamic:-export-dynamic} \
+ %{!dynamic-linker:-dynamic-linker /lib/ld-uClibc.so.0}}} \
+ %{!r:%{O2|O3: --gc-sections}}"
+
+#else /* USE_UCLIBC */
+
#undef CRIS_SUBTARGET_VERSION
#define CRIS_SUBTARGET_VERSION " - cris-axis-linux-gnu"
@@ -93,6 +112,8 @@
%{!shared:%{!static:%{rdynamic:-export-dynamic}}}\
%{!r:%{O2|O3: --gc-sections}}"
+#endif /* USE_UCLIBC */
+
/* Node: Run-time Target */
diff -urN gcc-3.4.1-dist/gcc/config/cris/t-linux-uclibc gcc-3.4.1/gcc/config/cris/t-linux-uclibc
--- gcc-3.4.1-dist/gcc/config/cris/t-linux-uclibc 1969-12-31 18:00:00.000000000 -0600
+++ gcc-3.4.1/gcc/config/cris/t-linux-uclibc 2004-08-12 15:54:43.000000000 -0500
@@ -0,0 +1,3 @@
+T_CFLAGS = -DUSE_UCLIBC
+TARGET_LIBGCC2_CFLAGS += -fPIC
+CRTSTUFF_T_CFLAGS_S = $(TARGET_LIBGCC2_CFLAGS)
diff -urN gcc-3.4.1-dist/gcc/config/i386/linux.h gcc-3.4.1/gcc/config/i386/linux.h
--- gcc-3.4.1-dist/gcc/config/i386/linux.h 2003-11-28 21:08:10.000000000 -0600
+++ gcc-3.4.1/gcc/config/i386/linux.h 2004-08-12 15:54:43.000000000 -0500
@@ -118,6 +118,15 @@
%{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.1}} \
%{static:-static}}}"
#else
+#if defined USE_UCLIBC
+#define LINK_SPEC "-m elf_i386 %{shared:-shared} \
+ %{!shared: \
+ %{!ibcs: \
+ %{!static: \
+ %{rdynamic:-export-dynamic} \
+ %{!dynamic-linker:-dynamic-linker /lib/ld-uClibc.so.0}} \
+ %{static:-static}}}"
+#else
#define LINK_SPEC "-m elf_i386 %{shared:-shared} \
%{!shared: \
%{!ibcs: \
@@ -126,6 +135,7 @@
%{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} \
%{static:-static}}}"
#endif
+#endif
/* A C statement (sans semicolon) to output to the stdio stream
FILE the assembler definition of uninitialized global DECL named
diff -urN gcc-3.4.1-dist/gcc/config/mips/linux.h gcc-3.4.1/gcc/config/mips/linux.h
--- gcc-3.4.1-dist/gcc/config/mips/linux.h 2004-06-15 20:42:24.000000000 -0500
+++ gcc-3.4.1/gcc/config/mips/linux.h 2004-08-12 15:54:43.000000000 -0500
@@ -109,6 +109,17 @@
/* Borrowed from sparc/linux.h */
#undef LINK_SPEC
+#ifdef USE_UCLIBC
+#define LINK_SPEC \
+ "%(endian_spec) \
+ %{shared:-shared} \
+ %{!shared: \
+ %{!ibcs: \
+ %{!static: \
+ %{rdynamic:-export-dynamic} \
+ %{!dynamic-linker:-dynamic-linker /lib/ld-uClibc.so.0}} \
+ %{static:-static}}}"
+#else
#define LINK_SPEC \
"%(endian_spec) \
%{shared:-shared} \
@@ -118,6 +129,7 @@
%{rdynamic:-export-dynamic} \
%{!dynamic-linker:-dynamic-linker /lib/ld.so.1}} \
%{static:-static}}}"
+#endif
#undef SUBTARGET_ASM_SPEC
#define SUBTARGET_ASM_SPEC "\
diff -urN gcc-3.4.1-dist/gcc/config/rs6000/linux.h gcc-3.4.1/gcc/config/rs6000/linux.h
--- gcc-3.4.1-dist/gcc/config/rs6000/linux.h 2004-02-25 09:11:19.000000000 -0600
+++ gcc-3.4.1/gcc/config/rs6000/linux.h 2004-08-12 15:54:43.000000000 -0500
@@ -61,7 +61,11 @@
#define LINK_START_DEFAULT_SPEC "%(link_start_linux)"
#undef LINK_OS_DEFAULT_SPEC
+#ifdef USE_UCLIBC
+#define LINK_OS_DEFAULT_SPEC "%(link_os_linux_uclibc)"
+#else
#define LINK_OS_DEFAULT_SPEC "%(link_os_linux)"
+#endif
#define LINK_GCC_C_SEQUENCE_SPEC \
"%{static:--start-group} %G %L %{static:--end-group}%{!static:%G}"
diff -urN gcc-3.4.1-dist/gcc/config/rs6000/sysv4.h gcc-3.4.1/gcc/config/rs6000/sysv4.h
--- gcc-3.4.1-dist/gcc/config/rs6000/sysv4.h 2004-06-10 01:39:50.000000000 -0500
+++ gcc-3.4.1/gcc/config/rs6000/sysv4.h 2004-08-12 15:54:43.000000000 -0500
@@ -947,6 +947,7 @@
mcall-linux : %(link_os_linux) ; \
mcall-gnu : %(link_os_gnu) ; \
mcall-netbsd : %(link_os_netbsd) ; \
+ mcall-linux-uclibc : %(link_os_linux_uclibc); \
mcall-openbsd: %(link_os_openbsd) ; \
: %(link_os_default) }"
@@ -1124,6 +1125,10 @@
%{rdynamic:-export-dynamic} \
%{!dynamic-linker:-dynamic-linker /lib/ld.so.1}}}"
+#define LINK_OS_LINUX_UCLIBC_SPEC "-m elf32ppclinux %{!shared: %{!static: \
+ %{rdynamic:-export-dynamic} \
+ %{!dynamic-linker:-dynamic-linker /lib/ld-uClibc.so.0}}}"
+
#if defined(HAVE_LD_EH_FRAME_HDR)
# define LINK_EH_SPEC "%{!static:--eh-frame-hdr} "
#endif
@@ -1290,6 +1295,7 @@
{ "link_os_sim", LINK_OS_SIM_SPEC }, \
{ "link_os_freebsd", LINK_OS_FREEBSD_SPEC }, \
{ "link_os_linux", LINK_OS_LINUX_SPEC }, \
+ { "link_os_linux_uclibc", LINK_OS_LINUX_UCLIBC_SPEC }, \
{ "link_os_gnu", LINK_OS_GNU_SPEC }, \
{ "link_os_netbsd", LINK_OS_NETBSD_SPEC }, \
{ "link_os_openbsd", LINK_OS_OPENBSD_SPEC }, \
diff -urN gcc-3.4.1-dist/gcc/config/sh/linux.h gcc-3.4.1/gcc/config/sh/linux.h
--- gcc-3.4.1-dist/gcc/config/sh/linux.h 2004-01-11 20:29:13.000000000 -0600
+++ gcc-3.4.1/gcc/config/sh/linux.h 2004-08-12 15:54:43.000000000 -0500
@@ -73,12 +73,21 @@
#undef SUBTARGET_LINK_EMUL_SUFFIX
#define SUBTARGET_LINK_EMUL_SUFFIX "_linux"
#undef SUBTARGET_LINK_SPEC
+#ifdef USE_UCLIBC
+#define SUBTARGET_LINK_SPEC \
+ "%{shared:-shared} \
+ %{!static: \
+ %{rdynamic:-export-dynamic} \
+ %{!dynamic-linker:-dynamic-linker /lib/ld-uClibc.so.0}} \
+ %{static:-static}"
+#else
#define SUBTARGET_LINK_SPEC \
"%{shared:-shared} \
%{!static: \
%{rdynamic:-export-dynamic} \
%{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} \
%{static:-static}"
+#endif
#undef LIB_SPEC
#define LIB_SPEC \
diff -urN gcc-3.4.1-dist/gcc/config/sh/t-linux-uclibc gcc-3.4.1/gcc/config/sh/t-linux-uclibc
--- gcc-3.4.1-dist/gcc/config/sh/t-linux-uclibc 1969-12-31 18:00:00.000000000 -0600
+++ gcc-3.4.1/gcc/config/sh/t-linux-uclibc 2004-08-12 15:54:43.000000000 -0500
@@ -0,0 +1,13 @@
+T_CFLAGS = -DUSE_UCLIBC
+
+TARGET_LIBGCC2_CFLAGS = -fpic -DNO_FPSCR_VALUES
+LIB1ASMFUNCS_CACHE = _ic_invalidate
+
+LIB2FUNCS_EXTRA=
+
+MULTILIB_OPTIONS= $(MULTILIB_ENDIAN) m3e/m4
+MULTILIB_DIRNAMES=
+MULTILIB_MATCHES =
+MULTILIB_EXCEPTIONS=
+
+EXTRA_MULTILIB_PARTS= crtbegin.o crtend.o crtbeginS.o crtendS.o crtbeginT.o
diff -urN gcc-3.4.1-dist/gcc/config/sh/t-sh64-uclibc gcc-3.4.1/gcc/config/sh/t-sh64-uclibc
--- gcc-3.4.1-dist/gcc/config/sh/t-sh64-uclibc 1969-12-31 18:00:00.000000000 -0600
+++ gcc-3.4.1/gcc/config/sh/t-sh64-uclibc 2004-08-12 15:54:43.000000000 -0500
@@ -0,0 +1,13 @@
+EXTRA_MULTILIB_PARTS= crt1.o crti.o crtn.o crtbegin.o crtend.o
+
+LIB1ASMFUNCS = \
+ _sdivsi3 _sdivsi3_i4 _udivsi3 _udivsi3_i4 _set_fpscr \
+ _shcompact_call_trampoline _shcompact_return_trampoline \
+ _shcompact_incoming_args _ic_invalidate _nested_trampoline \
+ _push_pop_shmedia_regs \
+ _udivdi3 _divdi3 _umoddi3 _moddi3
+
+MULTILIB_OPTIONS = $(MULTILIB_ENDIAN) m5-32media-nofpu/m5-compact/m5-compact-nofpu/m5-64media/m5-64media-nofpu
+MULTILIB_DIRNAMES= $(MULTILIB_ENDIAN) nofpu compact nofpu/compact media64 nofpu/media64
+MULTILIB_MATCHES=
+MULTILIB_EXCEPTIONS=
diff -urN gcc-3.4.1-dist/gcc/config/t-linux-uclibc gcc-3.4.1/gcc/config/t-linux-uclibc
--- gcc-3.4.1-dist/gcc/config/t-linux-uclibc 1969-12-31 18:00:00.000000000 -0600
+++ gcc-3.4.1/gcc/config/t-linux-uclibc 2004-08-12 15:54:43.000000000 -0500
@@ -0,0 +1,15 @@
+T_CFLAGS = -DUSE_UCLIBC
+
+# Compile crtbeginS.o and crtendS.o with pic.
+CRTSTUFF_T_CFLAGS_S = $(CRTSTUFF_T_CFLAGS) -fPIC
+# Compile libgcc2.a with pic.
+TARGET_LIBGCC2_CFLAGS = -fPIC
+
+# Override t-slibgcc-elf-ver to export some libgcc symbols with
+# the symbol versions that glibc used.
+#SHLIB_MAPFILES += $(srcdir)/config/libgcc-glibc.ver
+
+# Use unwind-dw2-fde
+LIB2ADDEH = $(srcdir)/unwind-dw2.c $(srcdir)/unwind-dw2-fde.c \
+ $(srcdir)/unwind-sjlj.c $(srcdir)/gthr-gnat.c $(srcdir)/unwind-c.c
+LIB2ADDEHDEP = unwind.inc unwind-dw2-fde.h
diff -urN gcc-3.4.1-dist/gcc/config.gcc gcc-3.4.1/gcc/config.gcc
--- gcc-3.4.1-dist/gcc/config.gcc 2004-04-21 10:12:35.000000000 -0500
+++ gcc-3.4.1/gcc/config.gcc 2004-08-12 15:59:46.000000000 -0500
@@ -664,6 +664,12 @@
extra_parts=""
use_collect2=yes
;;
+arm*-*-linux-uclibc*) # ARM GNU/Linux with ELF - uClibc
+ tm_file="dbxelf.h elfos.h linux.h arm/elf.h arm/linux-gas.h arm/linux-elf.h arm/aout.h arm/arm.h"
+ tmake_file="t-slibgcc-elf-ver t-linux-uclibc arm/t-linux"
+ extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
+ gnu_ld=yes
+ ;;
arm*-*-linux*) # ARM GNU/Linux with ELF
tm_file="dbxelf.h elfos.h linux.h arm/elf.h arm/linux-gas.h arm/linux-elf.h arm/aout.h arm/arm.h"
tmake_file="t-slibgcc-elf-ver t-linux arm/t-linux"
@@ -725,6 +731,10 @@
tmake_file="cris/t-cris cris/t-elfmulti"
gas=yes
;;
+cris-*-linux-uclibc*)
+ tm_file="dbxelf.h elfos.h svr4.h ${tm_file} linux.h cris/linux.h"
+ tmake_file="cris/t-cris t-slibgcc-elf-ver cris/t-linux-uclibc"
+ ;;
cris-*-linux*)
tm_file="dbxelf.h elfos.h svr4.h ${tm_file} linux.h cris/linux.h"
tmake_file="cris/t-cris t-slibgcc-elf-ver cris/t-linux"
@@ -988,6 +998,11 @@
thread_file='single'
fi
;;
+i[34567]86-*-linux*uclibc*) # Intel 80386's running GNU/Linux
+ # with ELF format using uClibc
+ tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h svr4.h linux.h i386/linux.h"
+ tmake_file="t-slibgcc-elf-ver t-linux-uclibc i386/t-crtstuff"
+ ;;
i[34567]86-*-linux*) # Intel 80386's running GNU/Linux
# with ELF format using glibc 2
# aka GNU/Linux C library 6
@@ -1547,6 +1562,16 @@
gnu_ld=yes
gas=yes
;;
+mips*-*-linux-uclibc*) # Linux MIPS, either endian. uClibc
+ tm_file="dbxelf.h elfos.h svr4.h linux.h ${tm_file} mips/linux.h"
+ case ${target} in
+ mipsisa32*-*)
+ target_cpu_default="MASK_SOFT_FLOAT"
+ tm_defines="MIPS_ISA_DEFAULT=32"
+ ;;
+ esac
+ tmake_file="t-slibgcc-elf-ver t-linux-uclibc"
+ ;;
mips*-*-linux*) # Linux MIPS, either endian.
tm_file="dbxelf.h elfos.h svr4.h linux.h ${tm_file} mips/linux.h"
case ${target} in
@@ -1764,6 +1789,10 @@
tm_file="${tm_file} dbxelf.h elfos.h svr4.h freebsd-spec.h rs6000/sysv4.h rs6000/linux.h rs6000/linuxspe.h"
tmake_file="rs6000/t-fprules rs6000/t-ppcos t-slibgcc-elf-ver t-linux rs6000/t-ppccomm"
;;
+powerpc-*-linux-uclibc*)
+ tm_file="${tm_file} dbxelf.h elfos.h svr4.h freebsd-spec.h rs6000/sysv4.h rs6000/linux.h"
+ tmake_file="rs6000/t-fprules rs6000/t-ppcos t-slibgcc-elf-ver t-linux-uclibc rs6000/t-ppccomm"
+ ;;
powerpc-*-linux*)
tm_file="${tm_file} dbxelf.h elfos.h svr4.h freebsd-spec.h rs6000/sysv4.h rs6000/linux.h"
tmake_file="rs6000/t-fprules rs6000/t-ppcos t-slibgcc-elf-ver t-linux rs6000/t-ppccomm"
@@ -1916,7 +1945,7 @@
tm_file="${tm_file} dbxelf.h elfos.h svr4.h sh/elf.h sh/embed-elf.h sh/rtemself.h rtems.h"
;;
sh-*-linux* | sh[2346lbe]*-*-linux*)
- tmake_file="sh/t-sh sh/t-elf t-slibgcc-elf-ver t-linux"
+ tmake_file="sh/t-sh sh/t-elf t-slibgcc-elf-ver"
case ${target} in
sh*be-*-* | sh*eb-*-*) ;;
*)
@@ -1924,9 +1953,17 @@
tmake_file="${tmake_file} sh/t-le"
;;
esac
- tmake_file="${tmake_file} sh/t-linux"
+ case ${target} in
+ *-*-linux-uclibc*) tmake_file="${tmake_file} t-linux-uclibc sh/t-linux-uclibc" ;;
+ *) tmake_file="${tmake_file} t-linux sh/t-linux" ;;
+ esac
tm_file="${tm_file} dbxelf.h elfos.h svr4.h sh/elf.h sh/linux.h"
case ${target} in
+ sh64*-*-linux-uclibc*)
+ tmake_file="${tmake_file} sh/t-sh64-uclibc"
+ tm_file="${tm_file} sh/sh64.h"
+ extra_headers="shmedia.h ushmedia.h sshmedia.h"
+ ;;
sh64*)
tmake_file="${tmake_file} sh/t-sh64"
tm_file="${tm_file} sh/sh64.h"
diff -urN gcc-3.4.1-dist/libtool.m4 gcc-3.4.1/libtool.m4
--- gcc-3.4.1-dist/libtool.m4 2004-05-18 04:08:37.000000000 -0500
+++ gcc-3.4.1/libtool.m4 2004-08-12 15:54:43.000000000 -0500
@@ -689,6 +689,11 @@
lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
;;
+linux-uclibc*)
+ lt_cv_deplibs_check_method=pass_all
+ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
+ ;;
+
netbsd*)
if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
[lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$']
diff -urN gcc-3.4.1-dist/ltconfig gcc-3.4.1/ltconfig
--- gcc-3.4.1-dist/ltconfig 2004-03-05 15:05:41.000000000 -0600
+++ gcc-3.4.1/ltconfig 2004-08-12 15:55:48.000000000 -0500
@@ -602,6 +602,7 @@
# Transform linux* to *-*-linux-gnu*, to support old configure scripts.
case $host_os in
+linux-uclibc*) ;;
linux-gnu*) ;;
linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
esac
@@ -1262,6 +1263,24 @@
dynamic_linker='GNU/Linux ld.so'
;;
+linux-uclibc*)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
+ soname_spec='${libname}${release}.so$major'
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ # This implies no fast_install, which is unacceptable.
+ # Some rework will be needed to allow for fast_install
+ # before this can be enabled.
+ # Note: copied from linux-gnu, and may not be appropriate.
+ hardcode_into_libs=yes
+ # Assume using the uClibc dynamic linker.
+ dynamic_linker="uClibc ld.so"
+ ;;
+
netbsd*)
need_lib_prefix=no
need_version=no

File diff suppressed because it is too large Load Diff

View File

@ -1,14 +0,0 @@
--- gcc-3.3.2-old/configure.in 2003-08-09 01:57:21.000000000 -0500
+++ gcc-3.3.2/configure.in 2004-01-15 12:46:29.000000000 -0600
@@ -1418,6 +1418,11 @@
fi
FLAGS_FOR_TARGET=
+case " $targargs " in
+ *" --nfp "* | *" --without-float "*)
+ FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -msoft-float'
+ ;;
+esac
case " $target_configdirs " in
*" newlib "*)
case " $targargs " in

View File

@ -1,79 +0,0 @@
--- gcc-3.4.0/gcc/config/arm/arm.md.arm-ldm-peephole 2004-01-13 08:24:37.000000000 -0500
+++ gcc-3.4.0/gcc/config/arm/arm.md 2004-04-24 18:18:04.000000000 -0400
@@ -8810,13 +8810,16 @@
(set_attr "length" "4,8,8")]
)
+; Try to convert LDR+LDR+arith into [add+]LDM+arith
+; On XScale, LDM is always slower than two LDRs, so only do this if
+; optimising for size.
(define_insn "*arith_adjacentmem"
[(set (match_operand:SI 0 "s_register_operand" "=r")
(match_operator:SI 1 "shiftable_operator"
[(match_operand:SI 2 "memory_operand" "m")
(match_operand:SI 3 "memory_operand" "m")]))
(clobber (match_scratch:SI 4 "=r"))]
- "TARGET_ARM && adjacent_mem_locations (operands[2], operands[3])"
+ "TARGET_ARM && (!arm_tune_xscale || optimize_size) && adjacent_mem_locations (operands[2], operands[3])"
"*
{
rtx ldm[3];
@@ -8851,6 +8854,8 @@
}
if (val1 && val2)
{
+ /* This would be a loss on a Harvard core, but adjacent_mem_locations()
+ will prevent it from happening. */
rtx ops[3];
ldm[0] = ops[0] = operands[4];
ops[1] = XEXP (XEXP (operands[2], 0), 0);
--- gcc-3.4.0/gcc/config/arm/arm.c.arm-ldm-peephole 2004-04-24 18:16:25.000000000 -0400
+++ gcc-3.4.0/gcc/config/arm/arm.c 2004-04-24 18:18:04.000000000 -0400
@@ -4593,8 +4593,11 @@
arith_adjacentmem pattern to output an overlong sequence. */
if (!const_ok_for_op (PLUS, val0) || !const_ok_for_op (PLUS, val1))
return 0;
-
- return (reg0 == reg1) && ((val1 - val0) == 4 || (val0 - val1) == 4);
+
+ /* For Harvard cores, only accept pairs where one offset is zero.
+ See comment in load_multiple_sequence. */
+ return (reg0 == reg1) && ((val1 - val0) == 4 || (val0 - val1) == 4)
+ && (!arm_ld_sched || val0 == 0 || val1 == 0);
}
return 0;
}
@@ -4838,6 +4841,11 @@
*load_offset = unsorted_offsets[order[0]];
}
+ /* For XScale a two-word LDM is a performance loss, so only do this if
+ size is more important. See comments in arm_gen_load_multiple. */
+ if (nops == 2 && arm_tune_xscale && !optimize_size)
+ return 0;
+
if (unsorted_offsets[order[0]] == 0)
return 1; /* ldmia */
@@ -5064,6 +5072,11 @@
*load_offset = unsorted_offsets[order[0]];
}
+ /* For XScale a two-word LDM is a performance loss, so only do this if
+ size is more important. See comments in arm_gen_load_multiple. */
+ if (nops == 2 && arm_tune_xscale && !optimize_size)
+ return 0;
+
if (unsorted_offsets[order[0]] == 0)
return 1; /* stmia */
--- gcc-3.4.0/gcc/genpeep.c.arm-ldm-peephole 2003-07-05 01:27:22.000000000 -0400
+++ gcc-3.4.0/gcc/genpeep.c 2004-04-24 18:18:04.000000000 -0400
@@ -381,6 +381,7 @@
printf ("#include \"recog.h\"\n");
printf ("#include \"except.h\"\n\n");
printf ("#include \"function.h\"\n\n");
+ printf ("#include \"flags.h\"\n\n");
printf ("#ifdef HAVE_peephole\n");
printf ("extern rtx peep_operand[];\n\n");

View File

@ -1,119 +0,0 @@
--- gcc-3.4.0/gcc/config/arm/arm.c.arm-ldm 2004-02-27 09:51:05.000000000 -0500
+++ gcc-3.4.0/gcc/config/arm/arm.c 2004-04-24 18:16:25.000000000 -0400
@@ -8520,6 +8520,26 @@
return_used_this_function = 0;
}
+/* Return the number (counting from 0) of
+ the least significant set bit in MASK. */
+
+#ifdef __GNUC__
+inline
+#endif
+static int
+number_of_first_bit_set (mask)
+ int mask;
+{
+ int bit;
+
+ for (bit = 0;
+ (mask & (1 << bit)) == 0;
+ ++bit)
+ continue;
+
+ return bit;
+}
+
const char *
arm_output_epilogue (rtx sibling)
{
@@ -8753,27 +8773,47 @@
saved_regs_mask |= (1 << PC_REGNUM);
}
- /* Load the registers off the stack. If we only have one register
- to load use the LDR instruction - it is faster. */
- if (saved_regs_mask == (1 << LR_REGNUM))
- {
- /* The exception handler ignores the LR, so we do
- not really need to load it off the stack. */
- if (eh_ofs)
- asm_fprintf (f, "\tadd\t%r, %r, #4\n", SP_REGNUM, SP_REGNUM);
- else
- asm_fprintf (f, "\tldr\t%r, [%r], #4\n", LR_REGNUM, SP_REGNUM);
- }
- else if (saved_regs_mask)
+ if (saved_regs_mask)
{
- if (saved_regs_mask & (1 << SP_REGNUM))
- /* Note - write back to the stack register is not enabled
- (ie "ldmfd sp!..."). We know that the stack pointer is
- in the list of registers and if we add writeback the
- instruction becomes UNPREDICTABLE. */
- print_multi_reg (f, "ldmfd\t%r", SP_REGNUM, saved_regs_mask);
+ /* Load the registers off the stack. If we only have one register
+ to load use the LDR instruction - it is faster. */
+ if (bit_count (saved_regs_mask) == 1)
+ {
+ int reg = number_of_first_bit_set (saved_regs_mask);
+
+ switch (reg)
+ {
+ case SP_REGNUM:
+ /* Mustn't use base writeback when loading SP. */
+ asm_fprintf (f, "\tldr\t%r, [%r]\n", SP_REGNUM, SP_REGNUM);
+ break;
+
+ case LR_REGNUM:
+ if (eh_ofs)
+ {
+ /* The exception handler ignores the LR, so we do
+ not really need to load it off the stack. */
+ asm_fprintf (f, "\tadd\t%r, %r, #4\n", SP_REGNUM, SP_REGNUM);
+ break;
+ }
+ /* else fall through */
+
+ default:
+ asm_fprintf (f, "\tldr\t%r, [%r], #4\n", reg, SP_REGNUM);
+ break;
+ }
+ }
else
- print_multi_reg (f, "ldmfd\t%r!", SP_REGNUM, saved_regs_mask);
+ {
+ if (saved_regs_mask & (1 << SP_REGNUM))
+ /* Note - write back to the stack register is not enabled
+ (ie "ldmfd sp!..."). We know that the stack pointer is
+ in the list of registers and if we add writeback the
+ instruction becomes UNPREDICTABLE. */
+ print_multi_reg (f, "ldmfd\t%r", SP_REGNUM, saved_regs_mask);
+ else
+ print_multi_reg (f, "ldmfd\t%r!", SP_REGNUM, saved_regs_mask);
+ }
}
if (current_function_pretend_args_size)
@@ -11401,22 +11441,6 @@
}
}
-/* Return the number (counting from 0) of
- the least significant set bit in MASK. */
-
-inline static int
-number_of_first_bit_set (int mask)
-{
- int bit;
-
- for (bit = 0;
- (mask & (1 << bit)) == 0;
- ++bit)
- continue;
-
- return bit;
-}
-
/* Generate code to return from a thumb function.
If 'reg_containing_return_addr' is -1, then the return address is
actually on the stack, at the stack pointer. */

View File

@ -1,9 +0,0 @@
--- gcc-3.4.0/gcc/config/arm/linux-elf.h.arm-tune 2004-01-31 01:18:11.000000000 -0500
+++ gcc-3.4.0/gcc/config/arm/linux-elf.h 2004-04-24 18:19:10.000000000 -0400
@@ -126,3 +126,6 @@
#define LINK_GCC_C_SEQUENCE_SPEC \
"%{static:--start-group} %G %L %{static:--end-group}%{!static:%G}"
+
+/* Tune for XScale. */
+#define TARGET_TUNE_DEFAULT TARGET_CPU_xscale

View File

@ -1,32 +0,0 @@
--- gcc-3.4.0/gcc/flow.c.reverse-compare 2004-02-27 22:39:19.000000000 -0500
+++ gcc-3.4.0/gcc/flow.c 2004-04-24 16:36:00.000000000 -0400
@@ -1843,6 +1843,7 @@
regset_head diff_head;
regset diff = INITIALIZE_REG_SET (diff_head);
basic_block bb_true, bb_false;
+ enum rtx_code reversed_code;
int i;
/* Identify the successor blocks. */
@@ -1889,8 +1890,11 @@
if (GET_CODE (reg) == REG
&& XEXP (cond_true, 1) == const0_rtx)
{
- rtx cond_false
- = gen_rtx_fmt_ee (reverse_condition (GET_CODE (cond_true)),
+ rtx cond_false;
+ reversed_code = reverse_condition (GET_CODE (cond_true));
+ if (reversed_code == UNKNOWN)
+ goto skip;
+ cond_false = gen_rtx_fmt_ee (reversed_code,
GET_MODE (cond_true), XEXP (cond_true, 0),
XEXP (cond_true, 1));
if (GET_CODE (XEXP (set_src, 1)) == PC)
@@ -1925,6 +1929,7 @@
}
}
+ skip:
FREE_REG_SET (diff);
}
#endif

View File

@ -1,22 +0,0 @@
--- gcc-3.4.1/libstdc++-v3/libmath/Makefile.am~ 2003-08-27 22:29:42.000000000 +0100
+++ gcc-3.4.1/libstdc++-v3/libmath/Makefile.am 2004-07-22 16:41:45.152130128 +0100
@@ -32,7 +32,7 @@
libmath_la_SOURCES = stubs.c
-AM_CPPFLAGS = $(CANADIAN_INCLUDES)
+AM_CPPFLAGS = $(CANADIAN_INCLUDES) -I$(toplevel_srcdir)/include
# Only compiling "C" sources in this directory.
LIBTOOL = @LIBTOOL@ --tag CC
--- gcc-3.4.1/libstdc++-v3/fragment.am.old 2004-07-22 18:24:58.024083656 +0100
+++ gcc-3.4.1/libstdc++-v3/fragment.am 2004-07-22 18:24:59.019932264 +0100
@@ -18,7 +18,7 @@
$(WARN_FLAGS) $(WERROR) -fdiagnostics-show-location=once
# -I/-D flags to pass when compiling.
-AM_CPPFLAGS = $(GLIBCXX_INCLUDES)
+AM_CPPFLAGS = $(GLIBCXX_INCLUDES) -I$(toplevel_srcdir)/include

View File

@ -0,0 +1,24 @@
require gcc-common.inc
SRC_URI = "${GNU_MIRROR}/gcc/gcc-${PV}/gcc-${PV}.tar.bz2 \
file://gcc34-reverse-compare.patch;patch=1 \
file://gcc34-arm-ldm.patch;patch=1 \
file://gcc34-arm-ldm-peephole.patch;patch=1 \
file://gcc34-arm-tune.patch;patch=1 \
file://gcc-3.4.1-uclibc-100-conf.patch;patch=1 \
file://gcc-3.4.1-uclibc-200-locale.patch;patch=1 \
file://gcc-3.4.0-arm-lib1asm.patch;patch=1 \
file://gcc-3.4.0-arm-nolibfloat.patch;patch=1 \
file://gcc-3.4.0-arm-bigendian.patch;patch=1 \
file://gcc-3.4.0-arm-bigendian-uclibc.patch;patch=1 \
file://GCC3.4.0VisibilityPatch.diff;patch=1 \
file://15342.patch;patch=1 \
file://jarfix.patch;patch=1 \
file://always-fixincperm.patch;patch=1 \
file://GCOV_PREFIX_STRIP-cross-profile_3.4.patch;patch=1 \
file://zecke-xgcc-cpp.patch;patch=1 \
file://gcc4-mtune-compat.patch;patch=1"
SRC_URI += "file://gcc34-configure.in.patch;patch=1"
SRC_URI += "file://gcc34-thumb-support.patch;patch=1"
SRC_URI_append_fail-fast = " file://zecke-no-host-includes.patch;patch=1 "

View File

@ -0,0 +1,389 @@
2005-05-04 Grigory Zagorodnev <grigory.zagorodnev@intel.com>
H.J. Lu <hongjiu.lu@intel.com>
Cross-profiling support: relocate .gcda files when
running at system other than executable been built on.
* gcov-io.c (gcov_open): When in libgcov library
use given data file relocation prefix to build file name.
* gcov-io.h (gcov_open): Updated proto to accept
data file relocation prefix.
* libgcov.c (create_file_directory): New function.
(gcov_prefix): New static variable to hold data file
relocation prefix.
(gcov_version): Use relocation prefix.
(gcov_exit): Always try to create directory for output
file. Relocate filename at each use.
(__gcov_init): Initialize directory relocation prefix
if required. Strip off leading directories from
the initial filename.
* tsystem.h: include filenames.h
(DIR_SEPARATOR): Macro copied from system.h.
(DIR_SEPARATOR_2): Likewise.
* doc/gcov.texi (Cross-profiling): New node documenting
cross-profiling management.
* doc/invoke.texi (-fprofile-arcs): xref to cross-profiling.
Grigory Zagorodnev
Intel Corporation
--- gcc-3.4/gcc/gcov-io.c.prefix 2004-02-26 13:54:47.000000000 -0800
+++ gcc-3.4/gcc/gcov-io.c 2005-05-04 11:46:01.000000000 -0700
@@ -55,13 +55,14 @@ static inline gcov_unsigned_t from_file
GCOV_LINKAGE int
#if IN_LIBGCOV
-gcov_open (const char *name)
+gcov_open (const char *prefix, const char *name)
#else
gcov_open (const char *name, int mode)
#endif
{
#if IN_LIBGCOV
const int mode = 0;
+ char *tmp;
#endif
#if GCOV_LOCKED
struct flock s_flock;
@@ -83,6 +84,14 @@ gcov_open (const char *name, int mode)
#if !IN_LIBGCOV
gcov_var.endian = 0;
#endif
+
+#if IN_LIBGCOV
+ /* Build complete filename with prefix */
+ tmp = alloca( strlen(prefix) + strlen(name) + 1);
+ *tmp = '\0';
+ name = strcat( strcat(tmp, prefix), name);
+#endif
+
#if GCOV_LOCKED
if (mode > 0)
fd = open (name, O_RDWR);
--- gcc-3.4/gcc/gcov-io.h.prefix 2005-05-02 15:37:58.000000000 -0700
+++ gcc-3.4/gcc/gcov-io.h 2005-05-04 11:46:01.000000000 -0700
@@ -502,7 +502,7 @@ GCOV_LINKAGE struct gcov_var
functions for writing. Your file may become corrupted if you break
these invariants. */
#if IN_LIBGCOV
-GCOV_LINKAGE int gcov_open (const char */*name*/) ATTRIBUTE_HIDDEN;
+GCOV_LINKAGE int gcov_open (const char */*prefix*/, const char */*name*/) ATTRIBUTE_HIDDEN;
#else
GCOV_LINKAGE int gcov_open (const char */*name*/, int /*direction*/);
GCOV_LINKAGE int gcov_magic (gcov_unsigned_t, gcov_unsigned_t);
--- gcc-3.4/gcc/libgcov.c.prefix 2004-02-26 13:54:47.000000000 -0800
+++ gcc-3.4/gcc/libgcov.c 2005-05-04 12:01:58.000000000 -0700
@@ -92,6 +92,70 @@ static struct gcov_info *gcov_list;
object file included in multiple programs. */
static gcov_unsigned_t gcov_crc32;
+/* Directory prefix to relocate coverage data file names */
+static char *gcov_prefix = 0;
+
+/* Level of dirs to strip off the initial filename to relocate */
+static int gcov_prefix_strip = 0;
+
+static int
+create_file_directory (const char *prefix, const char *filename)
+{
+ char *dname;
+ char sep, *r, *s;
+ size_t plen, flen;
+
+ /* Detect directory separator */
+ s = strrchr (prefix, DIR_SEPARATOR);
+#ifdef DIR_SEPARATOR_2
+ if (! s)
+ s = strrchr (prefix, DIR_SEPARATOR_2);
+#endif
+ if (s)
+ sep = *s;
+ else
+ sep = DIR_SEPARATOR;
+
+ /* join prefix and filename, split path */
+ plen = strlen(prefix);
+ flen = strlen(filename);
+ r = alloca(plen + flen + 1);
+ strncpy(r, prefix, plen);
+ strncpy(r + plen, filename, flen);
+ r[plen + flen] = '\0';
+ s = strrchr(r, sep);
+ if (s)
+ *(s + 1) = '\0';
+
+ if (access (r, F_OK) == 0)
+ return 0;
+
+ /* Skip consecutive separators. */
+ for (dname = r; *dname && *dname == sep; ++dname);
+ while (1)
+ {
+ char *s = strchr (dname, sep);
+ if (s == 0)
+ break;
+ *s = '\0';
+ /* Try to make directory if it doesn't already exist. */
+ if (access (r, F_OK) == -1
+ && mkdir (r, 0755) == -1
+ /* The directory might have been made by another process. */
+ && errno != EEXIST)
+ {
+ *s = sep;
+ fprintf (stderr, "profiling:%s:Cannot create directory\n", r);
+ return -1;
+ };
+ *s = sep;
+ /* Skip consecutive separators. */
+ for (dname = s + 1; *dname && *dname == sep; ++dname)
+ ;
+ }
+ return 0;
+}
+
static int
gcov_version (struct gcov_info *ptr, gcov_unsigned_t version)
{
@@ -103,8 +167,8 @@ gcov_version (struct gcov_info *ptr, gco
GCOV_UNSIGNED2STRING (e, GCOV_VERSION);
fprintf (stderr,
- "profiling:%s:Version mismatch - expected %.4s got %.4s\n",
- ptr->filename, e, v);
+ "profiling:%s%s:Version mismatch - expected %.4s got %.4s\n",
+ gcov_prefix, ptr->filename, e, v);
return 0;
}
return 1;
@@ -204,9 +268,14 @@ gcov_exit (void)
fi_stride &= ~(__alignof__ (struct gcov_fn_info) - 1);
}
- if (!gcov_open (gi_ptr->filename))
+ if (create_file_directory (gcov_prefix, gi_ptr->filename))
{
- fprintf (stderr, "profiling:%s:Cannot open\n", gi_ptr->filename);
+ fprintf (stderr, "profiling:%s%s:Skip\n", gcov_prefix, gi_ptr->filename);
+ continue;
+ }
+ else if (!gcov_open (gcov_prefix, gi_ptr->filename))
+ {
+ fprintf (stderr, "profiling:%s%s:Cannot open\n", gcov_prefix, gi_ptr->filename);
continue;
}
@@ -216,8 +285,8 @@ gcov_exit (void)
/* Merge data from file. */
if (tag != GCOV_DATA_MAGIC)
{
- fprintf (stderr, "profiling:%s:Not a gcov data file\n",
- gi_ptr->filename);
+ fprintf (stderr, "profiling:%s%s:Not a gcov data file\n",
+ gcov_prefix, gi_ptr->filename);
read_fatal:;
gcov_close ();
continue;
@@ -250,8 +319,8 @@ gcov_exit (void)
|| gcov_read_unsigned () != fi_ptr->checksum)
{
read_mismatch:;
- fprintf (stderr, "profiling:%s:Merge mismatch for %s\n",
- gi_ptr->filename,
+ fprintf (stderr, "profiling:%s%s:Merge mismatch for %s\n",
+ gcov_prefix, gi_ptr->filename,
f_ix + 1 ? "function" : "summaries");
goto read_fatal;
}
@@ -309,8 +378,8 @@ gcov_exit (void)
if (!gcov_is_eof ())
{
read_error:;
- fprintf (stderr, error < 0 ? "profiling:%s:Overflow merging\n"
- : "profiling:%s:Error merging\n", gi_ptr->filename);
+ fprintf (stderr, error < 0 ? "profiling:%s%s:Overflow merging\n"
+ : "profiling:%s%s:Error merging\n", gcov_prefix, gi_ptr->filename);
goto read_fatal;
}
rewrite:;
@@ -357,8 +426,8 @@ gcov_exit (void)
&& (!GCOV_LOCKED || cs_all->runs == cs_prg->runs)
&& memcmp (cs_all, cs_prg, sizeof (*cs_all)))
{
- fprintf (stderr, "profiling:%s:Invocation mismatch - some data files may have been removed%s",
- gi_ptr->filename, GCOV_LOCKED
+ fprintf (stderr, "profiling:%s%s:Invocation mismatch - some data files may have been removed%s",
+ gcov_prefix, gi_ptr->filename, GCOV_LOCKED
? "" : " or concurrent update without locking support");
all.checksum = ~0u;
}
@@ -418,9 +487,9 @@ gcov_exit (void)
gcov_write_summary (GCOV_TAG_PROGRAM_SUMMARY, &program);
if ((error = gcov_close ()))
fprintf (stderr, error < 0 ?
- "profiling:%s:Overflow writing\n" :
- "profiling:%s:Error writing\n",
- gi_ptr->filename);
+ "profiling:%s%s:Overflow writing\n" :
+ "profiling:%s%s:Error writing\n",
+ gcov_prefix, gi_ptr->filename);
}
}
@@ -430,11 +499,69 @@ gcov_exit (void)
void
__gcov_init (struct gcov_info *info)
{
+ /* Save initial filename pointer to calculate CRC. */
+ const char *ptr = info->filename;
+
if (!info->version)
return;
+
+ /* Initialize directory prefix if requred */
+ if (gcov_prefix == 0)
+ {
+ if ((gcov_prefix = getenv("GCOV_PREFIX")))
+ {
+ char *tmp;
+
+ /* Normalize prefix: take off trailing separator. */
+ tmp = gcov_prefix + strlen(gcov_prefix) - 1;
+ if (IS_DIR_SEPARATOR(*tmp))
+ *tmp = '\0';
+
+ /* Check if the level of dirs to strip off specified */
+ if ((tmp = getenv("GCOV_PREFIX_STRIP")))
+ {
+ gcov_prefix_strip = atoi (tmp);
+ /* Do not consider negative values. */
+ if (gcov_prefix_strip < 0)
+ gcov_prefix_strip = 0;
+ };
+ }
+ else
+ gcov_prefix = (char *) "";
+ };
+
+ /* Strip off leading directories from the initial filename */
+ if (gcov_prefix_strip > 0)
+ {
+ char sep, *s;
+ int level;
+ const char *fname = info->filename;
+
+ /* Detect directory separator */
+ s = strrchr (fname, DIR_SEPARATOR);
+#ifdef DIR_SEPARATOR_2
+ if (! s)
+ s = strrchr (fname, DIR_SEPARATOR_2);
+#endif
+ if (s)
+ sep = *s;
+ else
+ sep = DIR_SEPARATOR;
+
+ /* Skip selected directory levels */
+ for ( level = gcov_prefix_strip; level > 0; level--)
+ if ((s = strchr(fname + 1, sep)))
+ fname = s;
+ else
+ break;
+
+ /* From this point info block refers stripped file name and
+ further operations must add prefix to get complete name.*/
+ info->filename = fname;
+ };
+
if (gcov_version (info, info->version))
{
- const char *ptr = info->filename;
gcov_unsigned_t crc32 = gcov_crc32;
do
--- gcc-3.4/gcc/tsystem.h.prefix 2003-11-12 16:07:48.000000000 -0800
+++ gcc-3.4/gcc/tsystem.h 2005-05-04 12:12:08.000000000 -0700
@@ -106,4 +106,15 @@ extern int errno;
#define NULL 0
#endif
+/* Filename handling macros. */
+#include "filenames.h"
+
+/* These should be phased out in favor of IS_DIR_SEPARATOR, where possible. */
+#ifndef DIR_SEPARATOR
+# define DIR_SEPARATOR '/'
+# ifdef HAVE_DOS_BASED_FILE_SYSTEM
+# define DIR_SEPARATOR_2 '\\'
+# endif
+#endif
+
#endif /* ! GCC_TSYSTEM_H */
Index: gcc-3.4/gcc/doc/gcov.texi
===================================================================
RCS file: /cvsroot/gcc/gcc/gcc/doc/gcov.texi,v
retrieving revision 1.19.4.3
diff -u -p -r1.19.4.3 gcov.texi
--- gcc-3.4/gcc/doc/gcov.texi 14 Mar 2004 22:31:20 -0000 1.19.4.3
+++ gcc-3.4/gcc/doc/gcov.texi 4 May 2005 13:44:25 -0000
@@ -42,6 +42,7 @@ test code coverage in your programs.
* Invoking Gcov:: How to use gcov.
* Gcov and Optimization:: Using gcov with GCC optimization.
* Gcov Data Files:: The files used by gcov.
+* Cross-profiling:: Data files relocation.
@end menu
@node Gcov Intro
@@ -510,3 +511,36 @@ information.
The full details of the file format is specified in @file{gcov-io.h},
and functions provided in that header file should be used to access the
coverage files.
+
+@node Cross-profiling
+@section Data files relocation to support cross-profiling
+
+Running the program will cause profile output to be generated. For each
+source file compiled with @option{-fprofile-arcs}, an accompanying @file{.gcda}
+file will be placed in the object file directory. That implicitly requires
+running the program at the same system as it was build or having same
+absolute directory structure on the target system (program will try
+to create needed directory structure).
+
+To support cross-profiling, program compiled with @option{-fprofile-arcs}
+performs data file relocation basing on two environment variables:
+
+@itemize @bullet
+@item
+GCOV_PREFIX contains the prefix to add to the absolute paths
+in the object file.
+
+@item
+GCOV_PREFIX_STRIP indicates the how many initial directory names to strip off
+the hardwired absolute paths. Default value is 0.
+@end itemize
+
+For example, if object file @file{/user/build/foo.o} was build with
+@option{-fprofile-arcs}, the final executable will try to create data file
+@file{/user/build/foo.gcda} when running at the target system and will
+fail if corresponding directory does not exists and is not allowed to create.
+
+In this case, manipulating environment variables you can relocate data file
+to the suitable local directory. For our example, setting @samp{GCOV_PREFIX=/target/run}
+and @samp{GCOV_PREFIX_STRIP=1} values will force use of @file{/target/run/build/foo.gcda}
+file name.
Index: gcc-3.4/gcc/doc/invoke.texi
===================================================================
RCS file: /cvsroot/gcc/gcc/gcc/doc/invoke.texi,v
retrieving revision 1.390.2.40
diff -u -p -r1.390.2.40 invoke.texi
--- gcc-3.4/gcc/doc/invoke.texi 22 Apr 2005 06:49:59 -0000 1.390.2.40
+++ gcc-3.4/gcc/doc/invoke.texi 4 May 2005 13:44:25 -0000
@@ -3158,6 +3158,7 @@ explicitly specified and it is not the f
the basename of the source file. In both cases any suffix is removed
(e.g. @file{foo.gcda} for input file @file{dir/foo.c}, or
@file{dir/foo.gcda} for output file specified as @option{-o dir/foo.o}).
+@xref{Cross-profiling}.
@itemize

View File

@ -0,0 +1,32 @@
Index: gcc-3.4.4/gcc/c-incpath.c
===================================================================
--- gcc-3.4.4.orig/gcc/c-incpath.c 2004-05-31 12:37:47.000000000 +0200
+++ gcc-3.4.4/gcc/c-incpath.c 2006-05-15 20:07:31.000000000 +0200
@@ -328,6 +328,27 @@
else
heads[chain] = p;
tails[chain] = p;
+
+
+#ifdef CROSS_COMPILE
+ /* A common error when cross compiling is including
+ host headers. This code below will try to fail fast
+ for cross compiling. Currently we consider /usr/include,
+ /opt/include and /sw/include as harmful. */
+ {
+ /* printf("Adding Path: %s\n", p->name ); */
+ if( strstr(p->name, "/usr/include" ) == p->name ) {
+ fprintf(stderr, _("CROSS COMPILE Badness: /usr/include in INCLUDEPATH: %s\n"), p->name);
+ abort();
+ } else if( strstr(p->name, "/sw/include") == p->name ) {
+ fprintf(stderr, _("CROSS COMPILE Badness: /sw/include in INCLUDEPATH: %s\n"), p->name);
+ abort();
+ } else if( strstr(p->name, "/opt/include") == p->name ) {
+ fprintf(stderr, _("CROSS COMPILE Badness: /opt/include in INCLUDEPATH: %s\n"), p->name);
+ abort();
+ }
+ }
+#endif
}
/* Exported function to handle include chain merging, duplicate

View File

@ -0,0 +1,13 @@
Index: gcc-3.4.4/Makefile.in
===================================================================
--- gcc-3.4.4.orig/Makefile.in 2005-05-19 11:58:00.000000000 +0200
+++ gcc-3.4.4/Makefile.in 2006-08-06 13:08:14.000000000 +0200
@@ -21964,6 +21964,8 @@
AS="$(AS_FOR_TARGET)"; export AS; \
CC="$(CC_FOR_TARGET)"; export CC; \
CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \
+ CPP="$(CC_FOR_TARGET) -E"; export CCP; \
+ CPPFLAGS=""; export CPPFLAGS; \
CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
CPPFLAGS="$(CFLAGS_FOR_TARGET)"; export CPPFLAGS; \
CXX_FOR_TARGET="$(RAW_CXX_FOR_TARGET)"; export CXX_FOR_TARGET; \

View File

@ -0,0 +1,29 @@
require gcc-common.inc
DEPENDS = "mpfr gmp"
SRC_URI = "${GNU_MIRROR}/gcc/gcc-${PV}/gcc-${PV}.tar.bz2 \
file://arm-nolibfloat.patch;patch=1 \
file://arm-softfloat.patch;patch=1 \
file://ldflags.patch;patch=1 \
file://GCOV_PREFIX_STRIP-cross-profile_4.1.patch;patch=1 \
file://zecke-xgcc-cpp.patch;patch=1 "
# uclibc patches below
SRC_URI_append = " file://100-uclibc-conf.patch;patch=1 \
file://200-uclibc-locale.patch;patch=1 \
file://301-missing-execinfo_h.patch;patch=1 \
file://302-c99-snprintf.patch;patch=1 \
file://303-c99-complex-ugly-hack.patch;patch=1 \
file://800-arm-bigendian.patch;patch=1 \
file://zecke-host-cpp-ac-hack.patch;patch=1 \
file://gcc-4.0.2-atmel.0.99.2.patch;patch=1 \
"
SRC_URI_append_fail-fast = " file://zecke-no-host-includes.patch;patch=1 "
# Language Overrides
FORTRAN = ""
EXTRA_OECONF += "--disable-libssp"

View File

@ -0,0 +1,371 @@
2005-05-04 Grigory Zagorodnev <grigory.zagorodnev@intel.com>
H.J. Lu <hongjiu.lu@intel.com>
* gcov-io.c (gcov_open): When in libgcov library
use given data file relocation prefix to build file name.
* gcov-io.h (gcov_open): Updated proto to accept
data file relocation prefix.
* libgcov.c (create_file_directory): New function.
(gcov_prefix): New static variable to hold data file
relocation prefix.
(gcov_version): Use relocation prefix.
(gcov_exit): Always try to create directory for output
file. Relocate filename at each use.
(__gcov_init): Initialize directory relocation prefix
if required. Strip off leading directories from
the initial filename.
* tsystem.h: include filenames.h
(DIR_SEPARATOR): Macro copied from system.h.
(DIR_SEPARATOR_2): Likewise.
* doc/gcov.texi (Cross-profiling): New node documenting
cross-profiling management.
* doc/invoke.texi (-fprofile-arcs): xref to cross-profiling.
--- gcc-4/gcc/doc/gcov.texi.prefix 2005-03-28 11:56:34.000000000 -0800
+++ gcc-4/gcc/doc/gcov.texi 2005-05-04 15:07:44.000000000 -0700
@@ -42,6 +42,7 @@ test code coverage in your programs.
* Invoking Gcov:: How to use gcov.
* Gcov and Optimization:: Using gcov with GCC optimization.
* Gcov Data Files:: The files used by gcov.
+* Cross-profiling:: Data files relocation.
@end menu
@node Gcov Intro
@@ -531,3 +532,36 @@ information.
The full details of the file format is specified in @file{gcov-io.h},
and functions provided in that header file should be used to access the
coverage files.
+
+@node Cross-profiling
+@section Data files relocation to support cross-profiling
+
+Running the program will cause profile output to be generated. For each
+source file compiled with @option{-fprofile-arcs}, an accompanying @file{.gcda}
+file will be placed in the object file directory. That implicitly requires
+running the program at the same system as it was build or having same
+absolute directory structure on the target system (program will try
+to create needed directory structure).
+
+To support cross-profiling, program compiled with @option{-fprofile-arcs}
+performs data file relocation basing on two environment variables:
+
+@itemize @bullet
+@item
+GCOV_PREFIX contains the prefix to add to the absolute paths
+in the object file.
+
+@item
+GCOV_PREFIX_STRIP indicates the how many initial directory names to strip off
+the hardwired absolute paths. Default value is 0.
+@end itemize
+
+For example, if object file @file{/user/build/foo.o} was build with
+@option{-fprofile-arcs}, the final executable will try to create data file
+@file{/user/build/foo.gcda} when running at the target system and will
+fail if corresponding directory does not exists and is not allowed to create.
+
+In this case, manipulating environment variables you can relocate data file
+to the suitable local directory. For our example, setting @samp{GCOV_PREFIX=/target/run}
+and @samp{GCOV_PREFIX_STRIP=1} values will force use of @file{/target/run/build/foo.gcda}
+file name.
--- gcc-4/gcc/doc/invoke.texi.prefix 2005-05-04 11:21:00.000000000 -0700
+++ gcc-4/gcc/doc/invoke.texi 2005-05-04 15:07:44.000000000 -0700
@@ -3420,6 +3420,7 @@ explicitly specified and it is not the f
the basename of the source file. In both cases any suffix is removed
(e.g.@: @file{foo.gcda} for input file @file{dir/foo.c}, or
@file{dir/foo.gcda} for output file specified as @option{-o dir/foo.o}).
+@xref{Cross-profiling}.
@cindex @command{gcov}
@item --coverage
--- gcc-4/gcc/gcov-io.c.prefix 2005-04-28 16:11:30.000000000 -0700
+++ gcc-4/gcc/gcov-io.c 2005-05-04 20:02:35.000000000 -0700
@@ -55,13 +55,14 @@ static inline gcov_unsigned_t from_file
GCOV_LINKAGE int
#if IN_LIBGCOV
-gcov_open (const char *name)
+gcov_open (const char *prefix, const char *name)
#else
gcov_open (const char *name, int mode)
#endif
{
#if IN_LIBGCOV
const int mode = 0;
+ char *tmp;
#endif
#if GCOV_LOCKED
struct flock s_flock;
@@ -82,6 +83,13 @@ gcov_open (const char *name, int mode)
#if !IN_LIBGCOV
gcov_var.endian = 0;
#endif
+
+#if IN_LIBGCOV
+ /* Build complete filename with prefix */
+ tmp = alloca (strlen (prefix) + strlen (name) + 1);
+ name = strcat (strcpy (tmp, prefix), name);
+#endif
+
#if GCOV_LOCKED
if (mode > 0)
fd = open (name, O_RDWR);
--- gcc-4/gcc/gcov-io.h.prefix 2005-05-02 17:43:08.000000000 -0700
+++ gcc-4/gcc/gcov-io.h 2005-05-04 15:07:44.000000000 -0700
@@ -515,7 +515,7 @@ GCOV_LINKAGE struct gcov_var
functions for writing. Your file may become corrupted if you break
these invariants. */
#if IN_LIBGCOV
-GCOV_LINKAGE int gcov_open (const char */*name*/) ATTRIBUTE_HIDDEN;
+GCOV_LINKAGE int gcov_open (const char */*prefix*/, const char */*name*/) ATTRIBUTE_HIDDEN;
#else
GCOV_LINKAGE int gcov_open (const char */*name*/, int /*direction*/);
GCOV_LINKAGE int gcov_magic (gcov_unsigned_t, gcov_unsigned_t);
--- gcc-4/gcc/libgcov.c.prefix 2005-04-28 16:11:30.000000000 -0700
+++ gcc-4/gcc/libgcov.c 2005-05-04 15:07:44.000000000 -0700
@@ -92,6 +92,70 @@ static struct gcov_info *gcov_list;
object file included in multiple programs. */
static gcov_unsigned_t gcov_crc32;
+/* Directory prefix to relocate coverage data file names */
+static char *gcov_prefix = 0;
+
+/* Level of dirs to strip off the initial filename to relocate */
+static int gcov_prefix_strip = 0;
+
+static int
+create_file_directory (const char *prefix, const char *filename)
+{
+ char *dname;
+ char sep, *r, *s;
+ size_t plen, flen;
+
+ /* Detect directory separator */
+ s = strrchr (prefix, DIR_SEPARATOR);
+#ifdef DIR_SEPARATOR_2
+ if (! s)
+ s = strrchr (prefix, DIR_SEPARATOR_2);
+#endif
+ if (s)
+ sep = *s;
+ else
+ sep = DIR_SEPARATOR;
+
+ /* join prefix and filename, split path */
+ plen = strlen(prefix);
+ flen = strlen(filename);
+ r = alloca(plen + flen + 1);
+ strncpy(r, prefix, plen);
+ strncpy(r + plen, filename, flen);
+ r[plen + flen] = '\0';
+ s = strrchr(r, sep);
+ if (s)
+ *(s + 1) = '\0';
+
+ if (access (r, F_OK) == 0)
+ return 0;
+
+ /* Skip consecutive separators. */
+ for (dname = r; *dname && *dname == sep; ++dname);
+ while (1)
+ {
+ char *s = strchr (dname, sep);
+ if (s == 0)
+ break;
+ *s = '\0';
+ /* Try to make directory if it doesn't already exist. */
+ if (access (r, F_OK) == -1
+ && mkdir (r, 0755) == -1
+ /* The directory might have been made by another process. */
+ && errno != EEXIST)
+ {
+ *s = sep;
+ fprintf (stderr, "profiling:%s:Cannot create directory\n", r);
+ return -1;
+ };
+ *s = sep;
+ /* Skip consecutive separators. */
+ for (dname = s + 1; *dname && *dname == sep; ++dname)
+ ;
+ }
+ return 0;
+}
+
static int
gcov_version (struct gcov_info *ptr, gcov_unsigned_t version)
{
@@ -103,8 +167,8 @@ gcov_version (struct gcov_info *ptr, gco
GCOV_UNSIGNED2STRING (e, GCOV_VERSION);
fprintf (stderr,
- "profiling:%s:Version mismatch - expected %.4s got %.4s\n",
- ptr->filename, e, v);
+ "profiling:%s%s:Version mismatch - expected %.4s got %.4s\n",
+ gcov_prefix, ptr->filename, e, v);
return 0;
}
return 1;
@@ -205,9 +269,16 @@ gcov_exit (void)
fi_stride &= ~(__alignof__ (struct gcov_fn_info) - 1);
}
- if (!gcov_open (gi_ptr->filename))
+ if (create_file_directory (gcov_prefix, gi_ptr->filename))
+ {
+ fprintf (stderr, "profiling:%s%s:Skip\n", gcov_prefix,
+ gi_ptr->filename);
+ continue;
+ }
+ else if (!gcov_open (gcov_prefix, gi_ptr->filename))
{
- fprintf (stderr, "profiling:%s:Cannot open\n", gi_ptr->filename);
+ fprintf (stderr, "profiling:%s%s:Cannot open\n", gcov_prefix,
+ gi_ptr->filename);
continue;
}
@@ -217,8 +288,8 @@ gcov_exit (void)
/* Merge data from file. */
if (tag != GCOV_DATA_MAGIC)
{
- fprintf (stderr, "profiling:%s:Not a gcov data file\n",
- gi_ptr->filename);
+ fprintf (stderr, "profiling:%s%s:Not a gcov data file\n",
+ gcov_prefix, gi_ptr->filename);
goto read_fatal;
}
length = gcov_read_unsigned ();
@@ -245,8 +316,8 @@ gcov_exit (void)
|| gcov_read_unsigned () != fi_ptr->checksum)
{
read_mismatch:;
- fprintf (stderr, "profiling:%s:Merge mismatch for %s\n",
- gi_ptr->filename,
+ fprintf (stderr, "profiling:%s%s:Merge mismatch for %s\n",
+ gcov_prefix, gi_ptr->filename,
f_ix + 1 ? "function" : "summaries");
goto read_fatal;
}
@@ -305,7 +376,8 @@ gcov_exit (void)
read_error:;
fprintf (stderr, error < 0 ? "profiling:%s:Overflow merging\n"
- : "profiling:%s:Error merging\n", gi_ptr->filename);
+ : "profiling:%s%s:Error merging\n", gcov_prefix,
+ gi_ptr->filename);
read_fatal:;
gcov_close ();
@@ -355,8 +427,8 @@ gcov_exit (void)
&& (!GCOV_LOCKED || cs_all->runs == cs_prg->runs)
&& memcmp (cs_all, cs_prg, sizeof (*cs_all)))
{
- fprintf (stderr, "profiling:%s:Invocation mismatch - some data files may have been removed%s",
- gi_ptr->filename, GCOV_LOCKED
+ fprintf (stderr, "profiling:%s%s:Invocation mismatch - some data files may have been removed%s",
+ gcov_prefix, gi_ptr->filename, GCOV_LOCKED
? "" : " or concurrent update without locking support");
all.checksum = ~0u;
}
@@ -419,9 +491,9 @@ gcov_exit (void)
gcov_write_unsigned (0);
if ((error = gcov_close ()))
fprintf (stderr, error < 0 ?
- "profiling:%s:Overflow writing\n" :
- "profiling:%s:Error writing\n",
- gi_ptr->filename);
+ "profiling:%s%s:Overflow writing\n" :
+ "profiling:%s%s:Error writing\n",
+ gcov_prefix, gi_ptr->filename);
}
}
@@ -431,11 +503,69 @@ gcov_exit (void)
void
__gcov_init (struct gcov_info *info)
{
+ /* Save initial filename pointer to calculate CRC. */
+ const char *ptr = info->filename;
+
if (!info->version)
return;
+
+ /* Initialize directory prefix if requred */
+ if (gcov_prefix == 0)
+ {
+ if ((gcov_prefix = getenv("GCOV_PREFIX")))
+ {
+ char *tmp;
+
+ /* Normalize prefix: take off trailing separator. */
+ tmp = gcov_prefix + strlen(gcov_prefix) - 1;
+ if (IS_DIR_SEPARATOR(*tmp))
+ *tmp = '\0';
+
+ /* Check if the level of dirs to strip off specified */
+ if ((tmp = getenv("GCOV_PREFIX_STRIP")))
+ {
+ gcov_prefix_strip = atoi (tmp);
+ /* Do not consider negative values. */
+ if (gcov_prefix_strip < 0)
+ gcov_prefix_strip = 0;
+ };
+ }
+ else
+ gcov_prefix = (char *) "";
+ };
+
+ /* Strip off leading directories from the initial filename */
+ if (gcov_prefix_strip > 0)
+ {
+ char sep, *s;
+ int level;
+ const char *fname = info->filename;
+
+ /* Detect directory separator */
+ s = strrchr (fname, DIR_SEPARATOR);
+#ifdef DIR_SEPARATOR_2
+ if (! s)
+ s = strrchr (fname, DIR_SEPARATOR_2);
+#endif
+ if (s)
+ sep = *s;
+ else
+ sep = DIR_SEPARATOR;
+
+ /* Skip selected directory levels */
+ for ( level = gcov_prefix_strip; level > 0; level--)
+ if ((s = strchr(fname + 1, sep)))
+ fname = s;
+ else
+ break;
+
+ /* From this point info block refers stripped file name and
+ further operations must add prefix to get complete name.*/
+ info->filename = fname;
+ };
+
if (gcov_version (info, info->version))
{
- const char *ptr = info->filename;
gcov_unsigned_t crc32 = gcov_crc32;
do
--- gcc-4/gcc/tsystem.h.prefix 2005-03-29 16:06:26.000000000 -0800
+++ gcc-4/gcc/tsystem.h 2005-05-04 15:07:44.000000000 -0700
@@ -131,4 +131,15 @@ extern int errno;
unreachable default case of a switch. Do not use gcc_assert(0). */
#define gcc_unreachable() (abort ())
+/* Filename handling macros. */
+#include "filenames.h"
+
+/* These should be phased out in favor of IS_DIR_SEPARATOR, where possible. */
+#ifndef DIR_SEPARATOR
+# define DIR_SEPARATOR '/'
+# ifdef HAVE_DOS_BASED_FILE_SYSTEM
+# define DIR_SEPARATOR_2 '\\'
+# endif
+#endif
+
#endif /* ! GCC_TSYSTEM_H */

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,10 @@
--- /tmp/configure 2007-06-02 09:26:29.000000000 +0200
+++ gcc-4.0.2/libstdc++-v3/configure 2007-06-02 09:26:40.135215000 +0200
@@ -101472,7 +101472,6 @@
_ACEOF
fi
-done
fi

View File

@ -1,9 +1,9 @@
Index: gcc-4.1.1/Makefile.in
Index: gcc-4.0.2/Makefile.in
===================================================================
--- gcc-4.1.1.orig/Makefile.in 2006-08-06 13:32:44.000000000 +0200
+++ gcc-4.1.1/Makefile.in 2006-08-06 13:32:46.000000000 +0200
@@ -194,6 +194,7 @@
AS="$(COMPILER_AS_FOR_TARGET)"; export AS; \
--- gcc-4.0.2.orig/Makefile.in 2006-08-06 13:17:09.000000000 +0200
+++ gcc-4.0.2/Makefile.in 2006-08-06 13:18:35.000000000 +0200
@@ -197,6 +197,7 @@
AS="$(AS_FOR_TARGET)"; export AS; \
CC="$(CC_FOR_TARGET)"; export CC; \
CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \
+ CPP="$(CC_FOR_TARGET) -E"; export CCP; \

View File

@ -1,544 +0,0 @@
--- gcc-4.1.0/gcc/config/t-linux-uclibc
+++ gcc-4.1.0/gcc/config/t-linux-uclibc
@@ -0,0 +1,5 @@
+# Remove glibc specific files added in t-linux
+SHLIB_MAPFILES := $(filter-out $(srcdir)/config/libgcc-glibc.ver, $(SHLIB_MAPFILES))
+
+# Use unwind-dw2-fde instead of unwind-dw2-fde-glibc
+LIB2ADDEH := $(subst unwind-dw2-fde-glibc.c,unwind-dw2-fde.c,$(LIB2ADDEH))
--- gcc-4.1.0/gcc/config.gcc
+++ gcc-4.1.0/gcc/config.gcc
@@ -1887,7 +1887,7 @@ s390x-ibm-tpf*)
;;
sh-*-elf* | sh[12346l]*-*-elf* | sh*-*-kaos* | \
sh-*-symbianelf* | sh[12346l]*-*-symbianelf* | \
- sh-*-linux* | sh[346lbe]*-*-linux* | \
+ sh*-*-linux* | sh[346lbe]*-*-linux* | \
sh-*-netbsdelf* | shl*-*-netbsdelf* | sh5-*-netbsd* | sh5l*-*-netbsd* | \
sh64-*-netbsd* | sh64l*-*-netbsd*)
tmake_file="${tmake_file} sh/t-sh sh/t-elf"
@@ -2341,6 +2341,12 @@ m32c-*-elf*)
;;
esac
+# Rather than hook into each target, just do it after all the linux
+# targets have been processed
+case ${target} in
+*-linux-uclibc*) tm_defines="${tm_defines} USE_UCLIBC" ; tmake_file="${tmake_file} t-linux-uclibc"
+esac
+
case ${target} in
i[34567]86-*-linux*aout* | i[34567]86-*-linux*libc1)
tmake_file="${tmake_file} i386/t-gmm_malloc"
--- gcc-4.1.0/boehm-gc/configure
+++ gcc-4.1.0/boehm-gc/configure
@@ -4320,6 +4320,11 @@ linux-gnu*)
lt_cv_deplibs_check_method=pass_all
;;
+linux-uclibc*)
+ lt_cv_deplibs_check_method=pass_all
+ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
+ ;;
+
netbsd* | knetbsd*-gnu)
if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
--- gcc-4.1.0/configure
+++ gcc-4.1.0/configure
@@ -1133,7 +1133,7 @@ no)
;;
"")
case "${target}" in
- *-*-linux*-gnu | *-*-gnu* | *-*-k*bsd*-gnu)
+ *-*-linux*-gnu | *-*-gnu* | *-*-k*bsd*-gnu | *-*-linux-uclibc*)
# Enable libmudflap by default in GNU and friends.
;;
*-*-freebsd*)
--- gcc-4.1.0/configure.in
+++ gcc-4.1.0/configure.in
@@ -341,7 +341,7 @@ no)
;;
"")
case "${target}" in
- *-*-linux*-gnu | *-*-gnu* | *-*-k*bsd*-gnu)
+ *-*-linux*-gnu | *-*-gnu* | *-*-k*bsd*-gnu | *-*-linux-uclibc*)
# Enable libmudflap by default in GNU and friends.
;;
*-*-freebsd*)
--- gcc-4.1.0/contrib/regression/objs-gcc.sh
+++ gcc-4.1.0/contrib/regression/objs-gcc.sh
@@ -105,6 +105,10 @@ if [ $H_REAL_TARGET = $H_REAL_HOST -a $H
then
make all-gdb all-dejagnu all-ld || exit 1
make install-gdb install-dejagnu install-ld || exit 1
+elif [ $H_REAL_TARGET = $H_REAL_HOST -a $H_REAL_TARGET = i686-pc-linux-uclibc ]
+ then
+ make all-gdb all-dejagnu all-ld || exit 1
+ make install-gdb install-dejagnu install-ld || exit 1
elif [ $H_REAL_TARGET = $H_REAL_HOST ] ; then
make bootstrap || exit 1
make install || exit 1
--- gcc-4.1.0/gcc/config/alpha/linux-elf.h
+++ gcc-4.1.0/gcc/config/alpha/linux-elf.h
@@ -27,7 +27,11 @@ Boston, MA 02110-1301, USA. */
#define SUBTARGET_EXTRA_SPECS \
{ "elf_dynamic_linker", ELF_DYNAMIC_LINKER },
+#if defined USE_UCLIBC
+#define ELF_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
+#else
#define ELF_DYNAMIC_LINKER "/lib/ld-linux.so.2"
+#endif
#define LINK_SPEC "-m elf64alpha %{G*} %{relax:-relax} \
%{O*:-O3} %{!O*:-O1} \
--- gcc-4.1.0/gcc/config/arm/linux-elf.h
+++ gcc-4.1.0/gcc/config/arm/linux-elf.h
@@ -51,7 +51,11 @@
#define LIBGCC_SPEC "%{msoft-float:-lfloat} %{mfloat-abi=soft*:-lfloat} -lgcc"
+#ifdef USE_UCLIBC
+#define LINUX_TARGET_INTERPRETER "/lib/ld-uClibc.so.0"
+#else
#define LINUX_TARGET_INTERPRETER "/lib/ld-linux.so.2"
+#endif
#define LINUX_TARGET_LINK_SPEC "%{h*} %{version:-v} \
%{b} \
--- gcc-4.1.0/gcc/config/cris/linux.h
+++ gcc-4.1.0/gcc/config/cris/linux.h
@@ -73,6 +73,25 @@ Boston, MA 02110-1301, USA. */
#undef CRIS_DEFAULT_CPU_VERSION
#define CRIS_DEFAULT_CPU_VERSION CRIS_CPU_NG
+#ifdef USE_UCLIBC
+
+#undef CRIS_SUBTARGET_VERSION
+#define CRIS_SUBTARGET_VERSION " - cris-axis-linux-uclibc"
+
+#undef CRIS_LINK_SUBTARGET_SPEC
+#define CRIS_LINK_SUBTARGET_SPEC \
+ "-mcrislinux\
+ -rpath-link include/asm/../..%s\
+ %{shared} %{static}\
+ %{symbolic:-Bdynamic} %{shlib:-Bdynamic} %{static:-Bstatic}\
+ %{!shared: \
+ %{!static: \
+ %{rdynamic:-export-dynamic} \
+ %{!dynamic-linker:-dynamic-linker /lib/ld-uClibc.so.0}}} \
+ %{!r:%{O2|O3: --gc-sections}}"
+
+#else /* USE_UCLIBC */
+
#undef CRIS_SUBTARGET_VERSION
#define CRIS_SUBTARGET_VERSION " - cris-axis-linux-gnu"
@@ -87,6 +106,8 @@ Boston, MA 02110-1301, USA. */
%{!shared:%{!static:%{rdynamic:-export-dynamic}}}\
%{!r:%{O2|O3: --gc-sections}}"
+#endif /* USE_UCLIBC */
+
/* Node: Run-time Target */
--- gcc-4.1.0/gcc/config/i386/linux.h
+++ gcc-4.1.0/gcc/config/i386/linux.h
@@ -107,6 +107,11 @@ Boston, MA 02110-1301, USA. */
#define LINK_EMULATION "elf_i386"
#define DYNAMIC_LINKER "/lib/ld-linux.so.2"
+#if defined USE_UCLIBC
+#undef DYNAMIC_LINKER
+#define DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
+#endif
+
#undef SUBTARGET_EXTRA_SPECS
#define SUBTARGET_EXTRA_SPECS \
{ "link_emulation", LINK_EMULATION },\
--- gcc-4.1.0/gcc/config/i386/linux64.h
+++ gcc-4.1.0/gcc/config/i386/linux64.h
@@ -54,14 +54,21 @@ Boston, MA 02110-1301, USA. */
When the -shared link option is used a final link is not being
done. */
+#ifdef USE_UCLIBC
+#define ELF32_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
+#define ELF64_DYNAMIC_LINKER "/lib/ld64-uClibc.so.0"
+#else
+#define ELF32_DYNAMIC_LINKER "/lib/ld-linux.so.2"
+#define ELF64_DYNAMIC_LINKER "/lib64/ld-linux-x86-64.so.2"
+#endif
#undef LINK_SPEC
#define LINK_SPEC "%{!m32:-m elf_x86_64} %{m32:-m elf_i386} \
%{shared:-shared} \
%{!shared: \
%{!static: \
%{rdynamic:-export-dynamic} \
- %{m32:%{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} \
- %{!m32:%{!dynamic-linker:-dynamic-linker /lib64/ld-linux-x86-64.so.2}}} \
+ %{m32:%{!dynamic-linker:-dynamic-linker " ELF32_DYNAMIC_LINKER "}} \
+ %{!m32:%{!dynamic-linker:-dynamic-linker " ELF64_DYNAMIC_LINKER "}}} \
%{static:-static}}"
/* Similar to standard Linux, but adding -ffast-math support. */
--- gcc-4.1.0/gcc/config/ia64/linux.h
+++ gcc-4.1.0/gcc/config/ia64/linux.h
@@ -37,13 +37,18 @@ do { \
/* Define this for shared library support because it isn't in the main
linux.h file. */
+#ifdef USE_UCLIBC
+#define ELF_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
+#else
+#define ELF_DYNAMIC_LINKER "/lib/ld-linux-ia64.so.2"
+#endif
#undef LINK_SPEC
#define LINK_SPEC "\
%{shared:-shared} \
%{!shared: \
%{!static: \
%{rdynamic:-export-dynamic} \
- %{!dynamic-linker:-dynamic-linker /lib/ld-linux-ia64.so.2}} \
+ %{!dynamic-linker:-dynamic-linker " ELF_DYNAMIC_LINKER "}} \
%{static:-static}}"
--- gcc-4.1.0/gcc/config/m68k/linux.h
+++ gcc-4.1.0/gcc/config/m68k/linux.h
@@ -123,12 +123,17 @@ Boston, MA 02110-1301, USA. */
/* If ELF is the default format, we should not use /lib/elf. */
+#ifdef USE_UCLIBC
+#define ELF_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
+#else
+#define ELF_DYNAMIC_LINKER "/lib/ld.so.1"
+#endif
#undef LINK_SPEC
#define LINK_SPEC "-m m68kelf %{shared} \
%{!shared: \
%{!static: \
%{rdynamic:-export-dynamic} \
- %{!dynamic-linker*:-dynamic-linker /lib/ld.so.1}} \
+ %{!dynamic-linker*:-dynamic-linker " ELF_DYNAMIC_LINKER "}} \
%{static}}"
/* For compatibility with linux/a.out */
--- gcc-4.1.0/gcc/config/mips/linux.h
+++ gcc-4.1.0/gcc/config/mips/linux.h
@@ -105,6 +105,11 @@ Boston, MA 02110-1301, USA. */
/* Borrowed from sparc/linux.h */
#undef LINK_SPEC
+#ifdef USE_UCLIBC
+#define ELF_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
+#else
+#define ELF_DYNAMIC_LINKER "/lib/ld.so.1"
+#endif
#define LINK_SPEC \
"%(endian_spec) \
%{shared:-shared} \
@@ -112,7 +117,7 @@ Boston, MA 02110-1301, USA. */
%{!ibcs: \
%{!static: \
%{rdynamic:-export-dynamic} \
- %{!dynamic-linker:-dynamic-linker /lib/ld.so.1}} \
+ %{!dynamic-linker:-dynamic-linker " ELF_DYNAMIC_LINKER "}} \
%{static:-static}}}"
#undef SUBTARGET_ASM_SPEC
--- gcc-4.1.0/gcc/config/pa/pa-linux.h
+++ gcc-4.1.0/gcc/config/pa/pa-linux.h
@@ -49,13 +49,18 @@ Boston, MA 02110-1301, USA. */
/* Define this for shared library support because it isn't in the main
linux.h file. */
+#ifdef USE_UCLIBC
+#define ELF_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
+#else
+#define ELF_DYNAMIC_LINKER "/lib/ld.so.1"
+#endif
#undef LINK_SPEC
#define LINK_SPEC "\
%{shared:-shared} \
%{!shared: \
%{!static: \
%{rdynamic:-export-dynamic} \
- %{!dynamic-linker:-dynamic-linker /lib/ld.so.1}} \
+ %{!dynamic-linker:-dynamic-linker " ELF_DYNAMIC_LINKER "}} \
%{static:-static}}"
/* glibc's profiling functions don't need gcc to allocate counters. */
--- gcc-4.1.0/gcc/config/rs6000/linux.h
+++ gcc-4.1.0/gcc/config/rs6000/linux.h
@@ -72,7 +72,11 @@
#define LINK_START_DEFAULT_SPEC "%(link_start_linux)"
#undef LINK_OS_DEFAULT_SPEC
+#ifdef USE_UCLIBC
+#define LINK_OS_DEFAULT_SPEC "%(link_os_linux_uclibc)"
+#else
#define LINK_OS_DEFAULT_SPEC "%(link_os_linux)"
+#endif
#define LINK_GCC_C_SEQUENCE_SPEC \
"%{static:--start-group} %G %L %{static:--end-group}%{!static:%G}"
--- gcc-4.1.0/gcc/config/rs6000/sysv4.h
+++ gcc-4.1.0/gcc/config/rs6000/sysv4.h
@@ -866,6 +866,7 @@ extern int fixuplabelno;
mcall-linux : %(link_os_linux) ; \
mcall-gnu : %(link_os_gnu) ; \
mcall-netbsd : %(link_os_netbsd) ; \
+ mcall-linux-uclibc : %(link_os_linux_uclibc); \
mcall-openbsd: %(link_os_openbsd) ; \
: %(link_os_default) }"
@@ -1043,6 +1044,10 @@ extern int fixuplabelno;
%{rdynamic:-export-dynamic} \
%{!dynamic-linker:-dynamic-linker /lib/ld.so.1}}}"
+#define LINK_OS_LINUX_UCLIBC_SPEC "-m elf32ppclinux %{!shared: %{!static: \
+ %{rdynamic:-export-dynamic} \
+ %{!dynamic-linker:-dynamic-linker /lib/ld-uClibc.so.0}}}"
+
#if defined(HAVE_LD_EH_FRAME_HDR)
# define LINK_EH_SPEC "%{!static:--eh-frame-hdr} "
#endif
@@ -1209,6 +1214,7 @@ ncrtn.o%s"
{ "link_os_sim", LINK_OS_SIM_SPEC }, \
{ "link_os_freebsd", LINK_OS_FREEBSD_SPEC }, \
{ "link_os_linux", LINK_OS_LINUX_SPEC }, \
+ { "link_os_linux_uclibc", LINK_OS_LINUX_UCLIBC_SPEC }, \
{ "link_os_gnu", LINK_OS_GNU_SPEC }, \
{ "link_os_netbsd", LINK_OS_NETBSD_SPEC }, \
{ "link_os_openbsd", LINK_OS_OPENBSD_SPEC }, \
--- gcc-4.1.0/gcc/config/s390/linux.h
+++ gcc-4.1.0/gcc/config/s390/linux.h
@@ -77,6 +77,13 @@ Software Foundation, 51 Franklin Street,
#define MULTILIB_DEFAULTS { "m31" }
#endif
+#ifdef USE_UCLIBC
+#define ELF31_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
+#define ELF64_DYNAMIC_LINKER "/lib/ld64-uClibc.so.0"
+#else
+#define ELF31_DYNAMIC_LINKER "/lib/ld.so.1"
+#define ELF64_DYNAMIC_LINKER "/lib/ld64.so.1"
+#endif
#undef LINK_SPEC
#define LINK_SPEC \
"%{m31:-m elf_s390}%{m64:-m elf64_s390} \
@@ -86,8 +93,8 @@ Software Foundation, 51 Franklin Street,
%{!static: \
%{rdynamic:-export-dynamic} \
%{!dynamic-linker: \
- %{m31:-dynamic-linker /lib/ld.so.1} \
- %{m64:-dynamic-linker /lib/ld64.so.1}}}}"
+ %{m31:-dynamic-linker " ELF31_DYNAMIC_LINKER "} \
+ %{m64:-dynamic-linker " ELF64_DYNAMIC_LINKER "}}}}"
#define TARGET_ASM_FILE_END file_end_indicate_exec_stack
--- gcc-4.1.0/gcc/config/sh/linux.h
+++ gcc-4.1.0/gcc/config/sh/linux.h
@@ -56,12 +56,21 @@ Boston, MA 02110-1301, USA. */
#undef SUBTARGET_LINK_EMUL_SUFFIX
#define SUBTARGET_LINK_EMUL_SUFFIX "_linux"
#undef SUBTARGET_LINK_SPEC
+#ifdef USE_UCLIBC
+#define SUBTARGET_LINK_SPEC \
+ "%{shared:-shared} \
+ %{!static: \
+ %{rdynamic:-export-dynamic} \
+ %{!dynamic-linker:-dynamic-linker /lib/ld-uClibc.so.0}} \
+ %{static:-static}"
+#else
#define SUBTARGET_LINK_SPEC \
"%{shared:-shared} \
%{!static: \
%{rdynamic:-export-dynamic} \
%{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} \
%{static:-static}"
+#endif
/* Output assembler code to STREAM to call the profiler. */
--- gcc-4.1.0/gcc/config/sparc/linux.h
+++ gcc-4.1.0/gcc/config/sparc/linux.h
@@ -125,6 +125,11 @@ Boston, MA 02110-1301, USA. */
/* If ELF is the default format, we should not use /lib/elf. */
+#ifdef USE_UCLIBC
+#define ELF_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
+#else
+#define ELF_DYNAMIC_LINKER "/lib/ld-linux.so.2"
+#endif
#undef LINK_SPEC
#define LINK_SPEC "-m elf32_sparc -Y P,/usr/lib %{shared:-shared} \
%{!mno-relax:%{!r:-relax}} \
@@ -132,7 +137,7 @@ Boston, MA 02110-1301, USA. */
%{!ibcs: \
%{!static: \
%{rdynamic:-export-dynamic} \
- %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} \
+ %{!dynamic-linker:-dynamic-linker " ELF_DYNAMIC_LINKER "}} \
%{static:-static}}}"
/* The sun bundled assembler doesn't accept -Yd, (and neither does gas).
--- gcc-4.1.0/gcc/config/sparc/linux64.h
+++ gcc-4.1.0/gcc/config/sparc/linux64.h
@@ -162,12 +162,17 @@ Boston, MA 02110-1301, USA. */
{ "link_arch_default", LINK_ARCH_DEFAULT_SPEC }, \
{ "link_arch", LINK_ARCH_SPEC },
+#ifdef USE_UCLIBC
+#define ELF_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
+#else
+#define ELF_DYNAMIC_LINKER "/lib/ld-linux.so.2"
+#endif
#define LINK_ARCH32_SPEC "-m elf32_sparc -Y P,/usr/lib %{shared:-shared} \
%{!shared: \
%{!ibcs: \
%{!static: \
%{rdynamic:-export-dynamic} \
- %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} \
+ %{!dynamic-linker:-dynamic-linker " ELF_DYNAMIC_LINKER "}} \
%{static:-static}}} \
"
--- gcc-4.1.0/libffi/configure
+++ gcc-4.1.0/libffi/configure
@@ -3457,6 +3457,11 @@ linux-gnu*)
lt_cv_deplibs_check_method=pass_all
;;
+linux-uclibc*)
+ lt_cv_deplibs_check_method=pass_all
+ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
+ ;;
+
netbsd* | knetbsd*-gnu)
if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
--- gcc-4.1.0/libgfortran/configure
+++ gcc-4.1.0/libgfortran/configure
@@ -3699,6 +3699,11 @@ linux-gnu*)
lt_cv_deplibs_check_method=pass_all
;;
+linux-uclibc*)
+ lt_cv_deplibs_check_method=pass_all
+ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
+ ;;
+
netbsd* | knetbsd*-gnu)
if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
--- gcc-4.1.0/libjava/configure
+++ gcc-4.1.0/libjava/configure
@@ -5137,6 +5137,11 @@ linux-gnu*)
lt_cv_deplibs_check_method=pass_all
;;
+linux-uclibc*)
+ lt_cv_deplibs_check_method=pass_all
+ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
+ ;;
+
netbsd* | knetbsd*-gnu)
if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
--- gcc-4.1.0/libmudflap/configure
+++ gcc-4.1.0/libmudflap/configure
@@ -5382,6 +5382,11 @@ linux-gnu*)
lt_cv_deplibs_check_method=pass_all
;;
+linux-uclibc*)
+ lt_cv_deplibs_check_method=pass_all
+ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
+ ;;
+
netbsd* | knetbsd*-gnu)
if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
--- gcc-4.1.0/libobjc/configure
+++ gcc-4.1.0/libobjc/configure
@@ -3312,6 +3312,11 @@ linux-gnu*)
lt_cv_deplibs_check_method=pass_all
;;
+linux-uclibc*)
+ lt_cv_deplibs_check_method=pass_all
+ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
+ ;;
+
netbsd* | knetbsd*-gnu)
if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
--- gcc-4.1.0/libtool.m4
+++ gcc-4.1.0/libtool.m4
@@ -743,6 +743,11 @@ linux-gnu*)
lt_cv_deplibs_check_method=pass_all
;;
+linux-uclibc*)
+ lt_cv_deplibs_check_method=pass_all
+ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
+ ;;
+
netbsd* | knetbsd*-gnu)
if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
[lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$']
--- gcc-4.1.0/ltconfig
+++ gcc-4.1.0/ltconfig
@@ -603,6 +603,7 @@ host_os=`echo $host | sed 's/^\([^-]*\)-
# Transform linux* to *-*-linux-gnu*, to support old configure scripts.
case $host_os in
+linux-uclibc*) ;;
linux-gnu*) ;;
linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
esac
@@ -1274,6 +1275,23 @@ linux-gnu*)
dynamic_linker='GNU/Linux ld.so'
;;
+linux-uclibc*)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
+ soname_spec='${libname}${release}.so$major'
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ # This implies no fast_install, which is unacceptable.
+ # Some rework will be needed to allow for fast_install
+ # before this can be enabled.
+ hardcode_into_libs=yes
+ # Assume using the uClibc dynamic linker.
+ dynamic_linker="uClibc ld.so"
+ ;;
+
netbsd*)
need_lib_prefix=no
need_version=no
--- gcc-4.1.0/zlib/configure
+++ gcc-4.1.0/zlib/configure
@@ -3426,6 +3426,11 @@ linux-gnu*)
lt_cv_deplibs_check_method=pass_all
;;
+linux-uclibc*)
+ lt_cv_deplibs_check_method=pass_all
+ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
+ ;;
+
netbsd* | knetbsd*-gnu)
if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'

View File

@ -1,27 +0,0 @@
--- gcc-2005q3-1.orig/gcc/config.gcc 2005-10-31 19:02:54.000000000 +0300
+++ gcc-2005q3-1/gcc/config.gcc 2006-01-27 01:09:09.000000000 +0300
@@ -674,7 +674,7 @@
tm_file="dbxelf.h elfos.h linux.h arm/elf.h arm/linux-gas.h arm/linux-elf.h"
tmake_file="t-slibgcc-elf-ver t-linux arm/t-arm"
case ${target} in
- arm*-*-linux-gnueabi)
+ arm*-*-linux-gnueabi | arm*-*-linux-uclibcgnueabi)
tm_file="$tm_file arm/bpabi.h arm/linux-eabi.h"
tmake_file="$tmake_file arm/t-arm-elf arm/t-bpabi arm/t-linux-eabi"
# The BPABI long long divmod functions return a 128-bit value in
diff -urN gcc-2005q3-2/gcc/config/arm/linux-eabi.h gcc-2005q3-2.new/gcc/config/arm/linux-eabi.h
--- gcc-2005q3-2/gcc/config/arm/linux-eabi.h 2005-12-07 23:14:16.000000000 +0300
+++ gcc-2005q3-2.new/gcc/config/arm/linux-eabi.h 2006-03-29 19:02:34.000000000 +0400
@@ -53,7 +53,11 @@
/* Use ld-linux.so.3 so that it will be possible to run "classic"
GNU/Linux binaries on an EABI system. */
#undef LINUX_TARGET_INTERPRETER
+#ifdef USE_UCLIBC
+#define LINUX_TARGET_INTERPRETER "/lib/ld-uClibc.so.0"
+#else
#define LINUX_TARGET_INTERPRETER "/lib/ld-linux.so.3"
+#endif
/* At this point, bpabi.h will have clobbered LINK_SPEC. We want to
use the GNU/Linux version, not the generic BPABI version. */

File diff suppressed because it is too large Load Diff

View File

@ -1,46 +0,0 @@
# DP: Build and install libstdc++_pic.a library.
--- gcc-4.1.0/libstdc++-v3/src/Makefile.am 2004-11-15 17:33:05.000000000 -0600
+++ gcc-4.1.0-patched/libstdc++-v3/src/Makefile.am 2005-04-25 20:05:59.186930896 -0500
@@ -214,6 +214,10 @@
$(OPT_LDFLAGS) $(SECTION_LDFLAGS) $(AM_CXXFLAGS) $(LDFLAGS) -o $@
+install-exec-local:
+ $(AR) cru libstdc++_pic.a .libs/*.o $(top_builddir)/libsupc++/*.o
+ $(INSTALL_DATA) libstdc++_pic.a $(DESTDIR)$(toolexeclibdir)
+
# Added bits to build debug library.
if GLIBCXX_BUILD_DEBUG
all-local: build_debug
--- gcc-4.1.0/libstdc++-v3/src/Makefile.in 2005-04-11 19:13:08.000000000 -0500
+++ gcc-4.1.0-patched/libstdc++-v3/src/Makefile.in 2005-04-25 20:12:33.284316275 -0500
@@ -627,7 +627,7 @@
install-data-am: install-data-local
-install-exec-am: install-toolexeclibLTLIBRARIES
+install-exec-am: install-toolexeclibLTLIBRARIES install-exec-local
install-info: install-info-am
@@ -660,6 +660,7 @@
distclean-libtool distclean-tags distdir dvi dvi-am html \
html-am info info-am install install-am install-data \
install-data-am install-data-local install-exec \
+ install-exec-local \
install-exec-am install-info install-info-am install-man \
install-strip install-toolexeclibLTLIBRARIES installcheck \
installcheck-am installdirs maintainer-clean \
@@ -745,6 +746,11 @@
install_debug:
(cd ${debugdir} && $(MAKE) \
toolexeclibdir=$(glibcxx_toolexeclibdir)/debug install)
+
+install-exec-local:
+ $(AR) cru libstdc++_pic.a .libs/*.o $(top_builddir)/libsupc++/*.o
+ $(INSTALL_DATA) libstdc++_pic.a $(DESTDIR)$(toolexeclibdir)
+
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:

View File

@ -1,11 +0,0 @@
--- gcc-4.0.0/boehm-gc/include/gc.h-orig 2005-04-28 22:28:57.000000000 -0500
+++ gcc-4.0.0/boehm-gc/include/gc.h 2005-04-28 22:30:38.000000000 -0500
@@ -500,7 +500,7 @@
#ifdef __linux__
# include <features.h>
# if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1 || __GLIBC__ > 2) \
- && !defined(__ia64__)
+ && !defined(__ia64__) && !defined(__UCLIBC__)
# ifndef GC_HAVE_BUILTIN_BACKTRACE
# define GC_HAVE_BUILTIN_BACKTRACE
# endif

View File

@ -1,11 +0,0 @@
--- gcc-4.0.0/libstdc++-v3/include/c_std/std_cstdio.h-orig 2005-04-29 00:08:41.000000000 -0500
+++ gcc-4.0.0/libstdc++-v3/include/c_std/std_cstdio.h 2005-04-29 00:08:45.000000000 -0500
@@ -142,7 +142,7 @@
using ::vsprintf;
}
-#if _GLIBCXX_USE_C99
+#if _GLIBCXX_USE_C99 || defined(__UCLIBC__)
#undef snprintf
#undef vfscanf

View File

@ -1,12 +0,0 @@
--- gcc-4.0.0/libstdc++-v3/configure-old 2005-04-30 22:04:48.061603912 -0500
+++ gcc-4.0.0/libstdc++-v3/configure 2005-04-30 22:06:13.678588152 -0500
@@ -7194,6 +7194,9 @@
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#include <complex.h>
+#ifdef __UCLIBC__
+#error ugly hack to make sure configure test fails here for cross until uClibc supports the complex funcs
+#endif
int
main ()
{

View File

@ -1,24 +0,0 @@
--- gcc-4.1.0/libstdc++-v3/include/ext/rope.mps 2006-03-24 01:49:51 +0100
+++ gcc-4.1.0/libstdc++-v3/include/ext/rope 2006-03-24 01:49:37 +0100
@@ -59,6 +59,9 @@
#include <bits/allocator.h>
#include <ext/hash_fun.h>
+/* cope w/ index defined as macro, SuSv3 proposal */
+#undef index
+
# ifdef __GC
# define __GC_CONST const
# else
--- gcc-4.1.0/libstdc++-v3/include/ext/ropeimpl.h.mps 2006-03-24 01:50:04 +0100
+++ gcc-4.1.0/libstdc++-v3/include/ext/ropeimpl.h 2006-03-24 01:50:28 +0100
@@ -53,6 +53,9 @@
#include <ext/memory> // For uninitialized_copy_n
#include <ext/numeric> // For power
+/* cope w/ index defined as macro, SuSv3 proposal */
+#undef index
+
namespace __gnu_cxx
{
using std::size_t;

View File

@ -1,20 +0,0 @@
--- gcc-4.1.0/libstdc++-v3/fragment.am 2005-03-21 11:40:14.000000000 -0600
+++ gcc-4.1.0-patched/libstdc++-v3/fragment.am 2005-04-25 20:14:39.856251785 -0500
@@ -21,5 +21,5 @@
$(WARN_FLAGS) $(WERROR) -fdiagnostics-show-location=once
# -I/-D flags to pass when compiling.
-AM_CPPFLAGS = $(GLIBCXX_INCLUDES)
+AM_CPPFLAGS = $(GLIBCXX_INCLUDES) -I$(toplevel_srcdir)/include
--- gcc-4.1.0/libstdc++-v3/libmath/Makefile.am 2005-03-21 11:40:18.000000000 -0600
+++ gcc-4.1.0-patched/libstdc++-v3/libmath/Makefile.am 2005-04-25 20:14:39.682280735 -0500
@@ -35,7 +35,7 @@
libmath_la_SOURCES = stubs.c
-AM_CPPFLAGS = $(CANADIAN_INCLUDES)
+AM_CPPFLAGS = $(CANADIAN_INCLUDES) -I$(toplevel_srcdir)/include
# Only compiling "C" sources in this directory.
LIBTOOL = @LIBTOOL@ --tag CC

View File

@ -1,25 +0,0 @@
http://sourceforge.net/mailarchive/forum.php?thread_id=8959304&forum_id=5348
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24836
--- gcc/gcc/configure.ac (revision 106699)
+++ gcc/gcc/configure.ac (working copy)
@@ -2446,7 +2446,7 @@
tls_first_minor=14
tls_as_opt="-m64 -Aesame --fatal-warnings"
;;
- sh-*-* | sh[34]-*-*)
+ sh-*-* | sh[34]*-*-*)
conftest_s='
.section ".tdata","awT",@progbits
foo: .long 25
--- gcc/gcc/configure
+++ gcc/gcc/configure
@@ -14846,7 +14846,7 @@
tls_first_minor=14
tls_as_opt="-m64 -Aesame --fatal-warnings"
;;
- sh-*-* | sh[34]-*-*)
+ sh-*-* | sh[34]*-*-*)
conftest_s='
.section ".tdata","awT",@progbits
foo: .long 25

View File

@ -1,67 +0,0 @@
By Lennert Buytenhek <buytenh@wantstofly.org>
Adds support for arm*b-linux* big-endian ARM targets
See http://gcc.gnu.org/PR16350
--- gcc-4.1.0/gcc/config/arm/linux-elf.h
+++ gcc-4.1.0/gcc/config/arm/linux-elf.h
@@ -28,19 +28,33 @@
#undef TARGET_VERSION
#define TARGET_VERSION fputs (" (ARM GNU/Linux with ELF)", stderr);
+/*
+ * 'config.gcc' defines TARGET_BIG_ENDIAN_DEFAULT as 1 for arm*b-*
+ * (big endian) configurations.
+ */
+#if TARGET_BIG_ENDIAN_DEFAULT
+#define TARGET_ENDIAN_DEFAULT MASK_BIG_END
+#define TARGET_ENDIAN_OPTION "mbig-endian"
+#define TARGET_LINKER_EMULATION "armelfb_linux"
+#else
+#define TARGET_ENDIAN_DEFAULT 0
+#define TARGET_ENDIAN_OPTION "mlittle-endian"
+#define TARGET_LINKER_EMULATION "armelf_linux"
+#endif
+
#undef TARGET_DEFAULT_FLOAT_ABI
#define TARGET_DEFAULT_FLOAT_ABI ARM_FLOAT_ABI_HARD
#undef TARGET_DEFAULT
-#define TARGET_DEFAULT (0)
+#define TARGET_DEFAULT (TARGET_ENDIAN_DEFAULT)
#define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm6
-#define SUBTARGET_EXTRA_LINK_SPEC " -m armelf_linux -p"
+#define SUBTARGET_EXTRA_LINK_SPEC " -m " TARGET_LINKER_EMULATION " -p"
#undef MULTILIB_DEFAULTS
#define MULTILIB_DEFAULTS \
- { "marm", "mlittle-endian", "mhard-float", "mno-thumb-interwork" }
+ { "marm", TARGET_ENDIAN_OPTION, "mhard-float", "mno-thumb-interwork" }
/* Now we define the strings used to build the spec file. */
#undef LIB_SPEC
@@ -61,7 +75,7 @@
%{rdynamic:-export-dynamic} \
%{!dynamic-linker:-dynamic-linker " LINUX_TARGET_INTERPRETER "} \
-X \
- %{mbig-endian:-EB}" \
+ %{mbig-endian:-EB} %{mlittle-endian:-EL}" \
SUBTARGET_EXTRA_LINK_SPEC
#undef LINK_SPEC
--- gcc-4.1.0/gcc/config.gcc
+++ gcc-4.1.0/gcc/config.gcc
@@ -672,6 +672,11 @@
;;
arm*-*-linux*) # ARM GNU/Linux with ELF
tm_file="dbxelf.h elfos.h linux.h arm/elf.h arm/linux-gas.h arm/linux-elf.h"
+ case $target in
+ arm*b-*)
+ tm_defines="${tm_defines} TARGET_BIG_ENDIAN_DEFAULT=1"
+ ;;
+ esac
tmake_file="${tmake_file} t-linux arm/t-arm"
case ${target} in
arm*-*-linux-gnueabi)

View File

@ -1,14 +0,0 @@
Index: gcc-4.1.1/gcc/config/arm/linux-eabi.h
===================================================================
--- gcc-4.1.1.orig/gcc/config/arm/linux-eabi.h 2007-02-20 14:51:33.416193250 +0100
+++ gcc-4.1.1/gcc/config/arm/linux-eabi.h 2007-02-20 14:52:11.622581000 +0100
@@ -48,7 +48,8 @@
#define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm9tdmi
#undef SUBTARGET_EXTRA_LINK_SPEC
-#define SUBTARGET_EXTRA_LINK_SPEC " -m armelf_linux_eabi"
+#define SUBTARGET_EXTRA_LINK_SPEC \
+ " %{mbig-endian:-m armelfb_linux_eabi} %{mlittle-endian:-m armelf_linux_eabi} "
/* Use ld-linux.so.3 so that it will be possible to run "classic"
GNU/Linux binaries on an EABI system. */

View File

@ -1,4 +0,0 @@
The numbered patches come from
http://www.uclibc.org/cgi-bin/viewcvs.cgi/trunk/buildroot/toolchain/gcc/4.1.1/
Other patches are locally added to fix things (mostly inherited and reapplied
from gcc 3.4.4 where applicable)

View File

@ -1,24 +0,0 @@
# Dimitry Andric <dimitry@andric.com>, 2004-05-01
#
# * Removed the extra -lfloat option from LIBGCC_SPEC, since it isn't needed
# anymore. (The required functions are now in libgcc.)
#
# Fixes errors like
# arm-softfloat-linux-gnu/3.4.0/../../../../arm-softfloat-linux-gnu/bin/ld: cannot find -lfloat
# collect2: ld returned 1 exit status
# make[2]: *** [arm-softfloat-linux-gnu/gcc-3.4.0-glibc-2.3.2/build-glibc/iconvdata/ISO8859-1.so] Error 1
# when building glibc-2.3.3 with gcc-3.4.0 for arm-softfloat
Index: gcc-4.0.2/gcc/config/arm/linux-elf.h
===================================================================
--- gcc-4.0.2.orig/gcc/config/arm/linux-elf.h 2005-03-04 16:14:01.000000000 +0000
+++ gcc-4.0.2/gcc/config/arm/linux-elf.h 2005-11-11 18:02:54.000000000 +0000
@@ -56,7 +56,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

View File

@ -1,16 +0,0 @@
Index: gcc-4.0.2/gcc/config/arm/t-linux
===================================================================
--- gcc-4.0.2.orig/gcc/config/arm/t-linux 2004-05-15 12:41:35.000000000 +0000
+++ gcc-4.0.2/gcc/config/arm/t-linux 2005-11-11 16:07:53.000000000 +0000
@@ -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 _floatdidf _floatdisf
# MULTILIB_OPTIONS = mhard-float/msoft-float
# MULTILIB_DIRNAMES = hard-float soft-float

View File

@ -1,29 +0,0 @@
--- gcc-4.1.1/gcc/config/arm/linux-gas.h- 2005-06-25 03:22:41.000000000 +0200
+++ gcc-4.1.1/gcc/config/arm/linux-gas.h 2006-06-18 10:23:46.000000000 +0200
@@ -44,6 +44,7 @@
/* Clear the instruction cache from `beg' to `end'. This makes an
inline system call to SYS_cacheflush. */
+#if !defined(__thumb__)
#define CLEAR_INSN_CACHE(BEG, END) \
{ \
register unsigned long _beg __asm ("a1") = (unsigned long) (BEG); \
@@ -53,3 +54,18 @@
: "=r" (_beg) \
: "0" (_beg), "r" (_end), "r" (_flg)); \
}
+#else
+#define CLEAR_INSN_CACHE(BEG, END) \
+{ \
+ register unsigned long _beg __asm ("a1") = (unsigned long) (BEG); \
+ register unsigned long _end __asm ("a2") = (unsigned long) (END); \
+ register unsigned long _flg __asm ("a3") = 0; \
+ register unsigned long _swi __asm ("a4") = 0xf0002; \
+ __asm __volatile ("push {r7}\n" \
+ " mov r7,a4\n" \
+ " swi 0 @ sys_cacheflush\n" \
+ " pop {r7}\n" \
+ : "=r" (_beg) \
+ : "0" (_beg), "r" (_end), "r" (_flg), "r" (_swi)); \
+}
+#endif

View File

@ -1,64 +0,0 @@
#
# Patch managed by http://www.holgerschurig.de/patcher.html
#
--- gcc-4.1.1/gcc/config/arm/lib1funcs.asm~gcc
+++ gcc-4.1.1/gcc/config/arm/lib1funcs.asm
@@ -995,10 +995,24 @@
.code 32
FUNC_START div0
+#if ! defined __thumb__
stmfd sp!, {r1, lr}
mov r0, #SIGFPE
bl SYM(raise) __PLT__
RETLDM r1
+#else
+ push {r1, lr}
+ mov r0, #SIGFPE
+ bl SYM(raise) __PLT__
+#if __ARM_ARCH__ > 4
+ pop {r1, pc}
+#else
+ @ on 4T that won't work
+ pop {r1}
+ pop {r3}
+ bx r3
+#endif
+#endif
FUNC_END div0
@@ -1141,11 +1155,12 @@
code here switches to the correct mode before executing the function. */
.text
- .align 0
+ .align 1
.force_thumb
.macro call_via register
THUMB_FUNC_START _call_via_\register
+ .hidden SYM (_call_via_\register)
bx \register
nop
@@ -1242,6 +1257,7 @@
.code 16
THUMB_FUNC_START _interwork_call_via_\register
+ .hidden SYM (_interwork_call_via_\register)
bx pc
nop
--- gcc-4.1.1/gcc/config/arm/t-linux~gcc
+++ gcc-4.1.1/gcc/config/arm/t-linux
@@ -7,6 +7,7 @@
LIB1ASMFUNCS = _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_lnx \
_negdf2 _addsubdf3 _muldivdf3 _cmpdf2 _unorddf2 _fixdfsi _fixunsdfsi \
_truncdfsf2 _negsf2 _addsubsf3 _muldivsf3 _cmpsf2 _unordsf2 \
+ _call_via_rX \
_fixsfsi _fixunssfsi _floatdidf _floatdisf
# MULTILIB_OPTIONS = mhard-float/msoft-float

View File

@ -1,75 +0,0 @@
-- gcc-4_1-branch/gcc/cse.c 2006/07/20 14:20:26 115619
+++ gcc-4_1-branch/gcc/cse.c 2006/07/20 15:07:25 115620
@@ -4697,6 +4697,8 @@
unsigned src_const_hash;
/* Table entry for constant equivalent for SET_SRC, if any. */
struct table_elt *src_const_elt;
+ /* Table entry for the destination address. */
+ struct table_elt *dest_addr_elt;
};
static void
@@ -5936,6 +5938,40 @@
so that the destination goes into that class. */
sets[i].src_elt = src_eqv_elt;
+ /* Record destination addresses in the hash table. This allows us to
+ check if they are invalidated by other sets. */
+ for (i = 0; i < n_sets; i++)
+ {
+ if (sets[i].rtl)
+ {
+ rtx x = sets[i].inner_dest;
+ struct table_elt *elt;
+ enum machine_mode mode;
+ unsigned hash;
+
+ if (MEM_P (x))
+ {
+ x = XEXP (x, 0);
+ mode = GET_MODE (x);
+ hash = HASH (x, mode);
+ elt = lookup (x, hash, mode);
+ if (!elt)
+ {
+ if (insert_regs (x, NULL, 0))
+ {
+ rehash_using_reg (x);
+ hash = HASH (x, mode);
+ }
+ elt = insert (x, NULL, hash, mode);
+ }
+
+ sets[i].dest_addr_elt = elt;
+ }
+ else
+ sets[i].dest_addr_elt = NULL;
+ }
+ }
+
invalidate_from_clobbers (x);
/* Some registers are invalidated by subroutine calls. Memory is
@@ -6028,12 +6064,20 @@
}
/* We may have just removed some of the src_elt's from the hash table.
- So replace each one with the current head of the same class. */
+ So replace each one with the current head of the same class.
+ Also check if destination addresses have been removed. */
for (i = 0; i < n_sets; i++)
if (sets[i].rtl)
{
- if (sets[i].src_elt && sets[i].src_elt->first_same_value == 0)
+ if (sets[i].dest_addr_elt
+ && sets[i].dest_addr_elt->first_same_value == 0)
+ {
+ /* The elt was removed, which means this destination s not
+ valid after this instruction. */
+ sets[i].rtl = NULL_RTX;
+ }
+ else if (sets[i].src_elt && sets[i].src_elt->first_same_value == 0)
/* If elt was removed, find current head of same class,
or 0 if nothing remains of that class. */
{

View File

@ -1,18 +0,0 @@
--- trunk/gcc/config/arm/arm.c 2006/09/19 13:18:27 117055
+++ trunk/gcc/config/arm/arm.c 2006/09/19 13:19:24 117056
@@ -15415,6 +15415,15 @@
/* Move from sp to reg. */
asm_fprintf (asm_out_file, "\t.movsp %r\n", REGNO (e0));
}
+ else if (GET_CODE (e1) == PLUS
+ && GET_CODE (XEXP (e1, 0)) == REG
+ && REGNO (XEXP (e1, 0)) == SP_REGNUM
+ && GET_CODE (XEXP (e1, 1)) == CONST_INT)
+ {
+ /* Set reg to offset from sp. */
+ asm_fprintf (asm_out_file, "\t.movsp %r, #%d\n",
+ REGNO (e0), (int)INTVAL(XEXP (e1, 1)));
+ }
else
abort ();
break;

View File

@ -1,26 +0,0 @@
Submitted By: Alexander E. Patrakov
Date: 2006-12-11
Initial Package Version: 4.1.1
Upstream Status: backport
Origin: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28621
Description: Fix crash of programs compiled with -Os -ffast-math
(affects procps on the LiveCD)
--- gcc-4.1.1/gcc/config/i386/i386.c
+++ gcc-4.1.1/gcc/config/i386/i386.c
@@ -1502,12 +1502,10 @@
}
/* Validate -mpreferred-stack-boundary= value, or provide default.
- The default of 128 bits is for Pentium III's SSE __m128, but we
- don't want additional code to keep the stack aligned when
- optimizing for code size. */
- ix86_preferred_stack_boundary = (optimize_size
- ? TARGET_64BIT ? 128 : 32
- : 128);
+ The default of 128 bits is for Pentium III's SSE __m128, We can't
+ change it because of optimize_size. Otherwise, we can't mix object
+ files compiled with -Os and -On. */
+ ix86_preferred_stack_boundary = 128;
if (ix86_preferred_stack_boundary_string)
{
i = atoi (ix86_preferred_stack_boundary_string);

View File

@ -1,15 +0,0 @@
--- /gcc/orig-configure 2007-03-11 21:50:28.000000000 +0200
+++ /gcc/configure 2007-03-11 21:53:27.000000000 +0200
@@ -12272,9 +12272,11 @@
esac
saved_CFLAGS="${CFLAGS}"
CC="${CC_FOR_BUILD}" CFLAGS="${CFLAGS_FOR_BUILD}" \
+ CONFIG_SITE=""
${realsrcdir}/configure \
--enable-languages=${enable_languages-all} \
- --target=$target_alias --host=$build_alias --build=$build_alias
+ --target=$target_alias --host=$build_alias --build=$build_alias \
+ --cache-file=./tmp-cache
CFLAGS="${saved_CFLAGS}"
# We just finished tests for the build machine, so rename

View File

@ -1,22 +0,0 @@
--- gcc-3.4.4/configure.in.orig 2005-08-09 19:57:51.504323183 -0700
+++ gcc-3.4.4/configure.in 2005-08-09 20:00:12.073168623 -0700
@@ -1907,7 +1907,7 @@
*) gxx_include_dir=${with_gxx_include_dir} ;;
esac
-FLAGS_FOR_TARGET=
+FLAGS_FOR_TARGET="$ARCH_FLAGS_FOR_TARGET"
case " $target_configdirs " in
*" newlib "*)
case " $target_configargs " in
--- gcc-3.4.4/configure.orig 2005-08-09 21:02:29.668360660 -0700
+++ gcc-3.4.4/configure 2005-08-09 21:02:50.157649970 -0700
@@ -2669,7 +2669,7 @@
*) gxx_include_dir=${with_gxx_include_dir} ;;
esac
-FLAGS_FOR_TARGET=
+FLAGS_FOR_TARGET="$ARCH_FLAGS_FOR_TARGET"
case " $target_configdirs " in
*" newlib "*)
case " $target_configargs " in

View File

@ -1,22 +0,0 @@
--- /tmp/Makefile.in 2006-02-23 20:56:01.399758728 +0100
+++ gcc-4.1-20060217/Makefile.in 2006-02-23 20:56:16.874406224 +0100
@@ -334,7 +334,7 @@
CXXFLAGS_FOR_TARGET = $(CXXFLAGS) $(SYSROOT_CFLAGS_FOR_TARGET)
LIBCFLAGS_FOR_TARGET = $(CFLAGS_FOR_TARGET)
LIBCXXFLAGS_FOR_TARGET = $(CXXFLAGS_FOR_TARGET) -fno-implicit-templates
-LDFLAGS_FOR_TARGET =
+LDFLAGS_FOR_TARGET = @LDFLAGS@
PICFLAG_FOR_TARGET =
# ------------------------------------
--- /tmp/Makefile.tpl 2006-02-23 20:50:34.077519272 +0100
+++ gcc-4.1-20060217/Makefile.tpl 2006-02-23 21:04:31.092273688 +0100
@@ -337,7 +337,7 @@
CXXFLAGS_FOR_TARGET = $(CXXFLAGS) $(SYSROOT_CFLAGS_FOR_TARGET)
LIBCFLAGS_FOR_TARGET = $(CFLAGS_FOR_TARGET)
LIBCXXFLAGS_FOR_TARGET = $(CXXFLAGS_FOR_TARGET) -fno-implicit-templates
-LDFLAGS_FOR_TARGET =
+LDFLAGS_FOR_TARGET = @LDFLAGS@
PICFLAG_FOR_TARGET =
# ------------------------------------

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,11 +0,0 @@
--- gcc-4.1.1/gcc/Makefile.in_orig 2007-01-31 21:24:23.000000000 +0000
+++ gcc-4.1.1/gcc/Makefile.in 2007-01-31 21:24:43.000000000 +0000
@@ -3772,8 +3772,6 @@
$(INSTALL_SCRIPT) $(mkinstalldirs) \
$(DESTDIR)$(itoolsdir)/mkinstalldirs ; \
$(INSTALL_SCRIPT) $(srcdir)/fixproto $(DESTDIR)$(itoolsdir)/fixproto ; \
- $(INSTALL_PROGRAM) build/fix-header$(build_exeext) \
- $(DESTDIR)$(itoolsdir)/fix-header$(build_exeext) ; \
else :; fi
echo 'SYSTEM_HEADER_DIR="'"$(SYSTEM_HEADER_DIR)"'"' \
> $(DESTDIR)$(itoolsdatadir)/mkheaders.conf

View File

@ -1,12 +0,0 @@
diff -urN gcc-4.1.1/gcc/config/arm/linux-eabi.h gcc-4.1.1-arm9tdmi/gcc/config/arm/linux-eabi.h
--- gcc-4.1.1/gcc/config/arm/linux-eabi.h 2006-10-22 11:11:49.000000000 -0700
+++ gcc-4.1.1-arm9tdmi/gcc/config/arm/linux-eabi.h 2006-10-24 21:34:01.000000000 -0700
@@ -45,7 +45,7 @@
The ARM10TDMI core is the default for armv5t, so set
SUBTARGET_CPU_DEFAULT to achieve this. */
#undef SUBTARGET_CPU_DEFAULT
-#define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm10tdmi
+#define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm9tdmi
#undef SUBTARGET_EXTRA_LINK_SPEC
#define SUBTARGET_EXTRA_LINK_SPEC " -m armelf_linux_eabi"

View File

@ -0,0 +1,60 @@
require gcc-common.inc
DEPENDS = "mpfr gmp"
SRC_URI = "ftp://ftp.gnu.org/pub/gnu/gcc/gcc-4.1.2/gcc-4.1.2.tar.bz2 \
file://100-uclibc-conf.patch;patch=1 \
file://110-arm-eabi.patch;patch=1 \
file://200-uclibc-locale.patch;patch=1 \
file://300-libstdc++-pic.patch;patch=1 \
file://301-missing-execinfo_h.patch;patch=1 \
file://302-c99-snprintf.patch;patch=1 \
file://303-c99-complex-ugly-hack.patch;patch=1 \
file://304-index_macro.patch;patch=1 \
file://602-sdk-libstdc++-includes.patch;patch=1 \
file://740-sh-pr24836.patch;patch=1 \
file://800-arm-bigendian.patch;patch=1 \
file://arm-nolibfloat.patch;patch=1 \
file://arm-softfloat.patch;patch=1 \
file://gcc41-configure.in.patch;patch=1 \
file://arm-thumb.patch;patch=1 \
file://arm-thumb-cache.patch;patch=1 \
file://ldflags.patch;patch=1 \
file://zecke-xgcc-cpp.patch;patch=1 \
file://unbreak-armv4t.patch;patch=1 \
file://fix-ICE-in-arm_unwind_emit_set.diff;patch=1 \
file://cache-amnesia.patch;patch=1 \
file://gfortran.patch;patch=1 \
file://gcc-4.0.2-e300c2c3.patch;patch=1 \
file://pr34130.patch;patch=1 \
"
SRC_URI_append_sh3 = " file://sh3-installfix-fixheaders.patch;patch=1 "
SRC_URI_avr32 = "http://www.angstrom-distribution.org/unstable/sources/gcc-4.1.2-atmel.1.1.0.tar.gz \
# file://100-uclibc-conf.patch;patch=1 \
# file://200-uclibc-locale.patch;patch=1 \
# file://300-libstdc++-pic.patch;patch=1 \
file://301-missing-execinfo_h.patch;patch=1 \
file://302-c99-snprintf.patch;patch=1 \
file://303-c99-complex-ugly-hack.patch;patch=1 \
file://304-index_macro.patch;patch=1 \
file://602-sdk-libstdc++-includes.patch;patch=1 \
file://gcc41-configure.in.patch;patch=1 \
file://ldflags.patch;patch=1 \
file://zecke-xgcc-cpp.patch;patch=1 \
file://cache-amnesia.patch;patch=1 \
"
do_compile_prepend_avr32() {
ln -sf ${S}/libstdc++-v3/config/os/uclibc/ ${S}/libstdc++-v3/config/os/uclibc-linux
}
# Language Overrides
FORTRAN = ""
JAVA = ""
EXTRA_OECONF += " --disable-libssp "
ARM_INSTRUCTION_SET = "arm"

View File

@ -0,0 +1,74 @@
require gcc-common.inc
DEPENDS = "mpfr gmp"
SRC_URI = "ftp://ftp.gnu.org/pub/gnu/gcc/gcc-${PV}/gcc-${PV}.tar.bz2 \
file://100-uclibc-conf.patch;patch=1 \
file://103-uclibc-conf-noupstream.patch;patch=1 \
file://200-uclibc-locale.patch;patch=1 \
file://203-uclibc-locale-no__x.patch;patch=1 \
file://204-uclibc-locale-wchar_fix.patch;patch=1 \
file://205-uclibc-locale-update.patch;patch=1 \
file://300-libstdc++-pic.patch;patch=1 \
file://301-missing-execinfo_h.patch;patch=1 \
file://302-c99-snprintf.patch;patch=1 \
file://303-c99-complex-ugly-hack.patch;patch=1 \
file://304-index_macro.patch;patch=1 \
file://305-libmudflap-susv3-legacy.patch;patch=1 \
file://306-libstdc++-namespace.patch;patch=1 \
file://307-locale_facets.patch;patch=1 \
file://402-libbackend_dep_gcov-iov.h.patch;patch=1 \
file://602-sdk-libstdc++-includes.patch;patch=1 \
file://740-sh-pr24836.patch;patch=1 \
file://800-arm-bigendian.patch;patch=1 \
file://801-arm-bigendian-eabi.patch;patch=1 \
file://904-flatten-switch-stmt-00.patch;patch=1 \
file://arm-nolibfloat.patch;patch=1 \
file://arm-softfloat.patch;patch=1 \
file://gcc41-configure.in.patch;patch=1 \
file://arm-thumb.patch;patch=1 \
file://arm-thumb-cache.patch;patch=1 \
file://ldflags.patch;patch=1 \
file://zecke-xgcc-cpp.patch;patch=1 \
file://unbreak-armv4t.patch;patch=1 \
file://fix-ICE-in-arm_unwind_emit_set.diff;patch=1 \
file://cache-amnesia.patch;patch=1 \
file://gfortran.patch;patch=1 \
file://gcc-4.0.2-e300c2c3.patch;patch=1 \
file://pr34130.patch;patch=1 \
file://fortran-static-linking.patch;patch=1 \
file://intermask-bigendian.patch;patch=1 \
"
SRC_URI_append_ep93xx = " \
file://arm-crunch-saveregs.patch;patch=1 \
file://arm-crunch-20000320.patch;patch=1 \
file://arm-crunch-compare.patch;patch=1 \
file://arm-crunch-compare-unordered.patch;patch=1 \
file://arm-crunch-compare-geu.patch;patch=1 \
file://arm-crunch-eabi-ieee754.patch;patch=1 \
file://arm-crunch-eabi-ieee754-div.patch;patch=1 \
file://arm-crunch-64bit-disable0.patch;patch=1 \
file://arm-crunch-offset.patch;patch=1 \
file://arm-crunch-fp_consts.patch;patch=1 \
file://arm-crunch-neg2.patch;patch=1 \
file://arm-crunch-predicates3.patch;patch=1 \
file://arm-crunch-cfcvtds-disable.patch;patch=1 \
file://arm-crunch-floatsi-disable.patch;patch=1 \
file://arm-crunch-truncsi-disable.patch;patch=1 \
file://arm-crunch-cfcvt64-disable.patch;patch=1 \
file://arm-crunch-cirrus-bugfixes.patch;patch=1 \
"
PACKAGE_ARCH_ep93xx = "${MACHINE_ARCH}"
SRC_URI_append_sh3 = " file://sh3-installfix-fixheaders.patch;patch=1 "
# Language Overrides
FORTRAN = ""
FORTRAN_linux-gnueabi = ",fortran"
JAVA = ""
EXTRA_OECONF += " --disable-libssp --disable-bootstrap "
ARM_INSTRUCTION_SET = "arm"

View File

@ -0,0 +1,35 @@
DESCRIPTION = "The GNU cc and gcc C compilers."
HOMEPAGE = "http://www.gnu.org/software/gcc/"
SECTION = "devel"
LICENSE = "GPL"
inherit autotools gettext
FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/gcc-${PV}"
def get_gcc_fpu_setting(bb, d):
if bb.data.getVar('TARGET_FPU', d, 1) in [ 'soft' ]:
return "--with-float=soft"
return ""
# We really need HOST_SYS here for some packages and TARGET_SYS for others.
# For now, libgcc is most important so we fix for that - RP.
SHLIBSDIR = "${STAGING_DIR}/${TARGET_SYS}/shlibs"
DEBIANNAME_libgcc = "libgcc1"
MIRRORS_prepend () {
${GNU_MIRROR}/gcc/releases/ ftp://gcc.gnu.org/pub/gcc/releases/
${GNU_MIRROR}/gcc/ http://mirrors.rcn.net/pub/sourceware/gcc/releases/
${GNU_MIRROR}/gcc/releases/ http://gcc.get-software.com/releases/
${GNU_MIRROR}/gcc/ http://gcc.get-software.com/releases/
}
#
# Set some default values
#
gcclibdir = "${libdir}/gcc"
BINV = "${PV}"
S = "${WORKDIR}/gcc-${PV}"
B = "${S}/build.${HOST_SYS}.${TARGET_SYS}"

View File

@ -1,22 +1,15 @@
MIRRORS_prepend () {
${GNU_MIRROR}/gcc/releases/ ftp://gcc.gnu.org/pub/gcc/releases/
${GNU_MIRROR}/gcc/ http://mirrors.rcn.net/pub/sourceware/gcc/releases/
${GNU_MIRROR}/gcc/releases/ http://gcc.get-software.com/releases/
${GNU_MIRROR}/gcc/ http://gcc.get-software.com/releases/
}
#
# Build the list of lanaguages to build.
#
# These can be overridden by the version specific .inc file.
gcclibdir ?= "${libdir}/gcc"
S = "${WORKDIR}/gcc-${PV}"
B = "${S}/build.${HOST_SYS}.${TARGET_SYS}"
BINV ?= "${PV}"
# gcj doesn't work on some architectures
# Java (gcj doesn't work on all architectures)
JAVA ?= ",java"
JAVA_arm ?= ""
JAVA_armeb ?= ""
JAVA_mipsel ?= ""
JAVA_sh3 ?= ""
# gcc4-build sets this to f95
# gcc 3.x expects 'f77', 4.0 expects 'f95', 4.1 and 4.2 expect 'fortran'
FORTRAN ?= ",f77"
LANGUAGES ?= "c,c++${FORTRAN}${JAVA}"
@ -32,16 +25,13 @@ EXTRA_OECONF = "${@['--enable-clocale=generic', ''][bb.data.getVar('USE_NLS', d,
--enable-symvers=gnu \
--enable-libstdcxx-pch \
--program-prefix=${TARGET_PREFIX} \
${EXTRA_OECONF_PATHS} \
${EXTRA_OECONF_DEP}"
${EXTRA_OECONF_PATHS}"
EXTRA_OECONF_PATHS = " \
--with-local-prefix=${prefix}/local \
--with-gxx-include-dir=${includedir}/c++/${BINV}"
EXTRA_OECONF_DEP = ""
EXTRA_OECONF_uclibc = "--disable-__cxa_atexit"
EXTRA_OECONF_glibc = "--enable-__cxa_atexit"
# Build uclibc compilers without cxa_atexit support
EXTRA_OECONF_append_linux = " --enable-__cxa_atexit"
EXTRA_OECONF_append_linux-gnueabi = " --enable-__cxa_atexit"
EXTRA_OECONF_append_linux-uclibc = " --disable-__cxa_atexit"
EXTRA_OECONF_append_linux-uclibcgnueabi = " --disable-__cxa_atexit"
EXTRA_OECONF += "${@get_gcc_fpu_setting(bb, d)}"
CPPFLAGS = ""
@ -54,21 +44,6 @@ ARCH_FLAGS_FOR_TARGET_slugos = "${TARGET_CC_ARCH}"
ARCH_FLAGS_FOR_TARGET_unslung = "${TARGET_CC_ARCH}"
EXTRA_OEMAKE += "ARCH_FLAGS_FOR_TARGET='${ARCH_FLAGS_FOR_TARGET}'"
require gcc-fpu.inc
python __anonymous () {
import bb, re
if (re.match('linux-uclibc$', bb.data.getVar('TARGET_OS', d, 1)) != None):
bb.data.setVar('EXTRA_OECONF_DEP', '${EXTRA_OECONF_uclibc}', d)
elif (re.match('linux-uclibcgnueabi$', bb.data.getVar('TARGET_OS', d, 1)) != None):
bb.data.setVar('EXTRA_OECONF_DEP', '${EXTRA_OECONF_uclibc}', d)
elif (re.match('linux-gnueabi$', bb.data.getVar('TARGET_OS', d, 1)) != None):
bb.data.setVar('EXTRA_OECONF_DEP', '${EXTRA_OECONF_glibc}', d)
elif (re.match('linux$', bb.data.getVar('TARGET_OS', d, 1)) != None):
bb.data.setVar('EXTRA_OECONF_DEP', '${EXTRA_OECONF_glibc}', d)
}
do_configure () {
# Setup these vars for cross building only
# ... because foo_FOR_TARGET apparently gets misinterpreted inside the
@ -96,3 +71,4 @@ do_configure () {
(cd ${S} && gnu-configize) || die "failure running gnu-configize"
oe_runconf
}

View File

@ -1,3 +1,5 @@
require gcc-configure-common.inc
USE_NLS = '${@base_conditional( "TARGET_OS", "linux-uclibc", "no", "", d )}'
EXTRA_OECONF_PATHS = "--with-local-prefix=${STAGING_DIR_TARGET}${layout_prefix} \
@ -18,14 +20,20 @@ do_compile_prepend () {
export CC_FOR_TARGET="${CCACHE} ${TARGET_SYS}-gcc ${TARGET_CC_ARCH}"
}
LIBGCCS_VAR = "-lgcc_s"
LIBGCCS_VAR_avr32 = ""
do_stage_append () {
for d in info man share/doc share/locale ; do
rm -rf ${CROSS_DIR}/$d
done
# These aren't useful on the cross toolchain
rm -f ${CROSS_DIR}/bin/*gcov
rm -f ${CROSS_DIR}/bin/*gccbug
# Fix a few include links so cross builds are happier
if [ ! -e ${STAGING_INCDIR}/c++ ]; then
mkdir -p ${STAGING_INCDIR}
ln -sf ${CROSS_DIR}/${TARGET_SYS}/include/c++ \
${STAGING_INCDIR}/
fi
# We use libiberty from binutils
rm -f ${CROSS_DIR}/lib/libiberty.a
@ -41,8 +49,8 @@ do_stage_append () {
done
#fix up libsupc++ and libstdc++ la files
sed -i "s|dependency_libs\s*=\s*.*|dependency_libs='-L${CROSS_DIR}/${TARGET_SYS}/lib -lgcc_s -lc -lm '|" ${CROSS_DIR}/${TARGET_SYS}/lib/libsupc++.la || true
sed -i "s|dependency_libs\s*=\s*.*|dependency_libs='-L${CROSS_DIR}/${TARGET_SYS}/lib -lgcc_s -lc -lm '|" ${CROSS_DIR}/${TARGET_SYS}/lib/libstdc++.la || true
sed -i "s|dependency_libs\s*=\s*.*|dependency_libs='-L${CROSS_DIR}/${TARGET_SYS}/lib ${LIBGCCS_VAR} -lc -lm '|" ${CROSS_DIR}/${TARGET_SYS}/lib/libsupc++.la || true
sed -i "s|dependency_libs\s*=\s*.*|dependency_libs='-L${CROSS_DIR}/${TARGET_SYS}/lib ${LIBGCCS_VAR} -lc -lm '|" ${CROSS_DIR}/${TARGET_SYS}/lib/libstdc++.la || true
}
do_package_write_ipk[depends] += "virtual/libc:do_package"
do_package_write_ipk[depends] += "virtual/libc:do_package

View File

@ -0,0 +1,51 @@
require gcc-configure-common.inc
# The two lines below conflict, this needs fixing - RP
USE_NLS = '${@base_conditional( "TARGET_OS", "linux-uclibc", "no", "", d )}'
USE_NLS = '${@base_conditional( "TARGET_OS", "linux-uclibcgnueabi", "no", "", d )}'
EXTRA_OECONF_PATHS = "--with-local-prefix=${STAGING_DIR_TARGET}${layout_prefix} \
--with-gxx-include-dir=${STAGING_DIR_TARGET}/${layout_includedir}/c++ \
--with-sysroot=${prefix}/${TARGET_SYS} \
--with-build-sysroot=${STAGING_DIR_TARGET}"
#
# gcc-cross looks and finds these in ${exec_prefix} but we're not so lucky
# for the sdk. Hardcoding the paths ensures the build doesn't go canadian or worse.
#
export AR_FOR_TARGET = "${CROSS_DIR}/${TARGET_SYS}/bin/ar"
export AS_FOR_TARGET = "${CROSS_DIR}/${TARGET_SYS}/bin/as"
export DLLTOOL_FOR_TARGET = "${CROSS_DIR}/${TARGET_SYS}/bin/dlltool"
export LD_FOR_TARGET = "${CROSS_DIR}/${TARGET_SYS}/bin/ld"
export LIPO_FOR_TARGET = "${CROSS_DIR}/${TARGET_SYS}/bin/lipo"
export NM_FOR_TARGET = "${CROSS_DIR}/${TARGET_SYS}/bin/nm"
export OBJDUMP_FOR_TARGET = "${CROSS_DIR}/${TARGET_SYS}/bin/objdump"
export RANLIB_FOR_TARGET = "${CROSS_DIR}/${TARGET_SYS}/bin/ranlib"
export STRIP_FOR_TARGET = "${CROSS_DIR}/${TARGET_SYS}/bin/strip"
export WINDRES_FOR_TARGET = "${CROSS_DIR}/${TARGET_SYS}/bin/windres"
#
# We need to override this and make sure the compiler can find staging
#
export ARCH_FLAGS_FOR_TARGET = "--sysroot=${STAGING_DIR_TARGET}"
do_configure () {
export CC_FOR_BUILD="${BUILD_CC}"
export CXX_FOR_BUILD="${BUILD_CXX}"
export CFLAGS_FOR_BUILD="${BUILD_CFLAGS}"
export CPPFLAGS_FOR_BUILD="${BUILD_CPPFLAGS}"
export CXXFLAGS_FOR_BUILD="${BUILD_CXXFLAGS}"
export LDFLAGS_FOR_BUILD="${BUILD_LDFLAGS}"
(cd ${S} && gnu-configize) || die "failure running gnu-configize"
oe_runconf
}
do_compile () {
export CC="${BUILD_CC}"
export AR_FOR_TARGET="${TARGET_SYS}-ar"
export RANLIB_FOR_TARGET="${TARGET_SYS}-ranlib"
export LD_FOR_TARGET="${TARGET_SYS}-ld"
export NM_FOR_TARGET="${TARGET_SYS}-nm"
export CC_FOR_TARGET="${CCACHE} ${TARGET_SYS}-gcc ${TARGET_CC_ARCH}"
base_do_compile
}

View File

@ -0,0 +1,6 @@
require gcc-configure-common.inc
EXTRA_OECONF_PATHS = " \
--with-local-prefix=${prefix}/local \
--with-gxx-include-dir=${includedir}/c++/${BINV}"

View File

@ -1,9 +1,11 @@
DEPENDS = "virtual/${TARGET_PREFIX}binutils"
DEPENDS += "${@['virtual/${TARGET_PREFIX}libc-initial',''][bb.data.getVar('TARGET_ARCH', d, 1) in ['arm', 'armeb', 'mips', 'mipsel']]}"
# @todo Please add comment on why this is (still?) needed?
DEPENDS += "${@['virtual/${TARGET_PREFIX}libc-initial',''][bb.data.getVar('TARGET_ARCH', d, 1) in ['arm', 'armeb', 'mips', 'mipsel', 'powerpc']]}"
PROVIDES = "virtual/${TARGET_PREFIX}gcc-initial"
PACKAGES = ""
# This is intended to be a -very- basic config
# sysroot is needed in case we use libc-initial
EXTRA_OECONF = "--with-local-prefix=${STAGING_DIR_TARGET}${layout_prefix} \
--with-newlib \
--disable-shared \
@ -13,6 +15,8 @@ EXTRA_OECONF = "--with-local-prefix=${STAGING_DIR_TARGET}${layout_prefix} \
--enable-languages=c \
--enable-target-optspace \
--program-prefix=${TARGET_PREFIX} \
--with-sysroot=${STAGING_DIR_TARGET} \
--with-build-sysroot=${STAGING_DIR_TARGET} \
${@get_gcc_fpu_setting(bb, d)}"
do_stage_prepend () {

View File

@ -1,2 +0,0 @@
require gcc-cross_${PV}.bb
require gcc-cross-initial.inc

View File

@ -0,0 +1,2 @@
require gcc-cross_csl-arm-2005q3.bb
require gcc-cross-initial.inc

View File

@ -1,29 +0,0 @@
--- gcc-3.4.4/gcc/Makefile.in.orig 2005-07-25 21:00:37 +0200
+++ gcc-3.4.4/gcc/Makefile.in 2005-07-25 21:01:19 +0200
@@ -304,7 +304,7 @@
if [ "$(host)" = "$(target)" ] ; then \
echo ar; \
else \
- t='$(program_transform_name)'; echo ar | sed -e $$t ; \
+ t='$(program_transform_name)'; echo ar | sed -e "$$t" ; \
fi; \
fi`
AR_FLAGS_FOR_TARGET =
@@ -317,7 +317,7 @@
if [ "$(host)" = "$(target)" ] ; then \
echo $(RANLIB); \
else \
- t='$(program_transform_name)'; echo ranlib | sed -e $$t ; \
+ t='$(program_transform_name)'; echo ranlib | sed -e "$$t" ; \
fi; \
fi`
NM_FOR_TARGET = ` \
@@ -329,7 +329,7 @@
if [ "$(host)" = "$(target)" ] ; then \
echo nm; \
else \
- t='$(program_transform_name)'; echo nm | sed -e $$t ; \
+ t='$(program_transform_name)'; echo nm | sed -e "$$t" ; \
fi; \
fi`

View File

@ -0,0 +1,10 @@
# This kernel compiler is required by the Freecom FSG-3 machine
# Please talk to Rod Whitby before considering removing this file.
DEFAULT_PREFERENCE = "-1"
require gcc-cross-kernel.inc
require gcc-cross-initial_csl-arm-2005q3.bb
SRC_URI += "file://gcc-3.4.4-makefile-fix.patch;patch=1"

View File

@ -1,6 +1,5 @@
SECTION = "devel"
# cut-down gcc for kernel builds
# only installs ${TARGET_PREFIX}gcc-${PV}, not ${TARGET_PREFIX}gcc.
# Cut-down gcc for kernel builds
# Only installs ${TARGET_PREFIX}gcc-${PV}, not ${TARGET_PREFIX}gcc.
PROVIDES = "virtual/${TARGET_PREFIX}gcc-${PV}"
@ -13,4 +12,3 @@ do_stage () {
oe_runmake install-common install-headers install-libgcc
install -m 0755 xgcc ${CROSS_DIR}/bin/${TARGET_PREFIX}gcc-${PV}
}

View File

@ -1,5 +0,0 @@
require gcc-cross-initial_${PV}.bb
require gcc-cross-kernel.inc
SRC_URI += "file://gcc-3.4.4-makefile-fix.patch;patch=1"

View File

@ -1,16 +1,8 @@
DESCRIPTION = "The GNU cc and gcc C compilers."
HOMEPAGE = "http://www.gnu.org/software/gcc/"
SECTION = "devel"
LICENSE = "GPL"
require gcc_${PV}.bb
PR = "r3"
inherit sdk
FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/gcc-${PV}"
DEPENDS = "virtual/${TARGET_PREFIX}binutils virtual/${TARGET_PREFIX}libc-for-gcc"
PACKAGES = "${PN}"
require gcc3-build-sdk.inc
require gcc-${PV}.inc
require gcc-cross-sdk.inc
require gcc-configure-sdk.inc
require gcc-package-sdk.inc
SRC_URI += 'file://sdk-libstdc++-includes.patch;patch=1'

View File

@ -1,13 +1,10 @@
PR = "r6"
PR = "r5"
inherit sdk
FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/gcc-${PV}"
DEPENDS = "virtual/${TARGET_PREFIX}binutils virtual/${TARGET_PREFIX}libc-for-gcc gmp-native mpfr-native"
require gcc_${PV}.bb
require gcc4-build-sdk.inc
require gcc-${PV}.inc
require gcc-cross-sdk.inc
require gcc-configure-sdk.inc
require gcc-package-sdk.inc
DEPENDS += "gmp-native mpfr-native"
EXTRA_OECONF += "--disable-libunwind-exceptions --with-mpfr=${STAGING_DIR_NATIVE}${layout_exec_prefix}"

View File

@ -1,20 +1,13 @@
DESCRIPTION = "The GNU cc and gcc C compilers."
HOMEPAGE = "http://www.gnu.org/software/gcc/"
SECTION = "devel"
LICENSE = "GPL"
PR = "r3"
inherit sdk
FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/gcc-${PV}"
PACKAGES = "${PN}"
require gcc_${PV}.bb
require gcc4-build-sdk.inc
require gcc-${PV}.inc
require gcc-cross-sdk.inc
require gcc-configure-sdk.inc
require gcc-package-sdk.inc
DEPENDS = "virtual/${TARGET_PREFIX}binutils virtual/${TARGET_PREFIX}libc-for-gcc gmp-native mpfr-native"
DEPENDS += "gmp-native mpfr-native"
EXTRA_OECONF += "--disable-libunwind-exceptions --disable-libssp \
--disable-libgomp --disable-libmudflap \

View File

@ -1,11 +0,0 @@
PR = "r1"
inherit sdk
FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/gcc-${PV}"
DEPENDS = "virtual/${TARGET_PREFIX}binutils virtual/${TARGET_PREFIX}libc-for-gcc"
require gcc_${PV}.bb
require gcc4-build-sdk.inc
require gcc-package-sdk.inc

View File

@ -0,0 +1,8 @@
PR = "r3"
inherit sdk
require gcc-${PV}.inc
require gcc-cross-sdk.inc
require gcc-configure-sdk.inc
require gcc-package-sdk.inc

View File

@ -1,15 +0,0 @@
require gcc_csl-arm-2005q3-2.bb
# path mangling, needed by the cross packaging
require gcc-paths-cross.inc
inherit cross
# NOTE: split PR. If the main .oe changes something that affects its *build*
# remember to increment this one too.
PR = "r0"
DEPENDS = "virtual/${TARGET_PREFIX}binutils virtual/${TARGET_PREFIX}libc-for-gcc"
PROVIDES = "virtual/${TARGET_PREFIX}gcc virtual/${TARGET_PREFIX}g++"
# cross build
require gcc3-build-cross.inc
# cross packaging
require gcc-package-cross.inc

View File

@ -0,0 +1,6 @@
PR = "r2"
require gcc-csl-arm-2005q3.inc
require gcc-cross.inc
require gcc-configure-cross.inc
require gcc-package-cross.inc

View File

@ -1,19 +1,6 @@
require gcc_csl-arm-2006q1.bb
# path mangling, needed by the cross packaging
require gcc-paths-cross.inc
inherit cross
# NOTE: split PR. If the main .oe changes something that affects its *build*
# remember to increment this one too.
PR = "r1"
DEPENDS = "virtual/${TARGET_PREFIX}binutils virtual/${TARGET_PREFIX}libc-for-gcc"
# gmp-native mpfr-native"
PROVIDES = "virtual/${TARGET_PREFIX}gcc virtual/${TARGET_PREFIX}g++"
# cross build
require gcc4-build-cross.inc
# cross packaging
require gcc-csl-arm-2006q1.inc
require gcc-cross.inc
require gcc-configure-cross.inc
require gcc-package-cross.inc
S = "${WORKDIR}/gcc-2006q1"

View File

@ -0,0 +1,22 @@
require gcc-common.inc
BINV = "3.4.4"
PV = "3.4.4+csl-arm-2005q3"
PV_chinook-compat = "3.4.4cs2005q3.2"
FILESDIR = "${FILE_DIRNAME}/gcc-csl-arm"
SRC_URI = "http://www.codesourcery.com/public/gnu_toolchain/arm-none-eabi/arm-2005q3-2-arm-none-eabi.src.tar.bz2 \
file://gcc_optab_arm.patch;patch=1 \
file://gcc-3.4.4-eabi-bigendian.patch;patch=1"
S = "${WORKDIR}/gcc-2005q3"
do_unpack2() {
cd ${WORKDIR}
tar -xvjf ./arm-2005q3-2-arm-none-eabi/gcc-2005q3-2.tar.bz2
}
addtask unpack2 after do_unpack before do_patch

View File

@ -0,0 +1,19 @@
require gcc-common.inc
BINV = "4.1.0"
PV = "4.1.0+csl-arm-2006q1-6"
FILESDIR = "${FILE_DIRNAME}/gcc-csl-arm"
SRC_URI = "http://www.codesourcery.com/public/gnu_toolchain/arm-none-eabi/arm-2006q1-6-arm-none-eabi.src.tar.bz2 \
file://gcc-configure-no-fortran.patch;patch=1;pnum=1 \
file://gcc-new-makeinfo.patch;patch=1"
S = "${WORKDIR}/gcc-2006q1"
do_unpack2() {
cd ${WORKDIR}
tar -xvjf ./arm-2006q1-6-arm-none-eabi/gcc-2006q1-6.tar.bz2
}
addtask unpack2 after do_unpack before do_patch

View File

@ -1,6 +0,0 @@
def get_gcc_fpu_setting(bb, d):
if bb.data.getVar('TARGET_FPU', d, 1) in [ 'soft' ]:
return "--with-float=soft"
return ""

View File

@ -4,8 +4,6 @@ PROVIDES = "gcc-native-${PV}"
inherit native
FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/gcc-${PV}"
# This is intended to be a -very- basic config
EXTRA_OECONF = "--with-local-prefix=${STAGING_DIR_TARGET}${layout_prefix} \
--with-newlib \

View File

@ -1,3 +1,6 @@
require gcc_${PV}.bb
PR = "r7"
require gcc-${PV}.inc
require gcc-configure-target.inc
require gcc-native.inc
PROVIDES += "gcc3-native"

View File

@ -1,71 +1,65 @@
# Packages emitted by our gcc-cross builds.
#
INHIBIT_PACKAGE_STRIP ?= ""
HAS_G2C ?= "yes"
HAS_GFORTRAN ?= "no"
OLD_INHIBIT_PACKAGE_STRIP := "${INHIBIT_PACKAGE_STRIP}"
INHIBIT_PACKAGE_STRIP = "1"
# Do not generate *-dev packages as they are generated by 'gcc' recipe
PACKAGES = "libgcc libstdc++ libg2c libgfortran"
# Called from within gcc-cross, so libdir is set wrong
FILES_libg2c = "${target_libdir}/libg2c.so.*"
FILES_libg2c-dev = "${target_libdir}/libg2c.so \
${target_libdir}/libg2c.a \
${target_libdir}/libfrtbegin.a"
FILES_libgfortran = "${target_libdir}/libgfortran.so.*"
FILES_libgfortran-dev = "${target_libdir}/libgfortran.a \
${target_libdir}/libgfortran.so \
${target_libdir}/libgfortranbegin.a"
FILES_libgcc = "${target_base_libdir}/libgcc_s.so.1"
FILES_libgcc-dev = "${target_base_libdir}/libgcc_s.so"
FILES_libstdc++ = "${target_libdir}/libstdc++.so.*"
FILES_libstdc++-dev = "${target_includedir}/c++/${PV} \
${target_libdir}/libstdc++.so \
${target_libdir}/libstdc++.la \
${target_libdir}/libstdc++.a \
${target_libdir}/libsupc++.la \
${target_libdir}/libsupc++.a"
python do_package() {
if bb.data.getVar('DEBIAN_NAMES', d, 1):
bb.data.setVar('PKG_libgcc', 'libgcc1', d)
bb.build.exec_func('package_do_package', d)
}
do_install () {
oe_runmake 'DESTDIR=${D}' install
# Move libgcc_s into /lib
mkdir -p ${D}${target_base_libdir}
if [ -f ${D}${target_base_libdir}/libgcc_s.so.? ]; then
# Already in the right location
:
elif [ -f ${D}${prefix}/lib/libgcc_s.so.? ]; then
mv -f ${D}${prefix}/lib/libgcc_s.so* ${D}${target_base_libdir}
else
mv -f ${D}${prefix}/*/lib/libgcc_s.so* ${D}${target_base_libdir}
fi
mkdir -p ${D}${target_base_libdir}
if [ -f ${D}${target_base_libdir}/libgcc_s.so.? ]; then
# Already in the right location
:
elif [ -f ${D}${prefix}/lib/libgcc_s.so.? ]; then
mv -f ${D}${prefix}/lib/libgcc_s.so* ${D}${target_base_libdir} || true
elif [ -f ${D}${prefix}/*/lib/nof/libgcc_s.so.? ]; then
mv -f ${D}${prefix}/*/lib/nof/libgcc_s.so* ${D}${target_base_libdir}
else
mv -f ${D}${prefix}/*/lib/libgcc_s.so* ${D}${target_base_libdir} || true
fi
# Move libstdc++ and libg2c into libdir (resetting our prefix to /usr
mkdir -p ${D}${target_libdir}
mv -f ${D}${prefix}/*/lib/libstdc++.so* ${D}${target_libdir}
if [ "${HAS_G2C}" = "yes" ]; then
mv -f ${D}${prefix}/*/lib/libg2c.so* ${D}${target_libdir} || true
fi
if [ "${HAS_GFORTRAN}" = "yes" ]; then
mv -f ${D}${prefix}/*/lib/libgfortran*.so* ${D}${target_libdir}
fi
mkdir -p ${D}${target_libdir}
if [ -f ${D}${prefix}/*/lib/nof/libstdc++.so ]; then
mv -f ${D}${prefix}/*/lib/nof/libstdc++.so* ${D}${target_libdir} || true
mv -f ${D}${prefix}/*/lib/nof/libg2c.so* ${D}${target_libdir} || true
mv -f ${D}${prefix}/*/lib/nof/libgfortran*.so* ${D}${target_libdir} || true
else
mv -f ${D}${prefix}/*/lib/libstdc++.so* ${D}${target_libdir} || true
mv -f ${D}${prefix}/*/lib/libg2c.so* ${D}${target_libdir} || true
mv -f ${D}${prefix}/*/lib/libgfortran*.so* ${D}${target_libdir} || true
fi
# Manually run the target stripper since we won't get it run by
# the packaging.
if [ "x${OLD_INHIBIT_PACKAGE_STRIP}" != "x1" ]; then
${TARGET_PREFIX}strip ${D}${target_libdir}/libstdc++.so.*
${TARGET_PREFIX}strip ${D}${target_libdir}/libg2c.so.* || true
${TARGET_PREFIX}strip ${D}${target_base_libdir}/libgcc_s.so.*
fi
${TARGET_PREFIX}strip ${D}${target_base_libdir}/libgcc_s.so.* || true
${TARGET_PREFIX}strip ${D}${target_libdir}/libgfortran*.so* || true
fi
# Link gfortran to g77 to satisfy not-so-smart configure or hard coded g77
# gfortran is fully backwards compatible. This is a safe and practical solution.
ln -sf ${CROSS_DIR}/bin/${TARGET_PREFIX}gfortran ${CROSS_DIR}/bin/${TARGET_PREFIX}g77 || true
ln -sf ${CROSS_DIR}/${TARGET_SYS}/bin/gfortran ${CROSS_DIR}/${TARGET_SYS}/bin/g77 || true
}

View File

@ -1,12 +1,4 @@
#
# Note gcc-package.inc was already included before us.
#
# We override PACKAGES and FILES to change the packaging
#
INHIBIT_PACKAGE_STRIP ?= ""
HAS_G2C ?= "yes"
HAS_GFORTRAN ?= "no"
OLD_INHIBIT_PACKAGE_STRIP := "${INHIBIT_PACKAGE_STRIP}"
INHIBIT_PACKAGE_STRIP = "1"
@ -29,6 +21,12 @@ FILES_${PN} = "\
${prefix}/${TARGET_SYS}/bin/* \
${prefix}/${TARGET_SYS}/lib/* \
"
FILES_${PN}-doc = "\
${infodir} \
${mandir} \
${gcclibdir}/${TARGET_SYS}/${BINV}/include/README \
"
do_install () {
oe_runmake 'DESTDIR=${D}' install

View File

@ -0,0 +1,157 @@
PACKAGES = "\
${PN} ${PN}-symlinks \
g++ g++-symlinks \
cpp cpp-symlinks \
g77 g77-symlinks \
gfortran gfortran-symlinks \
gcov gcov-symlinks \
libmudflap libmudflap-dev \
libgcc-dev \
libstdc++-dev \
libg2c-dev \
libgfortran-dev \
${PN}-doc \
"
FILES_${PN} = "\
${bindir}/${TARGET_PREFIX}gcc \
${bindir}/${TARGET_PREFIX}gccbug \
${libexecdir}/gcc/${TARGET_SYS}/${BINV}/collect2 \
${gcclibdir}/${TARGET_SYS}/${BINV}/*.o \
${gcclibdir}/${TARGET_SYS}/${BINV}/specs \
${gcclibdir}/${TARGET_SYS}/${BINV}/lib* \
${gcclibdir}/${TARGET_SYS}/${BINV}/include \
"
FILES_${PN}-symlinks = "\
${bindir}/cc \
${bindir}/gcc \
${bindir}/gccbug \
"
FILES_g77 = "\
${bindir}/${TARGET_PREFIX}g77 \
${libexecdir}/gcc/${TARGET_SYS}/${BINV}/f771 \
"
FILES_g77-symlinks = "\
${bindir}/g77 \
${bindir}/f77 \
"
FILES_gfortran = "\
${bindir}/${TARGET_PREFIX}gfortran \
${libexecdir}/gcc/${TARGET_SYS}/${BINV}/f951 \
"
FILES_gfortran-symlinks = "\
${bindir}/gfortran \
${bindir}/f95"
FILES_cpp = "\
${bindir}/${TARGET_PREFIX}cpp \
${base_libdir}/cpp \
${libexecdir}/gcc/${TARGET_SYS}/${BINV}/cc1"
FILES_cpp-symlinks = "${bindir}/cpp"
FILES_gcov = "${bindir}/${TARGET_PREFIX}gcov"
FILES_gcov-symlinks = "${bindir}/gcov"
FILES_libgcc = "${base_libdir}/libgcc*.so.*"
FILES_libgcc-dev = "${base_libdir}/libgcc*.so"
# Called from within gcc-cross, so libdir is set wrong
FILES_libg2c = "${target_libdir}/libg2c.so.*"
FILES_libg2c-dev = "\
${libdir}/libg2c.so \
${libdir}/libg2c.a \
${libdir}/libfrtbegin.a \
"
FILES_g++ = "\
${bindir}/${TARGET_PREFIX}g++ \
${libexecdir}/gcc/${TARGET_SYS}/${BINV}/cc1plus \
"
FILES_g++-symlinks = "\
${bindir}/c++ \
${bindir}/g++ \
"
FILES_libstdc++ = "${libdir}/libstdc++.so.*"
FILES_libstdc++-dev = "\
${includedir}/c++/${BINV} \
${libdir}/libstdc++.so \
${libdir}/libstdc++.la \
${libdir}/libstdc++.a \
${libdir}/libsupc++.la \
${libdir}/libsupc++.a \
"
FILES_libgfortran-dev = "${libdir}/libgfortran.a \
${libdir}/libgfortran.so \
${libdir}/libgfortranbegin.a"
FILES_libmudflap = "${libdir}/libmudflap*.so.*"
FILES_libmudflap-dev = "\
${libdir}/libmudflap*.so \
${libdir}/libmudflap*.a \
${libdir}/libmudflap*.a \
"
FILES_${PN}-doc = "\
${infodir} \
${mandir} \
${gcclibdir}/${TARGET_SYS}/${BINV}/include/README \
"
do_install () {
autotools_do_install
# Cleanup some of the ${libdir}{,exec}/gcc stuff ...
rm -r ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/install-tools
rm -r ${D}${libexecdir}/gcc/${TARGET_SYS}/${BINV}/install-tools
# Hack around specs file assumptions
test -f ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/specs && sed -i -e '/^*cross_compile:$/ { n; s/1/0/; }' ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/specs
# Move libgcc_s into /lib
mkdir -p ${D}${base_libdir}
if [ -f ${D}${libdir}/nof/libgcc_s.so ]; then
mv ${D}${libdir}/nof/libgcc_s.so.* ${D}${base_libdir}
else
mv ${D}${libdir}/libgcc_s.so.* ${D}${base_libdir}
fi
rm -f ${D}${libdir}/libgcc_s.so
ln -sf `echo ${libdir}/gcc/${TARGET_SYS}/${BINV} \
| tr -s / \
| sed -e 's,^/,,' -e 's,[^/]*,..,g'`/lib/libgcc_s.so.1 \
${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/libgcc_s.so
# We don't need libtool libraries
rm -f ${D}${libdir}/libg2c.la &>/dev/null || true
# Cleanup manpages..
rm -rf ${D}${mandir}/man7
# We use libiberty from binutils
rm -f ${D}${libdir}/libiberty.a
cd ${D}${bindir}
# We care about g++ not c++
rm -f *c++
# We don't care about the gcc-<version> ones for this
rm -f *gcc-?.?*
# These sometimes show up, they are strange, we remove them
rm -f ${TARGET_ARCH}-*${TARGET_ARCH}-*
# Symlinks so we can use these trivially on the target
ln -sf ${TARGET_SYS}-g77 g77 || true
ln -sf ${TARGET_SYS}-gfortran gfortran || true
ln -sf ${TARGET_SYS}-g++ g++
ln -sf ${TARGET_SYS}-gcc gcc
ln -sf g77 f77 || true
ln -sf gfortran f95 || true
ln -sf g++ c++
ln -sf gcc cc
ln -sf ${bindir}/${TARGET_SYS}-cpp ${D}${base_libdir}/cpp
ln -sf ${bindir}/${TARGET_SYS}-cpp ${D}${bindir}/cpp
}

View File

@ -1,7 +0,0 @@
# Note that we use := here, and require that this
# is included at the correct point (before inheriting
# cross) to ensure that libdir and includedir are
# target paths, not CROSS_DIR paths.
target_libdir := "${libdir}"
target_includedir := "${includedir}"
target_base_libdir := "${base_libdir}"

View File

@ -1,27 +0,0 @@
USE_NLS = '${@base_conditional( "TARGET_OS", "linux-uclibc", "no", "", d )}'
SRC_URI += 'file://sdk-libstdc++-includes.patch;patch=1'
STAGING_TARGET_INCDIR = "${STAGING_DIR}/${TARGET_SYS}/include"
STAGING_TARGET_LIBDIR = "${STAGING_DIR}/${TARGET_SYS}/lib"
do_configure () {
(cd ${S} && gnu-configize) || die "failure running gnu-configize"
(cd ${S}/libstdc++-v3 && autoreconf)
oe_runconf
mkdir -p gcc
ln -sf ${CROSS_DIR}/bin/${TARGET_PREFIX}as gcc/as
ln -sf ${CROSS_DIR}/bin/${TARGET_PREFIX}ld gcc/ld
ln -sf ${STAGING_TARGET_INCDIR}/* ${S}/include
ln -sf ${STAGING_TARGET_LIBDIR}/crt*.o gcc/
}
do_compile () {
export CC="${BUILD_CC}"
export AR_FOR_TARGET="${TARGET_SYS}-ar"
export RANLIB_FOR_TARGET="${TARGET_SYS}-ranlib"
export LD_FOR_TARGET="${TARGET_SYS}-ld"
export NM_FOR_TARGET="${TARGET_SYS}-nm"
export CC_FOR_TARGET="${CCACHE} ${TARGET_SYS}-gcc ${TARGET_CC_ARCH}"
oe_runmake CFLAGS_FOR_TARGET="-I${STAGING_TARGET_INCDIR}"
}

View File

@ -1,6 +0,0 @@
FORTRAN = ",fortran"
HAS_GFORTRAN ?= "yes"
HAS_G2C = "no"
include gcc3-build-cross.inc

View File

@ -1,20 +0,0 @@
USE_NLS = '${@base_conditional( "TARGET_OS", "linux-uclibc", "no", "", d )}'
USE_NLS = '${@base_conditional( "TARGET_OS", "linux-uclibcgnueabi", "no", "", d )}'
EXTRA_OECONF += "--with-sysroot=${prefix}/${TARGET_SYS} --with-build-sysroot=${STAGING_DIR_TARGET}"
do_configure () {
(cd ${S} && gnu-configize) || die "failure running gnu-configize"
(cd ${S}/libstdc++-v3 && autoreconf)
oe_runconf
}
do_compile () {
export CC="${BUILD_CC}"
export AR_FOR_TARGET="${TARGET_SYS}-ar"
export RANLIB_FOR_TARGET="${TARGET_SYS}-ranlib"
export LD_FOR_TARGET="${TARGET_SYS}-ld"
export NM_FOR_TARGET="${TARGET_SYS}-nm"
export CC_FOR_TARGET="${CCACHE} ${TARGET_SYS}-gcc ${TARGET_CC_ARCH}"
oe_runmake
}

View File

@ -1,6 +0,0 @@
FORTRAN = ",f95"
HAS_GFORTRAN ?= "yes"
HAS_G2C = "no"
include gcc3-build.inc

View File

@ -1,30 +1,5 @@
PR = "r6"
DESCRIPTION = "The GNU cc and gcc C compilers."
HOMEPAGE = "http://www.gnu.org/software/gcc/"
SECTION = "devel"
LICENSE = "GPL"
PR = "r7"
inherit autotools gettext
require gcc-package.inc
SRC_URI = "${GNU_MIRROR}/gcc/gcc-${PV}/gcc-${PV}.tar.bz2 \
file://gcc34-reverse-compare.patch;patch=1 \
file://gcc34-arm-ldm.patch;patch=1 \
file://gcc34-arm-ldm-peephole.patch;patch=1 \
file://gcc34-arm-tune.patch;patch=1 \
file://gcc-3.4.1-uclibc-100-conf.patch;patch=1 \
file://gcc-3.4.1-uclibc-200-locale.patch;patch=1 \
file://gcc-3.4.0-arm-lib1asm.patch;patch=1 \
file://gcc-3.4.0-arm-nolibfloat.patch;patch=1 \
file://gcc-3.4.0-arm-bigendian.patch;patch=1 \
file://gcc-3.4.0-arm-bigendian-uclibc.patch;patch=1 \
file://GCC3.4.0VisibilityPatch.diff;patch=1 \
file://15342.patch;patch=1 \
file://jarfix.patch;patch=1 \
file://always-fixincperm.patch;patch=1"
SRC_URI += "file://gcc34-configure.in.patch;patch=1"
SRC_URI += "file://gcc34-thumb-support.patch;patch=1"
require gcc3-build.inc
require gcc-${PV}.inc
require gcc-configure-target.inc
require gcc-package-target.inc

View File

@ -1,27 +1,5 @@
DESCRIPTION = "The GNU cc and gcc C compilers."
HOMEPAGE = "http://www.gnu.org/software/gcc/"
SECTION = "devel"
LICENSE = "GPL"
DEPENDS = "mpfr gmp"
PR = "r1"
PR = "r7"
inherit autotools gettext
require gcc-package.inc
SRC_URI = "${GNU_MIRROR}/gcc/gcc-${PV}/gcc-${PV}.tar.bz2 \
file://arm-nolibfloat.patch;patch=1 \
file://arm-softfloat.patch;patch=1 \
file://ldflags.patch;patch=1"
# uclibc patches below
SRC_URI_append = " file://100-uclibc-conf.patch;patch=1 \
file://200-uclibc-locale.patch;patch=1 \
file://301-missing-execinfo_h.patch;patch=1 \
file://302-c99-snprintf.patch;patch=1 \
file://303-c99-complex-ugly-hack.patch;patch=1 \
file://800-arm-bigendian.patch;patch=1 \
file://zecke-host-cpp-ac-hack.patch;patch=1 "
require gcc4-build.inc
require gcc-${PV}.inc
require gcc-configure-target.inc
require gcc-package-target.inc

View File

@ -1,54 +1,7 @@
PR = "r3"
DESCRIPTION = "The GNU cc and gcc C compilers."
HOMEPAGE = "http://www.gnu.org/software/gcc/"
SECTION = "devel"
LICENSE = "GPL"
PR = "r11"
ARM_INSTRUCTION_SET = "arm"
inherit autotools gettext
require gcc-package.inc
SRC_URI = "ftp://ftp.gnu.org/pub/gnu/gcc/gcc-4.1.2/gcc-4.1.2.tar.bz2 \
file://100-uclibc-conf.patch;patch=1 \
file://110-arm-eabi.patch;patch=1 \
file://200-uclibc-locale.patch;patch=1 \
file://300-libstdc++-pic.patch;patch=1 \
file://301-missing-execinfo_h.patch;patch=1 \
file://302-c99-snprintf.patch;patch=1 \
file://303-c99-complex-ugly-hack.patch;patch=1 \
file://304-index_macro.patch;patch=1 \
file://602-sdk-libstdc++-includes.patch;patch=1 \
file://740-sh-pr24836.patch;patch=1 \
file://800-arm-bigendian.patch;patch=1 \
file://arm-nolibfloat.patch;patch=1 \
file://arm-softfloat.patch;patch=1 \
file://gcc41-configure.in.patch;patch=1 \
file://arm-thumb.patch;patch=1 \
file://arm-thumb-cache.patch;patch=1 \
file://ldflags.patch;patch=1 \
file://zecke-xgcc-cpp.patch;patch=1 \
file://unbreak-armv4t.patch;patch=1 \
file://fix-ICE-in-arm_unwind_emit_set.diff;patch=1 \
file://cache-amnesia.patch;patch=1 \
"
SRC_URI_append_sh3 = " file://sh3-installfix-fixheaders.patch;patch=1 "
#Set the fortran bits
# 'fortran' or '', not 'f77' like gcc3 had
FORTRAN = ""
HAS_GFORTRAN = "no"
HAS_G2C = "no"
#Set the java bits
JAVA_arm = ""
JAVA = ""
LANGUAGES = "c,c++${FORTRAN}${JAVA}"
require gcc3-build.inc
EXTRA_OECONF += " --disable-libssp "
require gcc-${PV}.inc
require gcc-configure-target.inc
require gcc-package-target.inc
ARCH_FLAGS_FOR_TARGET += "-isystem${STAGING_INCDIR}"

View File

@ -1,96 +1,10 @@
DESCRIPTION = "The GNU cc and gcc C compilers."
HOMEPAGE = "http://www.gnu.org/software/gcc/"
SECTION = "devel"
LICENSE = "GPL"
PR = "r8"
PR = "r6"
inherit autotools gettext
require gcc-${PV}.inc
require gcc-configure-target.inc
require gcc-package-target.inc
require gcc-package.inc
SRC_URI_append = "file://fortran-cross-compile-hack.patch;patch=1"
SRC_URI = "ftp://ftp.gnu.org/pub/gnu/gcc/gcc-${PV}/gcc-${PV}.tar.bz2 \
file://100-uclibc-conf.patch;patch=1 \
file://103-uclibc-conf-noupstream.patch;patch=1 \
file://200-uclibc-locale.patch;patch=1 \
file://203-uclibc-locale-no__x.patch;patch=1 \
file://204-uclibc-locale-wchar_fix.patch;patch=1 \
file://205-uclibc-locale-update.patch;patch=1 \
file://300-libstdc++-pic.patch;patch=1 \
file://301-missing-execinfo_h.patch;patch=1 \
file://302-c99-snprintf.patch;patch=1 \
file://303-c99-complex-ugly-hack.patch;patch=1 \
file://304-index_macro.patch;patch=1 \
file://305-libmudflap-susv3-legacy.patch;patch=1 \
file://306-libstdc++-namespace.patch;patch=1 \
file://307-locale_facets.patch;patch=1 \
file://402-libbackend_dep_gcov-iov.h.patch;patch=1 \
file://602-sdk-libstdc++-includes.patch;patch=1 \
file://740-sh-pr24836.patch;patch=1 \
file://800-arm-bigendian.patch;patch=1 \
file://801-arm-bigendian-eabi.patch;patch=1 \
file://904-flatten-switch-stmt-00.patch;patch=1 \
file://arm-nolibfloat.patch;patch=1 \
file://arm-softfloat.patch;patch=1 \
file://gcc41-configure.in.patch;patch=1 \
file://arm-thumb.patch;patch=1 \
file://arm-thumb-cache.patch;patch=1 \
file://ldflags.patch;patch=1 \
file://zecke-xgcc-cpp.patch;patch=1 \
file://unbreak-armv4t.patch;patch=1 \
file://fix-ICE-in-arm_unwind_emit_set.diff;patch=1 \
file://cache-amnesia.patch;patch=1 \
file://gfortran.patch;patch=1 \
file://gcc-4.0.2-e300c2c3.patch;patch=1 \
file://pr34130.patch;patch=1 \
file://fortran-static-linking.patch;patch=1 \
file://intermask-bigendian.patch;patch=1 \
"
ARCH_FLAGS_FOR_TARGET += "-isystem${STAGING_INCDIR}"
SRC_URI_append_ep93xx = " \
file://arm-crunch-saveregs.patch;patch=1 \
file://arm-crunch-20000320.patch;patch=1 \
file://arm-crunch-compare.patch;patch=1 \
file://arm-crunch-compare-unordered.patch;patch=1 \
file://arm-crunch-compare-geu.patch;patch=1 \
file://arm-crunch-eabi-ieee754.patch;patch=1 \
file://arm-crunch-eabi-ieee754-div.patch;patch=1 \
file://arm-crunch-64bit-disable0.patch;patch=1 \
file://arm-crunch-offset.patch;patch=1 \
file://arm-crunch-fp_consts.patch;patch=1 \
file://arm-crunch-neg2.patch;patch=1 \
file://arm-crunch-predicates3.patch;patch=1 \
file://arm-crunch-cfcvtds-disable.patch;patch=1 \
file://arm-crunch-floatsi-disable.patch;patch=1 \
file://arm-crunch-truncsi-disable.patch;patch=1 \
file://arm-crunch-cfcvt64-disable.patch;patch=1 \
file://arm-crunch-cirrus-bugfixes.patch;patch=1 \
"
PACKAGE_ARCH_ep93xx = "${MACHINE_ARCH}"
SRC_URI_append_sh3 = " file://sh3-installfix-fixheaders.patch;patch=1 "
#Set the fortran bits
# 'i,fortran' or '', not 'f77' like gcc3 had
FORTRAN = ""
FORTRAN_linux-gnueabi = ",fortran"
DEPENDS += " gmp mpfr "
#Set the java bits
JAVA = ""
JAVA_arm = ""
LANGUAGES = "c,c++${FORTRAN}${JAVA}"
require gcc3-build.inc
ARCH_FLAGS_FOR_TARGET=-isystem${STAGING_INCDIR}
EXTRA_OECONF += " --disable-libssp --disable-bootstrap "
# We know some one is including us, but we only want to apply this fortran hack for the real gcc
python __anonymous () {
import bb
if bb.data.getVar('PN', d, True) == "gcc":
bb.data.setVar('SRC_URI_append', ' file://fortran-cross-compile-hack.patch;patch=1', d)
}

View File

@ -1,27 +0,0 @@
DESCRIPTION = "The GNU cc and gcc C compilers."
HOMEPAGE = "http://www.gnu.org/software/gcc/"
SECTION = "devel"
LICENSE = "GPL"
BINV = "3.4.4"
PV = "3.4.4+csl-arm-2005q3-2"
PR = "r1"
FILESDIR = "${FILE_DIRNAME}/gcc-csl-arm"
inherit autotools gettext
require gcc-package.inc
SRC_URI = "http://www.codesourcery.com/public/gnu_toolchain/arm-none-linux-gnueabi/arm-2005q3-2-arm-none-linux-gnueabi.src.tar.bz2"
do_unpack2() {
cd ${WORKDIR}
tar -xvjf ./arm-2005q3-2-arm-none-linux-gnueabi/gcc-2005q3-2.tar.bz2
rm -rf ./arm-2005q3-2-arm-none-linux-gnueabi
}
addtask unpack2 after do_unpack before do_patch
require gcc3-build.inc
S = "${WORKDIR}/gcc-2005q3"

View File

@ -0,0 +1,5 @@
PR = "r3"
require gcc-${PV}.inc
require gcc-configure-target.inc
require gcc-package-target.inc

View File

@ -1,31 +1,5 @@
DESCRIPTION = "The GNU cc and gcc C compilers."
HOMEPAGE = "http://www.gnu.org/software/gcc/"
SECTION = "devel"
LICENSE = "GPL"
BINV = "4.1.0"
PV = "4.1.0+csl-arm-2006q1-6"
PR = "r1"
FILESDIR = "${FILE_DIRNAME}/gcc-csl-arm"
inherit autotools gettext
require gcc-package.inc
SRC_URI = "http://www.codesourcery.com/public/gnu_toolchain/arm-none-eabi/arm-2006q1-6-arm-none-eabi.src.tar.bz2 \
file://gcc-configure-no-fortran.patch;patch=1;pnum=1 \
file://gcc-new-makeinfo.patch;patch=1"
#the optabi patch is already applied
do_unpack2() {
cd ${WORKDIR}
pwd
tar -xvjf ./arm-2006q1-6-arm-none-eabi/gcc-2006q1-6.tar.bz2
}
addtask unpack2 after do_unpack before do_patch
require gcc4-build.inc
S = "${WORKDIR}/gcc-2006q1"
require gcc-${PV}.inc
require gcc-configure-target.inc
require gcc-package-target.inc