summaryrefslogtreecommitdiff
path: root/packages/gcc
diff options
context:
space:
mode:
Diffstat (limited to 'packages/gcc')
-rw-r--r--packages/gcc/gcc-3.4.4/gcc34-configure.in.patch22
-rw-r--r--packages/gcc/gcc-3.4.4/gcc34-thumb-clearinsn.patch26
-rw-r--r--packages/gcc/gcc-3.4.4/gcc34-thumb-div0.patch11
-rw-r--r--packages/gcc/gcc-3.4.4/gcc34-thumb-lib1asmfuncs.patch10
-rw-r--r--packages/gcc/gcc-cross_3.4.4.bb2
-rw-r--r--packages/gcc/gcc3-build-cross.inc2
-rw-r--r--packages/gcc/gcc3-build.inc17
-rw-r--r--packages/gcc/gcc_3.4.4.bb7
8 files changed, 91 insertions, 6 deletions
diff --git a/packages/gcc/gcc-3.4.4/gcc34-configure.in.patch b/packages/gcc/gcc-3.4.4/gcc34-configure.in.patch
new file mode 100644
index 0000000000..3d33bcb978
--- /dev/null
+++ b/packages/gcc/gcc-3.4.4/gcc34-configure.in.patch
@@ -0,0 +1,22 @@
+--- 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
diff --git a/packages/gcc/gcc-3.4.4/gcc34-thumb-clearinsn.patch b/packages/gcc/gcc-3.4.4/gcc34-thumb-clearinsn.patch
new file mode 100644
index 0000000000..57ccb85361
--- /dev/null
+++ b/packages/gcc/gcc-3.4.4/gcc34-thumb-clearinsn.patch
@@ -0,0 +1,26 @@
+--- gcc-3.4.4/gcc/config/arm/linux-gas.h.orig 2005-08-09 08:10:22.809195204 -0700
++++ gcc-3.4.4/gcc/config/arm/linux-gas.h 2005-08-09 08:13:06.539498102 -0700
+@@ -56,6 +56,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); \
+@@ -65,3 +66,15 @@
+ : "=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 ("r7") = 0x9f0002; \
++ __asm __volatile ("swi 0 @ sys_cacheflush" \
++ : "=r" (_beg) \
++ : "0" (_beg), "r" (_end), "r" (_flg), "r" (_swi)); \
++}
++#endif
diff --git a/packages/gcc/gcc-3.4.4/gcc34-thumb-div0.patch b/packages/gcc/gcc-3.4.4/gcc34-thumb-div0.patch
new file mode 100644
index 0000000000..d57a420053
--- /dev/null
+++ b/packages/gcc/gcc-3.4.4/gcc34-thumb-div0.patch
@@ -0,0 +1,11 @@
+--- gcc-3.4.4/gcc/config/arm/lib1funcs.asm.orig 2005-08-09 07:58:42.717141188 -0700
++++ gcc-3.4.4/gcc/config/arm/lib1funcs.asm 2005-08-09 07:58:45.425311603 -0700
+@@ -816,7 +816,7 @@
+ #define __NR_kill (__NR_SYSCALL_BASE+ 37)
+
+ .code 32
+- FUNC_START div0
++ ARM_FUNC_START div0
+
+ stmfd sp!, {r1, lr}
+ swi __NR_getpid
diff --git a/packages/gcc/gcc-3.4.4/gcc34-thumb-lib1asmfuncs.patch b/packages/gcc/gcc-3.4.4/gcc34-thumb-lib1asmfuncs.patch
new file mode 100644
index 0000000000..c3972d7ece
--- /dev/null
+++ b/packages/gcc/gcc-3.4.4/gcc34-thumb-lib1asmfuncs.patch
@@ -0,0 +1,10 @@
+--- gcc-3.4.4/gcc/config/arm/t-linux.orig 2005-08-09 08:55:02.181797492 -0700
++++ gcc-3.4.4/gcc/config/arm/t-linux 2005-08-09 08:58:22.766419486 -0700
+@@ -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 _interwork_call_via_rX \
+ _fixsfsi _fixunssfsi
+
+ # MULTILIB_OPTIONS = mhard-float/msoft-float
diff --git a/packages/gcc/gcc-cross_3.4.4.bb b/packages/gcc/gcc-cross_3.4.4.bb
index b261db4c1f..c111ac00b7 100644
--- a/packages/gcc/gcc-cross_3.4.4.bb
+++ b/packages/gcc/gcc-cross_3.4.4.bb
@@ -5,7 +5,7 @@ inherit cross
FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/gcc-${PV}"
# NOTE: split PR. If the main .oe changes something that affects its *build*
# remember to increment this one too.
-PR = "r0"
+PR = "r1"
DEPENDS = "virtual/${TARGET_PREFIX}binutils virtual/${TARGET_PREFIX}libc-for-gcc"
PROVIDES = "virtual/${TARGET_PREFIX}gcc virtual/${TARGET_PREFIX}g++"
diff --git a/packages/gcc/gcc3-build-cross.inc b/packages/gcc/gcc3-build-cross.inc
index 0893e4b97c..a41ae11d64 100644
--- a/packages/gcc/gcc3-build-cross.inc
+++ b/packages/gcc/gcc3-build-cross.inc
@@ -13,7 +13,7 @@ do_compile_prepend () {
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"
+ export CC_FOR_TARGET="${CCACHE} ${TARGET_SYS}-gcc ${TARGET_CC_ARCH}"
}
do_stage_append () {
diff --git a/packages/gcc/gcc3-build.inc b/packages/gcc/gcc3-build.inc
index 09e0b31910..a09c6cf1f5 100644
--- a/packages/gcc/gcc3-build.inc
+++ b/packages/gcc/gcc3-build.inc
@@ -44,6 +44,12 @@ EXTRA_OECONF_glibc = "--enable-__cxa_atexit"
EXTRA_OECONF += "${@get_gcc_fpu_setting(bb, d)}"
CPPFLAGS = ""
+# Used by configure to define additional values for FLAGS_FOR_TARGET -
+# passed to all the compilers.
+ARCH_FLAGS_FOR_TARGET = ""
+ARCH_FLAGS_FOR_TARGET_nslu2 = "${TARGET_CC_ARCH}"
+EXTRA_OEMAKE += "ARCH_FLAGS_FOR_TARGET='${ARCH_FLAGS_FOR_TARGET}'"
+
def get_gcc_fpu_setting(bb, d):
if bb.data.getVar('TARGET_FPU', d, 1) in [ 'soft' ]:
return "--with-float=soft"
@@ -59,10 +65,14 @@ python __anonymous () {
do_configure () {
# Setup these vars for cross building only
+ # ... because foo_FOR_TARGET apparently gets misinterpreted inside the
+ # gcc build stuff when the build is producing a cross compiler - i.e.
+ # when the 'current' target is the 'host' system, and the host is not
+ # the target (because the build is actually making a cross compiler!)
if [ "${BUILD_SYS}" != "${HOST_SYS}" ]; then
- export CC_FOR_TARGET="${CCACHE} ${HOST_PREFIX}gcc"
- export GCC_FOR_TARGET="${CCACHE} ${HOST_PREFIX}gcc"
- export CXX_FOR_TARGET="${CCACHE} ${HOST_PREFIX}g++"
+ export CC_FOR_TARGET="${CC}"
+ export GCC_FOR_TARGET="${CC}"
+ export CXX_FOR_TARGET="${CXX}"
export AS_FOR_TARGET="${HOST_PREFIX}as"
export LD_FOR_TARGET="${HOST_PREFIX}ld"
export NM_FOR_TARGET="${HOST_PREFIX}nm"
@@ -75,6 +85,7 @@ do_configure () {
export CPPFLAGS_FOR_BUILD="${BUILD_CPPFLAGS}"
export CXXFLAGS_FOR_BUILD="${BUILD_CXXFLAGS}"
export LDFLAGS_FOR_BUILD="${BUILD_LDFLAGS}"
+ export ARCH_FLAGS_FOR_TARGET="${ARCH_FLAGS_FOR_TARGET}"
(cd ${S} && gnu-configize) || die "failure running gnu-configize"
oe_runconf
}
diff --git a/packages/gcc/gcc_3.4.4.bb b/packages/gcc/gcc_3.4.4.bb
index 263d78396c..f4a67b77c2 100644
--- a/packages/gcc/gcc_3.4.4.bb
+++ b/packages/gcc/gcc_3.4.4.bb
@@ -1,4 +1,4 @@
-PR = "r1"
+PR = "r2"
DESCRIPTION = "The GNU cc and gcc C compilers."
HOMEPAGE = "http://www.gnu.org/software/gcc/"
SECTION = "devel"
@@ -24,4 +24,9 @@ SRC_URI = "${GNU_MIRROR}/gcc/gcc-${PV}/gcc-${PV}.tar.bz2 \
file://15342.patch;patch=1 \
file://always-fixincperm.patch;patch=1"
+SRC_URI += "file://gcc34-thumb-div0.patch;patch=1"
+SRC_URI += "file://gcc34-thumb-clearinsn.patch;patch=1"
+SRC_URI += "file://gcc34-thumb-lib1asmfuncs.patch;patch=1"
+SRC_URI += "file://gcc34-configure.in.patch;patch=1"
+
include gcc3-build.inc