c6accel/dmai/gst-ti: only fix up linkerscript when using gcc >4.3.x
authorKoen Kooi <koen@openembedded.org>
Thu, 6 Jan 2011 08:51:42 +0000 (09:51 +0100)
committerKoen Kooi <koen@openembedded.org>
Thu, 6 Jan 2011 09:08:26 +0000 (10:08 +0100)
Signed-off-by: Koen Kooi <koen@openembedded.org>
recipes/ti/gstreamer-ti.inc
recipes/ti/ti-c6accel.inc
recipes/ti/ti-c6accel_1.01.00.03.bb
recipes/ti/ti-dmai.inc
recipes/ti/ti-dmai_svn.bb

index 4da1bab..8d355e0 100644 (file)
@@ -15,7 +15,7 @@ require ti-paths.inc
 require ti-staging.inc
 
 # Rebuild on kernel change since it links statically to ti-dmai, ti-codec-engine, etc
-PR = "r82+${MACHINE_KERNEL_PR}"
+PR = "r83+${MACHINE_KERNEL_PR}"
 
 DEPENDS = "ti-dmai gstreamer gst-plugins-base"
 
@@ -80,10 +80,13 @@ do_configure_prepend() {
                sed -i -e s:linux/omapfb:mach/omapfb:g ${S}/src/omapfb.h || true
        fi
 
-       # Fix up linkerscripts, recent toolchains need -T to prepend the default script to the custom one 
-       for makefile in $(find ${S} -name "Makefile.am") ; do
-               sed -i -e 's:-Wl,$(XDC_CONFIG_BASENAME)/linker.cmd:-Wl,-T,$(XDC_CONFIG_BASENAME)/linker.cmd:g' $makefile
-       done
+       # Angstrom 2008 breaks with -Wl,-T, while angstrom 2010 needs it
+       if [ $(${TARGET_PREFIX}gcc -dumpversion | awk -F. '{print $2}') -gt 3 ] ; then
+               # Fix up linkerscripts, recent toolchains need -T to prepend the default script to the custom one 
+               for makefile in $(find ${S} -name "Makefile.am") ; do
+                       sed -i -e 's:-Wl,$(XDC_CONFIG_BASENAME)/linker.cmd:-Wl,-T,$(XDC_CONFIG_BASENAME)/linker.cmd:g' $makefile
+               done
+       fi
 }
 
 do_compile() {
index 777ece2..7d09783 100644 (file)
@@ -18,7 +18,7 @@ PROVIDES += "ti-c6accel-apps"
 
 # This recipe links statically against kernel dependant stuff, use kernel PR as base and append a local version
 PR = "${MACHINE_KERNEL_PR}"
-PR_append = "b"
+PR_append = "c"
 
 S = "${WORKDIR}/c6accel_${PV}"
 
@@ -57,6 +57,11 @@ do_configure() {
        unset VERBOSE
        make ${TIARGS} clean
        sed -i -e 's:-L$(LINUXLIBS_INSTALL_DIR)/lib:-L$(LINUXLIBS_INSTALL_DIR)/lib -L$(LINUXLIBS_INSTALL_DIR)/usr/lib ${LDFLAGS}:' ${S}/soc/app/Makefile
+
+       # Angstrom 2008 breaks with -Wl,-T, while angstrom 2010 needs it
+       if [ $(${TARGET_PREFIX}gcc -dumpversion | awk -F. '{print $2}') -gt 3 ] ; then
+               sed -i -e 's: $(XDC_CFG)/linker.cmd: -Wl,-T,$(XDC_CFG)/linker.cmd:g' ${S}/soc/app/Makefile
+       fi
 }
 
 do_compile() {
index 15e2d05..bf5f1cf 100644 (file)
@@ -5,7 +5,6 @@ SRC_URI[c6accelbin.sha256sum] = "453399a84bf117bd7a91393242c7c005e2829692db5ede1
 
 SRC_URI_append = "file://fix-loadmodule.patch \
                   file://0001-soc-honour-buildsystem-CFLAGS-and-LDFLAGS-when-set.patch \
-                  file://0001-soc-app-fix-makefile-to-pass-Wl-T-before-the-linkers.patch \
                  "
 
 PV = "1_01_00_03"
index dff11ca..c3a0f71 100644 (file)
@@ -86,10 +86,13 @@ do_compile () {
         sed -i -e s:-Werror::g $makefile
     done
 
-    # Fix up linkerscripts, recent toolchains need -T to prepend the default script to the custom one 
-    for appmakefile in $(find ${S} -name "Makefile.app") ; do
-        sed -i -e 's: $(XDC_CFG)/linker.cmd: -Wl,-T,$(XDC_CFG)/linker.cmd:g' $appmakefile
-    done
+    # Angstrom 2008 breaks with -Wl,-T, while angstrom 2010 needs it
+    if [ $(${TARGET_PREFIX}gcc -dumpversion | awk -F. '{print $2}') -gt 3 ] ; then
+        # Fix up linkerscripts, recent toolchains need -T to prepend the default script to the custom one 
+        for appmakefile in $(find ${S} -name "Makefile.app") ; do
+            sed -i -e 's: $(XDC_CFG)/linker.cmd: -Wl,-T,$(XDC_CFG)/linker.cmd:g' $appmakefile
+        done
+    fi
 
     # TODO :: Why do we do this?
     unset DMAI_INSTALL_DIR
index f7a5496..374acce 100644 (file)
@@ -9,7 +9,7 @@ PV = "2_10_00_01+svnr${SRCPV}"
 
 # This package has high dependence on kernel, use kernel PR as base and append a local version
 PR = "${MACHINE_KERNEL_PR}"
-PR_append = "m"
+PR_append = "n"
 
 DMAIBRANCH_dm6446     = "trunk"
 DMAIBRANCH_dm6467     = "branches/GITPSP_INT_101009"