[oe] Revert "package bbclass: strip static libs as well"
Stanislav Brabec
utx at penguin.cz
Sat Oct 24 14:13:43 UTC 2009
Stanislav Brabec wrote:
> FILES_${PN}-static = "" is not fully correct general solution. There
> are projects, that have more static libraries. Only listed static
> libraries must go to -dev, the rest may go to -static. A good
> example is libsdl-x11. Only libSDLmain.a must go to -dev, the rest
SDL is not a good example, orbit2 is a better example.
Being able to write ${PN}-dev += "${libdir}/libfoo.a" instead of
overwriting of
${PN}-static with a negative expression would be more comfortable. I
guess that it depends only on the order of evaluation in the bbclass
file.
The QA test should be:
libfoo.a is in -static but libfoo.so does not exist => issue fatal QA
error with
proposed fix: move libfoo.a e. g. to -dev.
Note that libgcc.a has to go to the main package. Even -dev is not
correct here.
Here is a new bash command and its output:
utx@/OE/build/tmp/work> find */*/image -name '*.a' | fgrep -v .debug |
while read ; do if ! test -f "${REPLY%.a}.so" ; then PKG=$REPLY ;
PKG=${PKG#*/} ; PKG=${PKG%%/*} ; echo
$PKG ; fi ; done | uniq -c | while read COUNT PKG ; do XCOUNT=$(find
*/$PKG/image -name '*.a' | fgrep -v .debug | wc -l) ; echo -n $PKG:
$XCOUNT static total, $COUNT static unique ; if test $COUNT -eq $XCOUNT
; then echo ' => can use simple expression' ; else echo ' => needs
complex expression' ; fi ; done
alsa-oss-1.0.17-r0: 3 static total, 1 static unique => needs complex
expression
binutils-2.18-r8.1: 3 static total, 1 static unique => needs complex
expression
bison-2.3-r0: 1 static total, 1 static unique => can use simple
expression
bridge-utils-1.4-r0: 1 static total, 1 static unique => can use simple
expression
firefox-3.5.2-r2: 12 static total, 12 static unique => can use simple
expression
flex-2.5.31-r4: 1 static total, 1 static unique => can use simple
expression
gcc-cross-4.3.3-r7.1: 12 static total, 12 static unique => can use
simple expression
gcc-4.3.3-r7.1: 10 static total, 7 static unique => needs complex
expression
gdb-7.0-r0: 3 static total, 3 static unique => can use simple expression
glibc-2.9-r35.2: 17 static total, 6 static unique => needs complex
expression
libassuan-0.6.9-r0: 1 static total, 1 static unique => can use simple
expression
libatomics-ops-1.2-r2: 2 static total, 2 static unique => can use
simple expression
libsdl-x11-1.2.11-r8: 1 static total, 1 static unique => can use simple
expression
mysql-4.1.22-r3: 11 static total, 10 static unique => needs complex
expression
orbit2-2.14.17-r0: 5 static total, 1 static unique => needs complex
expression
perl-5.8.8-r28: 1 static total, 1 static unique => can use simple
expression
python-2.6.1-ml8.0: 1 static total, 1 static unique => can use simple
expression
tcl-8.4.19-r2: 1 static total, 1 static unique => can use simple
expression
tk-8.4.19-r0: 1 static total, 1 static unique => can use simple
expression
tcl-native-8.4.19-r2: 1 static total, 1 static unique => can use simple
expression
tk-native-8.4.19-r0: 1 static total, 1 static unique => can use simple
expression
The simple expression can be .../*.a in -dev (or -sdk or so) or
emptying of -static.
gcc may need special care and double thinking. But I guess that the
logic: "Do you want to compile static binaries? Install gcc-static." is
valid here as well.
--
Stanislav Brabec
http://www.penguin.cz/~utx/zaurus
More information about the Openembedded-devel
mailing list