From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from 93-97-173-237.zone5.bethere.co.uk ([93.97.173.237] helo=tim.rpsys.net) by linuxtogo.org with esmtp (Exim 4.72) (envelope-from ) id 1TwiO3-0001Kb-Ns for openembedded-core@lists.openembedded.org; Sun, 20 Jan 2013 01:03:52 +0100 Received: from localhost (localhost [127.0.0.1]) by tim.rpsys.net (8.13.6/8.13.8) with ESMTP id r0JNmLnN004729 for ; Sat, 19 Jan 2013 23:48:21 GMT Received: from tim.rpsys.net ([127.0.0.1]) by localhost (tim.rpsys.net [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 04712-01 for ; Sat, 19 Jan 2013 23:48:17 +0000 (GMT) Received: from [192.168.3.10] ([192.168.3.10]) (authenticated bits=0) by tim.rpsys.net (8.13.6/8.13.8) with ESMTP id r0JNmCZD004723 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NO) for ; Sat, 19 Jan 2013 23:48:13 GMT Message-ID: <1358639293.14265.5.camel@ted> From: Richard Purdie To: openembedded-core Date: Sat, 19 Jan 2013 23:48:13 +0000 X-Mailer: Evolution 3.2.3-0ubuntu6 Mime-Version: 1.0 X-Virus-Scanned: amavisd-new at rpsys.net Subject: [PATCH] cpan_build: Fix cmaker Build.PL module builds X-BeenThere: openembedded-core@lists.openembedded.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: Patches and discussions about the oe-core layer List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 Jan 2013 00:03:53 -0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Certain cpan Build.PL based modules were failing to build due to the host's config information being used instead of the targets. This patch sets the appropriate variables to ensure the modules get the correct configuration from the target config_heavy.pl script. It also ensures the linker is CCLD, not LD since the LDFLAGS contain -Wl,XXX options and build failures result if LD is used. libencode-detect-perl is a module which tests this class extensively. Signed-off-by: Richard Purdie --- diff --git a/meta/classes/cpan_build.bbclass b/meta/classes/cpan_build.bbclass index 78592be..eaba40a 100644 --- a/meta/classes/cpan_build.bbclass +++ b/meta/classes/cpan_build.bbclass @@ -1,7 +1,12 @@ # # This is for perl modules that use the new Build.PL build system # -inherit cpan-base +inherit cpan-base perlnative + +# Env var which tells perl if it should use host (no) or target (yes) settings +export PERLCONFIGTARGET = "${@is_target(d)}" +export PERL_ARCHLIB = "${STAGING_LIBDIR}${PERL_OWN_DIR}/perl/${@get_perl_version(d)}" +export LD = "${CCLD}" # # We also need to have built libmodule-build-perl-native for