On 2012年06月21日 23:47, Khem Raj wrote:
On Thu, Jun 21, 2012 at 12:13 AM,  <xin.ouy...@windriver.com> wrote:
From: Xin Ouyang <xin.ouy...@windriver.com>

We should not just replace CCFLAGS with CFLAGS while compiling, because
this may cause run-time errors with perl's DynaLoader.pm.

Tested on qemux86 with new libnet-libidn-perl bb recipe:

can you instead try the patch from

http://bugs.debian.org/cgi-bin/bugreport.cgi?msg=19;bug=628522

This debian patch takes no effect.

Actually it try to fix this:

Some packages which has those lines in Makefile.PL:
  WriteMakefile(
      ...
      'CCFLAGS'    => 'some cflags',
      ...
  );
While run perl Makefile.PL to configure, there are CCFLAGS="some cflags" to override the original CCFLAGS=$Config{ccflags} in generated Makefiles.


In Poky, CCFLAGS in our generated Makefiles are all right.
But when we run oe_runmake CCFLAGS="${CFLAGS}" to do_compile, this will override our right CCFLAGS.


- Xin


root@qemux86:~# perl -e "use Net::LibIDN"
Not a CODE reference at /usr/lib/perl/5.14.2//DynaLoader.pm line 213.
END failed--call queue aborted at 
/usr/lib/perl/vendor_perl/5.14.2//Net/LibIDN.pm line 213.
Compilation failed in require at -e line 1.
BEGIN failed--compilation aborted at -e line 1.

Signed-off-by: Xin Ouyang <xin.ouy...@windriver.com>
---
  meta/classes/cpan.bbclass |    3 ++-
  1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/meta/classes/cpan.bbclass b/meta/classes/cpan.bbclass
index 2e9432c..957a6e2 100644
--- a/meta/classes/cpan.bbclass
+++ b/meta/classes/cpan.bbclass
@@ -26,13 +26,14 @@ cpan_do_configure () {
                        test -f $f2 || continue
                        sed -i -e "s:\(PERL_ARCHLIB = \).*:\1${PERL_ARCHLIB}:" \
                                -e 's/perl.real/perl/' \
+                               -e "s/^\(CCFLAGS =.*\)/\1 ${CFLAGS}/" \
                                $f2
                done
        fi
  }

  cpan_do_compile () {
-       oe_runmake PASTHRU_INC="${CFLAGS}" CCFLAGS="${CFLAGS}" LD="${CCLD}"
+       oe_runmake PASTHRU_INC="${CFLAGS}" LD="${CCLD}"
  }

  cpan_do_install () {
--
1.7.5.4


_______________________________________________
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core

_______________________________________________
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core



--
- Pascal



_______________________________________________
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core

Reply via email to