mirror of
https://git.yoctoproject.org/poky
synced 2026-06-01 13:09:50 +00:00
elfutils_0.148.bb: Fix compilation on uclibc
Currently all components of elfutils dont compile with uclibc but elfutils is one part which is needed by other recipes e.g. gcc 4.5 to compile. we make adjustments so that when compiling for uclibc targets it _only_ builds and packages libelf use --enable-uclibc only when building for uclibc targets The supporting patch is also needed for compiling with uclibc to specify -lintl and -luargp on linker commandline Add missing inherit on gettext (From OE-Core rev: e21267f1837b25fec4443dbf4367e501639541bd) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
@@ -30,6 +30,9 @@ SRC_URI += "\
|
||||
file://remove-unused.patch \
|
||||
file://mempcpy.patch \
|
||||
"
|
||||
# Only apply when building uclibc based target recipe
|
||||
SRC_URI_append_libc-uclibc = " ${@['', 'file://uclibc-support.patch']['${PN}' == '${BPN}']}"
|
||||
|
||||
# The buildsystem wants to generate 2 .h files from source using a binary it just built,
|
||||
# which can not pass the cross compiling, so let's work around it by adding 2 .h files
|
||||
# along with the do_configure_prepend()
|
||||
@@ -38,9 +41,10 @@ SRC_URI += "\
|
||||
file://i386_dis.h \
|
||||
file://x86_64_dis.h \
|
||||
"
|
||||
inherit autotools
|
||||
inherit autotools gettext
|
||||
|
||||
EXTRA_OECONF = "--program-prefix=eu-"
|
||||
EXTRA_OECONF_append_libc-uclibc = " ${@['', '--enable-uclibc']['${PN}' == '${BPN}']}"
|
||||
|
||||
do_configure_prepend() {
|
||||
sed -i 's:./i386_gendis:echo\ \#:g' ${S}/libcpu/Makefile.am
|
||||
@@ -48,8 +52,13 @@ do_configure_prepend() {
|
||||
cp ${WORKDIR}/*dis.h ${S}/libcpu
|
||||
}
|
||||
|
||||
# Only append ldflags for target recipe
|
||||
TARGET_LDFLAGS_libc-uclibc += "${@['', '-lintl -luargp']['${PN}' == '${BPN}']}"
|
||||
# we can not build complete elfutils when using uclibc
|
||||
# but some recipes e.g. gcc 4.5 depends on libelf so we
|
||||
# build only libelf for uclibc case
|
||||
|
||||
EXTRA_OEMAKE_libc-uclibc = "-C libelf"
|
||||
EXTRA_OEMAKE_virtclass-native = ""
|
||||
EXTRA_OEMAKE_virtclass-nativesdk = ""
|
||||
|
||||
BBCLASSEXTEND = "native nativesdk"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user