summaryrefslogtreecommitdiff
path: root/packages/gcc
diff options
context:
space:
mode:
authorTom Rini <trini@embeddedalley.com>2009-01-16 22:57:32 -0500
committerTom Rini <trini@embeddedalley.com>2009-01-16 22:57:32 -0500
commit9fd597b68e6eb5e670f974cfcc121b172e14cf4c (patch)
treebf10383f6bf6dd919266244a5a34eb403984e4ef /packages/gcc
parent6c7b5a818382cf8d54772b226b218e590263396a (diff)
mingw-gcc-cross, mingw-gcc-cross-initial: Bring in the special gcc for MinGW
Diffstat (limited to 'packages/gcc')
-rw-r--r--packages/gcc/mingw-gcc-3.4.5-20060117-2/includedir.patch12
-rw-r--r--packages/gcc/mingw-gcc-build.inc43
-rw-r--r--packages/gcc/mingw-gcc-canadian-cross-initial_3.4.5-20060117-2.bb7
-rw-r--r--packages/gcc/mingw-gcc-canadian-cross_3.4.5-20060117-2.bb26
4 files changed, 88 insertions, 0 deletions
diff --git a/packages/gcc/mingw-gcc-3.4.5-20060117-2/includedir.patch b/packages/gcc/mingw-gcc-3.4.5-20060117-2/includedir.patch
new file mode 100644
index 0000000000..8836560e7e
--- /dev/null
+++ b/packages/gcc/mingw-gcc-3.4.5-20060117-2/includedir.patch
@@ -0,0 +1,12 @@
+diff -urN gcc-3.4.5-20060117-2-orig/gcc/Makefile.in gcc-3.4.5-20060117-2/gcc/Makefile.in
+--- gcc-3.4.5-20060117-2-orig/gcc/Makefile.in 2005-12-12 02:24:01.000000000 +0100
++++ gcc-3.4.5-20060117-2/gcc/Makefile.in 2008-10-02 16:07:17.000000000 +0200
+@@ -442,7 +442,7 @@
+ # Directory to search for site-specific includes.
+ local_includedir = $(local_prefix)/include
+ # local_includedir=$(libsubdir)/$(unlibsubdir)/..`echo $(exec_prefix) | sed -e 's|^$(prefix)||' -e 's|/[^/]*|/..|g'`/include
+-includedir = $(prefix)/include
++includedir = @includedir@
+ # where the info files go
+ infodir = @infodir@
+ # Where cpp should go besides $prefix/bin if necessary
diff --git a/packages/gcc/mingw-gcc-build.inc b/packages/gcc/mingw-gcc-build.inc
new file mode 100644
index 0000000000..4d7440f6d5
--- /dev/null
+++ b/packages/gcc/mingw-gcc-build.inc
@@ -0,0 +1,43 @@
+gcclibdir ?= "${libdir}/gcc"
+S = "${WORKDIR}/gcc-${PV}"
+B = "${S}/build.${HOST_SYS}.${TARGET_SYS}"
+BINV ?= "${PV}"
+
+LANGUAGES ?= "c,c++"
+
+EXTRA_OECONF_DEP ?= ""
+
+EXTRA_OECONF = "\
+ ${@['--enable-clocale=generic', ''][bb.data.getVar('USE_NLS', d, 1) != 'no']} \
+ --disable-shared \
+ --enable-languages=${LANGUAGES} \
+ --enable-threads=win32 \
+ --enable-c99 \
+ --enable-long-long \
+ --disable-maintainer-mode \
+ --disable-bootstrap \
+ --enable-target-optspace \
+ --disable-win32-registry \
+ --without-x \
+ --program-prefix=${TARGET_PREFIX} \
+ ${EXTRA_OECONF_PATHS} \
+ ${EXTRA_OECONF_DEP}"
+
+EXTRA_OECONF_PATHS = " \
+ --with-local-prefix=${prefix}/local \
+ --with-gxx-include-dir=${includedir}/c++/${BINV}"
+
+CPP = ""
+CPPFLAGS = ""
+
+do_configure () {
+ oe_runconf
+}
+
+do_stage_append () {
+ # Fixup various .la files
+ sed -i -e "s|installed=yes|installed=no|" -e "s|dependency_libs\s*=\s*.*|dependency_libs='-L${STAGING_DIR_HOST}${layout_libdir} ${LIBGCCS_VAR} -lc -lm '|" ${STAGING_DIR_HOST}${layout_libdir}/libsupc++.la || true
+ sed -i -e "s|installed=yes|installed=no|" -e "s|dependency_libs\s*=\s*.*|dependency_libs='-L${STAGING_DIR_HOST}${layout_libdir} ${LIBGCCS_VAR} -lc -lm '|" ${STAGING_DIR_HOST}${layout_libdir}/libstdc++.la || true
+ sed -i -e "s|installed=yes|installed=no|" -e "s|dependency_libs\s*=\s*.*|dependency_libs='-L${STAGING_DIR_HOST}${layout_libdir} ${LIBGCCS_VAR} -lc -lm '|" ${STAGING_DIR_HOST}${layout_libdir}/libg2c.la || true
+ sed -i -e "s|installed=yes|installed=no|" -e "s|dependency_libs\s*=\s*.*|dependency_libs='-L${STAGING_DIR_HOST}${layout_libdir} ${LIBGCCS_VAR} -lc -lm '|" ${STAGING_DIR_HOST}${layout_libdir}/libobjc.la || true
+}
diff --git a/packages/gcc/mingw-gcc-canadian-cross-initial_3.4.5-20060117-2.bb b/packages/gcc/mingw-gcc-canadian-cross-initial_3.4.5-20060117-2.bb
new file mode 100644
index 0000000000..f5ff761739
--- /dev/null
+++ b/packages/gcc/mingw-gcc-canadian-cross-initial_3.4.5-20060117-2.bb
@@ -0,0 +1,7 @@
+require mingw-gcc-canadian-cross_${PV}.bb
+require gcc-canadian-cross-initial.inc
+
+SRC_URI = "\
+ ${SOURCEFORGE_MIRROR}/mingw/gcc-core-${PV}-src.tar.gz \
+ file://includedir.patch;patch=1 \
+"
diff --git a/packages/gcc/mingw-gcc-canadian-cross_3.4.5-20060117-2.bb b/packages/gcc/mingw-gcc-canadian-cross_3.4.5-20060117-2.bb
new file mode 100644
index 0000000000..2a5d7f45d1
--- /dev/null
+++ b/packages/gcc/mingw-gcc-canadian-cross_3.4.5-20060117-2.bb
@@ -0,0 +1,26 @@
+PR = "r1"
+
+require gcc-configure-cross.inc
+require mingw-gcc_${PV}.bb
+
+inherit canadian-cross
+
+FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/mingw-gcc-${PV}"
+
+DEPENDS = "\
+ virtual/${TARGET_PREFIX}binutils \
+ virtual/${TARGET_PREFIX}libc-for-gcc \
+"
+
+PROVIDES = "virtual/${TARGET_PREFIX}gcc virtual/${TARGET_PREFIX}g++"
+
+do_configure_prepend() {
+ # ugly hack to come around the hardcoding of
+ # -isystem ${build_tooldir}/include which ends up pointing at
+ # $STAGING_DIR_SDK/$SDK_SYS/include
+ install -d ${STAGING_DIR_SDK}/${SDK_SYS}
+ ln -sf ${STAGING_DIR_SDK}${layout_includedir} \
+ ${STAGING_DIR_SDK}/${SDK_SYS}/include
+ ln -sf ${STAGING_DIR_SDK}${layout_libdir} \
+ ${STAGING_DIR_SDK}/${SDK_SYS}/lib
+}