[oe-commits] org.oe.dev gcc csl 2008q1: make it look more like other gcc recipes

koen commit oe at amethyst.openembedded.net
Mon May 12 09:12:22 UTC 2008


gcc csl 2008q1: make it look more like other gcc recipes

Author: koen at openembedded.org
Branch: org.openembedded.dev
Revision: 4210a3d1fbf81646246fe20e41eb5083b9abf364
ViewMTN: http://monotone.openembedded.org/revision/info/4210a3d1fbf81646246fe20e41eb5083b9abf364
Files:
1
packages/gcc/gcc-csl-arm/arm-nolibfloat.patch
packages/gcc/gcc-csl-arm/arm-softfloat.patch
packages/gcc/gcc-csl-arm/cache-amnesia.patch
packages/gcc/gcc-csl-arm/zecke-no-host-includes.patch
packages/gcc/gcc-cross-initial_csl-arm-2008q1.bb
packages/gcc/gcc-cross_csl-arm-2008q1.bb
packages/gcc/gcc-csl-arm-2008q1.inc
Diffs:

#
# mt diff -recf50bcd3a15915d3f0eabbf8a4f812546c9b015 -r4210a3d1fbf81646246fe20e41eb5083b9abf364
#
#
#
# add_file "packages/gcc/gcc-csl-arm/arm-nolibfloat.patch"
#  content [7e4d52b09f70abec87ee5c8bf94474db31ce9330]
# 
# add_file "packages/gcc/gcc-csl-arm/arm-softfloat.patch"
#  content [a75dd0178c0e43be67c6e716da8c1a82a6270226]
# 
# add_file "packages/gcc/gcc-csl-arm/cache-amnesia.patch"
#  content [fc92668ad7f244bd08aa8c42ed9453ec619aa35c]
# 
# add_file "packages/gcc/gcc-csl-arm/zecke-no-host-includes.patch"
#  content [6e9d8445c31e423d84214b7b5560ebd144b1fb51]
# 
# patch "packages/gcc/gcc-cross-initial_csl-arm-2008q1.bb"
#  from [209670b2c97a07d8fe90c67d0482db2ce4dab692]
#    to [4acf01cc481b727325c6077882c195b4f1572001]
# 
# patch "packages/gcc/gcc-cross_csl-arm-2008q1.bb"
#  from [a3cb3c71516c898c47c64f1decc18fc897a45296]
#    to [3a7f4b97cfe75af423fbf07b97ee656bc6bf4f80]
# 
# patch "packages/gcc/gcc-csl-arm-2008q1.inc"
#  from [d39832893be05c77db65a419983a198973a81460]
#    to [f1cb10e074cfdf48e8cb5cd8774368421ff326af]
#
============================================================
--- packages/gcc/gcc-csl-arm/arm-nolibfloat.patch	7e4d52b09f70abec87ee5c8bf94474db31ce9330
+++ packages/gcc/gcc-csl-arm/arm-nolibfloat.patch	7e4d52b09f70abec87ee5c8bf94474db31ce9330
@@ -0,0 +1,24 @@
+# Dimitry Andric <dimitry at 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
============================================================
--- packages/gcc/gcc-csl-arm/arm-softfloat.patch	a75dd0178c0e43be67c6e716da8c1a82a6270226
+++ packages/gcc/gcc-csl-arm/arm-softfloat.patch	a75dd0178c0e43be67c6e716da8c1a82a6270226
@@ -0,0 +1,16 @@
+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 _floatundisf _floatundidf
+ 
+ # MULTILIB_OPTIONS = mhard-float/msoft-float
+ # MULTILIB_DIRNAMES = hard-float soft-float
============================================================
--- packages/gcc/gcc-csl-arm/cache-amnesia.patch	fc92668ad7f244bd08aa8c42ed9453ec619aa35c
+++ packages/gcc/gcc-csl-arm/cache-amnesia.patch	fc92668ad7f244bd08aa8c42ed9453ec619aa35c
@@ -0,0 +1,13 @@
+diff --git a/gcc/configure b/gcc/configure
+index 44620ab..6e1830c 100755
+--- a/gcc/configure
++++ b/gcc/configure
+@@ -12272,7 +12272,7 @@ else
+ 	esac
+ 	saved_CFLAGS="${CFLAGS}"
+ 	CC="${CC_FOR_BUILD}" CFLAGS="${CFLAGS_FOR_BUILD}" \
+-	${realsrcdir}/configure \
++	CONFIG_SITE= ${realsrcdir}/configure --cache-file=./other.cache \
+ 		--enable-languages=${enable_languages-all} \
+ 		--target=$target_alias --host=$build_alias --build=$build_alias
+ 	CFLAGS="${saved_CFLAGS}"
============================================================
--- packages/gcc/gcc-csl-arm/zecke-no-host-includes.patch	6e9d8445c31e423d84214b7b5560ebd144b1fb51
+++ packages/gcc/gcc-csl-arm/zecke-no-host-includes.patch	6e9d8445c31e423d84214b7b5560ebd144b1fb51
@@ -0,0 +1,31 @@
+Index: gcc-4.0.2/gcc/c-incpath.c
+===================================================================
+--- gcc-4.0.2.orig/gcc/c-incpath.c	2005-01-23 16:05:27.000000000 +0100
++++ gcc-4.0.2/gcc/c-incpath.c	2006-05-15 21:23:02.000000000 +0200
+@@ -350,6 +350,26 @@
+   p->construct = 0;
+   p->user_supplied_p = user_supplied_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
++
+   add_cpp_dir_path (p, chain);
+ }
+ 
============================================================
--- packages/gcc/gcc-cross-initial_csl-arm-2008q1.bb	209670b2c97a07d8fe90c67d0482db2ce4dab692
+++ packages/gcc/gcc-cross-initial_csl-arm-2008q1.bb	4acf01cc481b727325c6077882c195b4f1572001
@@ -4,3 +4,9 @@ EXTRA_OECONF += "--disable-libssp --disa
 S = "${WORKDIR}/gcc-4.2"
 
 EXTRA_OECONF += "--disable-libssp --disable-bootstrap --disable-libgomp --disable-libmudflap "
+
+# Hack till we fix *libc properly
+do_stage_append() {
+	ln -sf ${CROSS_DIR}/lib/gcc/${TARGET_SYS}/${BINV}/include-fixed/* ${CROSS_DIR}/lib/gcc/${TARGET_SYS}/${BINV}/include/
+}
+
============================================================
--- packages/gcc/gcc-cross_csl-arm-2008q1.bb	a3cb3c71516c898c47c64f1decc18fc897a45296
+++ packages/gcc/gcc-cross_csl-arm-2008q1.bb	3a7f4b97cfe75af423fbf07b97ee656bc6bf4f80
@@ -1,9 +1,12 @@ PR = "r0"
 PR = "r0"
 
-FORTRAN = ",fortran"
-
 require gcc-csl-arm-2008q1.inc
-require gcc-cross.inc
+require gcc-cross4.inc
 require gcc-configure-cross.inc
 require gcc-package-cross.inc
 
+SRC_URI_append_fail-fast = " file://zecke-no-host-includes.patch;patch=1 "
+
+EXTRA_OECONF += "--disable-libunwind-exceptions --with-mpfr=${STAGING_DIR_NATIVE}${layout_exec_prefix}"
+
+ARCH_FLAGS_FOR_TARGET += "-L${STAGING_DIR_TARGET}${layout_libdir} -isystem${STAGING_DIR_TARGET}${layout_includedir}"
============================================================
--- packages/gcc/gcc-csl-arm-2008q1.inc	d39832893be05c77db65a419983a198973a81460
+++ packages/gcc/gcc-csl-arm-2008q1.inc	f1cb10e074cfdf48e8cb5cd8774368421ff326af
@@ -7,6 +7,8 @@ SRC_URI = "http://www.codesourcery.com/p
 
 SRC_URI = "http://www.codesourcery.com/public/gnu_toolchain/arm-none-eabi/arm-2008q1-126-arm-none-eabi.src.tar.bz2 \
            file://gcc41-configure.in.patch;patch=1 \
+           file://arm-nolibfloat.patch;patch=1 \
+           file://arm-softfloat.patch;patch=1 \
            file://ldflags.patch;patch=1 \
            file://zecke-xgcc-cpp.patch;patch=1 \
            file://gfortran.patch;patch=1 \
@@ -22,4 +24,12 @@ do_unpack2() {
 	tar -xvjf ./arm-2008q1-126-arm-none-eabi/gcc-2008q1-126.tar.bz2
 }
 
+# Language Overrides
+FORTRAN = ""
+FORTRAN_linux-gnueabi = ",fortran"
+JAVA = ",java"
+
+EXTRA_OECONF_BASE = "--disable-libssp --disable-bootstrap --disable-libgomp --disable-libmudflap"
+ARM_INSTRUCTION_SET = "arm"
+
 addtask unpack2 after do_unpack before do_patch






More information about the Openembedded-commits mailing list