[oe] [oe-commits] org.oe.dev libintl-perl: added do_compile() function needed for crosscompilation

Jamie Lenehan lenehan at twibble.org
Thu Nov 16 07:24:17 UTC 2006


On Fri, Nov 03, 2006 at 11:21:20AM +0100, Martin Dietze wrote:
[...]
>  you find the temp directory with the run.* and log.* files
> I just created with the original .bb file appended to this

Thanks Martin, that helped. Can you give this patch a try and confirm
if libintl-perl builds with it. If this works it'll be a better
option since it'll make sure all of the cpan modules in OE would
build without change.

# 
# old_revision [84fe2f0fca6db99a5c79789a1835d65a2d7f5d4b]
# 
# patch "classes/cpan.bbclass"
#  from [c7d1304c1f4475785c59af38cfea6d8cccffcab1]
#    to [b6652b5fa4a60013e16b4dd0c43f377d0ecb7e27]
# 
# patch "packages/perl/libintl-perl_1.16.bb"
#  from [f584deff8934890a2b1f4e35372d9d3a058718a1]
#    to [405b87d4cc959e645964974b117509fbd12031c2]
# 
============================================================
--- classes/cpan.bbclass	c7d1304c1f4475785c59af38cfea6d8cccffcab1
+++ classes/cpan.bbclass	b6652b5fa4a60013e16b4dd0c43f377d0ecb7e27
@@ -8,7 +8,7 @@ cpan_do_configure () {
 RDEPENDS += "perl"
 
 cpan_do_configure () {
-	perl Makefile.PL ${EXTRA_CPANFLAGS}
+	perl Makefile.PL ${EXTRA_CPANFLAGS} CC='${CC}' LD='${CC}'
 	if [ "${BUILD_SYS}" != "${HOST_SYS}" ]; then
 		. ${STAGING_DIR}/${TARGET_SYS}/perl/config.sh
                 sed -i -e "s:\(SITELIBEXP = \).*:\1${sitelibexp}:" \
@@ -20,13 +20,10 @@ cpan_do_configure () {
 	fi
 }
 
+EXTRA_OEMAKE_append = "CCFLAGS='${CFLAGS}' CC='${CC}' LD='${CC}'"
+
 cpan_do_compile () {
-	# You must use gcc to link on sh
-	OPTIONS=""
-	if test ${TARGET_ARCH} = "sh3" -o ${TARGET_ARCH} = "sh4"; then
-		OPTIONS="LD=${TARGET_ARCH}-${TARGET_OS}-gcc"
-	fi
-        oe_runmake PASTHRU_INC="${CFLAGS}" CCFLAGS="${CFLAGS}" $OPTIONS
+        oe_runmake PASTHRU_INC="${CFLAGS}"
 }
 
 cpan_do_install () {
============================================================
--- packages/perl/libintl-perl_1.16.bb	f584deff8934890a2b1f4e35372d9d3a058718a1
+++ packages/perl/libintl-perl_1.16.bb	405b87d4cc959e645964974b117509fbd12031c2
@@ -1,15 +1,12 @@ RDEPENDS = "perl-module-vars perl-module
 SECTION = "libs"
 LICENSE = "Artistic|GPL"
 RDEPENDS = "perl-module-vars perl-module-locale perl-module-io-handle \
             perl-module-symbol perl-module-selectsaver perl-module-io \
             perl-module-integer perl-module-exporter-heavy"
+PR = "r1"
 
 SRC_URI = "http://www.cpan.org/authors/id/G/GU/GUIDO/libintl-perl-${PV}.tar.gz"
 
 S = "${WORKDIR}/libintl-perl-${PV}"
 
 inherit cpan
-
-do_compile() {
-	make CC="${CC}" LD="${LD}"
-}


-- 
 Jamie Lenehan <lenehan at twibble.org>




More information about the Openembedded-devel mailing list