Skip to contentSkip to conversation

perl: fix rebuid failed while ${CC} changed

PATCH New Hongxu Jia 1 participant 2 messages Jul 24, 2014

lore
Share & tools
lore

Hongxu Jia

author
#0 lore raw

cover perl: fix rebuid failed while ${CC} changed

Test Steps:

1) bitbake perl

2) vim local.conf to tweak CC, just add redundant option.
...
CC_append = " ${HOST_CC_ARCH}"
...

3) bitbake perl

//Hongxu

The following changes since commit 1306f263ed7b3de4e85c6dc8b377e5c05afd6bf0:

package_ipk.bbclass: Support hierarchical feed (2014-07-23 22:06:10 +0100)

are available in the git repository at:

git://git.pokylinux.org/poky-contrib hongxu/fix-perl-rebuild
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=hongxu/fix-perl-rebuild

Hongxu Jia (1):
perl: fix rebuid failed while ${CC} changed

 ...-fix-regenerate-makefile-failed-while-cc-.patch | 30 ++++++++++++++++++++++
 meta/recipes-devtools/perl/perl_5.20.0.bb          |  1 +
 2 files changed, 31 insertions(+)
 create mode 100644 meta/recipes-devtools/perl/perl-5.20.0/make_ext.pl-fix-regenerate-makefile-failed-while-cc-.patch
Signature · 1 line
1.8.1.2
author
#1 lore raw

PATCH 1/1 perl: fix rebuid failed while ${CC} changed

Reproduce steps:

1) bitbake perl
2) vim local.conf to tweak CC, just add redundant option.
...
CC_append = " ${HOST_CC_ARCH}"
...

3) bitbake perl
...
./miniperl -Ilib make_ext.pl lib/auto/Time/HiRes/HiRes.so MAKE=make LIBPERL_A=libperl.so LINKTYPE=dynamic
Making Time::HiRes (all)my $filename=
Deleting non-Cross makefile
Running Makefile.PL in cpan/Time-HiRes
Makefile.PL: The "xdefine" exists, skipping the configure step. ("tmp/sysroots/x86_64-linux/usr/bin/perl-native/perl5.20.0.real Makefile.PL --configure" to force the configure step)
Warning: No Makefile!
make[2]: Entering directory tmp/work/armv5te-poky-linux-gnueabi/perl/5.20.0-r1/perl-5.20.0/cpan/Time-HiRes' make[2]: *** No rule to make target config'. Stop.
...

While ${CC} changed, the existance of 'xdefine' caused makefile regeneration failed.

[YOCTO #6569]

---
 ...-fix-regenerate-makefile-failed-while-cc-.patch | 30 ++++++++++++++++++++++
 meta/recipes-devtools/perl/perl_5.20.0.bb          |  1 +
 2 files changed, 31 insertions(+)
 create mode 100644 meta/recipes-devtools/perl/perl-5.20.0/make_ext.pl-fix-regenerate-makefile-failed-while-cc-.patch
meta/recipes-devtools/perl/perl-5.20.0/make_ext.pl-fix-regenerate-makefile-failed-while-cc-.patch new file +30 -0
new file mode 100644
index 0000000..de6f652
@@ -0,0 +1,30 @@
+make_ext.pl: fix regenerate makefile failed while $cc changed
+
+While $cc changed, the existance of 'xdefine' caused makefile
+regeneration failed.
+
+Upstream-Status: Pending
+
+Signed-off-by: Hongxu Jia <[email protected]>
+---
+ make_ext.pl | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/make_ext.pl b/make_ext.pl
+index b433762..9fc1a36 100644
+--- a/make_ext.pl
++++ b/make_ext.pl
+@@ -335,6 +335,10 @@ sub build_extension {
+                 print "Deleting non-Cross makefile\n";
+                 close $mfh or die "close $makefile: $!";
+                 _unlink($makefile);
++                if(-e 'xdefine') {
++                    print "Deleting xdefine for regenerate makefile\n";
++                    _unlink('xdefine');
++                }
+             }
+         }
+     }
+-- 
+1.8.1.2
+
meta/recipes-devtools/perl/perl_5.20.0.bb +1 -0
index 4bd4525..e984c90 100644
@@ -74,6 +74,7 @@ SRC_URI += " \
         file://config.sh-64-be \
         file://perl-5.14.3-fix-CVE-2010-4777.patch \
         file://0001-Makefile.SH-fix-do_install-failed.patch \
+        file://make_ext.pl-fix-regenerate-makefile-failed-while-cc-.patch \
 "
 
 # Fix test case issues
Signature · 1 line
1.8.1.2