[oe] [PATCH v3] cpan_build.bbclass; added cc and ld flags to the perl Build.PL invocation

Frans Meulenbroeks fransmeulenbroeks at gmail.com
Tue Dec 28 21:49:28 UTC 2010


2010/12/28 Roman I Khimov <roman at khimov.ru>:
> В сообщении от Вторник 28 декабря 2010 21:23:39 автор Frans Meulenbroeks
> написал:
>> 2010/12/27 Roman I Khimov <roman at khimov.ru>:
>> > rik at kettle:oe-arm$ cat
>> > tmp/sysroots/armv5te-angstrom-linux-gnueabi/usr/lib/perl/config.sh | grep
>> > -E "^(cc=|ld=|ldflags=)" cc="arm-angstrom-linux-gnueabi-gcc
>> > -march=armv5te -mtune=arm926ej-s -mthumb-interwork -mno-thumb"
>> > ld="arm-angstrom-linux-gnueabi-gcc -march=armv5te -mtune=arm926ej-s
>> > -mthumb-interwork -mno-thumb"
>> > ldflags="-L/storage/work/oe/oe-arm/tmp/sysroots/armv5te-angstrom-linux-gn
>> >ueabi/usr/lib
>> > -Wl,-rpath-link,/storage/work/oe/oe-arm/tmp/sysroots/armv5te-angstrom-lin
>> >ux-gnueabi/usr/lib -Wl,-O1 -Wl,--hash-style=gnu"
>>
>> Comparing notes: I have:
>>
>> frans at linux-suse:~/oe> cat
>> tmp_minimal/sysroots/armv5te-oe-linux-gnueabi/usr/lib/perl/config.sh |
>> grep -E "^(cc=|ld=|ldflags=)"
>> cc="arm-oe-linux-gnueabi-gcc -march=armv5te -mtune=arm926ej-s
>> -mthumb-interwork -mthumb"
>> ld="arm-oe-linux-gnueabi-gcc -march=armv5te -mtune=arm926ej-s
>> -mthumb-interwork -mthumb"
>> ldflags="-Wl,-O1 -Wl,--hash-style=gnu"
>>
>> Note the different definition of ldflags. (no -L ) and the -mthumb
>> versus -mno-thumb.
>
> We might have different targets for thumb things (mine is qemuarm), but "-L"
> difference seems suspicious (my test build is for 'angstrom-2008.1' if that
> matters).
>
>> Btw I am using libtool 2.4 with systool support (should that matter)
>
> Maybe, maybe. I should try some newer distro for my test builds.
>
>> > Same definitions in Config_heavy. It should be working without that. I've
>>
>> Should I have this file in sysroots/armv5te....  ?
>> I only have
>> frans at linux-suse:~/oe/tmp_minimal/sysroots> find | grep heavy
>> ./i686-linux/usr/lib/perl/5.10.1/Config_heavy.pl
>> ./i686-linux/usr/lib/perl/5.10.1/utf8_heavy.pl
>> ./i686-linux/usr/lib/perl/5.10.1/Config_heavy-target.pl
>> ./i686-linux/usr/lib/perl/5.10.1/bytes_heavy.pl
>> ./armv5te-oe-linux-gnueabi/usr/share/mysql/my-innodb-heavy-4G.cnf
>> ./armv7a-oe-linux-gnueabi/usr/share/mysql/my-innodb-heavy-4G.cnf
>>
>> And Config_heavy.pl says:
>> frans at linux-suse:~/oe/tmp_minimal/sysroots> grep -E
>> "^(cc=|ld=|ldflags=)" ./i686-linux/usr/lib/perl/5.10.1/Config_heavy.pl
>
> That's the wrong one, you're interested in Config_heavy-target.pl, or
> Config_heavy-arm-angstrom-linux-gnueabi.pl after my recent patch series (that
> I'll push today).
>
> --
Config_heavy-target.pl has the same content as I gave for config.sh.

I did this as a test:
bitbake -cclean perl perl-native libdatetime-perl
libdatetime-perl-native; bitbake libdatetime-perl

results: config.sh and Config_heavy-target.pl are as reported before.
Build fails. Info on the file:

frans at linux-suse:~/oe>
./tmp_minimal/sysroots/i686-linux/usr/armv5te/bin/arm-oe-linux-gnueabi-objdump
-f tmp_minimal/work/armv5te-oe-linux-gnueabi/libdatetime-perl-0.61-r1/image/usr/lib/perl5/auto/DateTime/DateTime.so

tmp_minimal/work/armv5te-oe-linux-gnueabi/libdatetime-perl-0.61-r1/image/usr/lib/perl5/auto/DateTime/DateTime.so:
    file format elf32-little
architecture: UNKNOWN!, flags 0x00000150:
HAS_SYMS, DYNAMIC, D_PAGED
start address 0x00000e50

frans at linux-suse:~/oe> file
tmp_minimal/work/armv5te-oe-linux-gnueabi/libdatetime-perl-0.61-r1/image/usr/lib/perl5/auto/DateTime/DateTime.so
tmp_minimal/work/armv5te-oe-linux-gnueabi/libdatetime-perl-0.61-r1/image/usr/lib/perl5/auto/DateTime/DateTime.so:
ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV),
dynamically linked, not stripped

Obviously the settings from config.sh are not taken into account.

target sheevaplug (armv5t5) distro minimal, git head of a few days
ago. litbool 2.4 with sysroot support.

Roman, can you perhaps retest with qemu-arm and minimal (as Khem
suggested in the next message).
Also I'm more than happy to do additional tests and/or compare notes
on irc (e.g. tomorrow evening european time)

Frans




More information about the Openembedded-devel mailing list