poky/meta/recipes-core/musl/musl_git.bb
Khem Raj e1408f337a musl: Upgrade to tip of trunk
Brings following changes

* ae3a8c93 fix strcasestr failing to find zero-length needle
* 23febbd3 align mbsnrtowcs behavior on partial character with new requirements
* 6915b348 dns resolver: reorder sockaddr union to make initialization safe
* a34ca6ea termios: fix input speed handling
* b6b81f69 clone: clear the frame pointer in the child process on relevant ports
* 5e03c03f clone: align the given stack pointer on or1k and riscv
* 06c5e4e8 signal: check sigpause() input parameter
* b0dc340b loongarch64: add bits/hwcap.h for cpu feature bits in AT_HWCAP auxv entry
* cabbd869 bind_textdomain_codeset: fix return value
* 00fb7107 shadow.h: remove declaration of function not implemented
* 362fc545 riscv: mark __restore and __restore_rt hidden
* f1cda422 i386, x86_64, x32: set the symbol type for the crt1 START function

(From OE-Core rev: f73f00e01d7a2713605cd9e828b4a0cb29de4448)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2025-06-02 22:17:24 +01:00

87 lines
2.9 KiB
BlitzBasic

# Copyright (C) 2014 Khem Raj <raj.khem@gmail.com>
# Released under the MIT license (see COPYING.MIT for the terms)
require musl.inc
inherit linuxloader
SRCREV = "ae3a8c93a663b553e65f096498937083dad210d2"
BASEVER = "1.2.5"
PV = "${BASEVER}+git"
SRC_URI = "git://git.musl-libc.org/musl;branch=master \
file://0001-Make-dynamic-linker-a-relative-symlink-to-libc.patch \
file://0002-ldso-Use-syslibdir-and-libdir-as-default-pathes-to-l.patch \
file://0001-Update-syscalls-for-r32-rv64-from-kernel-6.4-through.patch \
"
S = "${WORKDIR}/git"
PROVIDES += "virtual/libc virtual/libiconv virtual/libintl virtual/crypt"
DEPENDS = "virtual/cross-binutils \
virtual/cross-cc \
libgcc-initial \
linux-libc-headers \
bsd-headers \
libssp-nonshared \
"
GLIBC_LDSO = "${@get_glibc_loader(d)}"
MUSL_LDSO_ARCH = "${@get_musl_loader_arch(d)}"
export CROSS_COMPILE = "${TARGET_PREFIX}"
LDFLAGS += "-Wl,-soname,libc.so"
# When compiling for Thumb or Thumb2, frame pointers _must_ be disabled since the
# Thumb frame pointer in r7 clashes with musl's use of inline asm to make syscalls
# (where r7 is used for the syscall NR). In most cases, frame pointers will be
# disabled automatically due to the optimisation level, but append an explicit
# -fomit-frame-pointer to handle cases where optimisation is set to -O0 or frame
# pointers have been enabled by -fno-omit-frame-pointer earlier in CFLAGS, etc.
CFLAGS:append:arm = " ${@bb.utils.contains('TUNE_CCARGS', '-mthumb', '-fomit-frame-pointer', '', d)}"
CONFIGUREOPTS = " \
--prefix=${prefix} \
--exec-prefix=${exec_prefix} \
--bindir=${bindir} \
--libdir=${libdir} \
--includedir=${includedir} \
--syslibdir=${nonarch_base_libdir} \
"
do_configure() {
${S}/configure ${CONFIGUREOPTS}
}
do_compile() {
oe_runmake
}
do_install() {
oe_runmake install DESTDIR='${D}'
install -d ${D}${bindir} ${D}${sysconfdir}
echo "${base_libdir}" > ${D}${sysconfdir}/ld-musl-${MUSL_LDSO_ARCH}.path
echo "${libdir}" >> ${D}${sysconfdir}/ld-musl-${MUSL_LDSO_ARCH}.path
rm -f ${D}${bindir}/ldd ${D}${GLIBC_LDSO}
ln -rs ${D}${libdir}/libc.so ${D}${bindir}/ldd
}
FILES:${PN} += "${nonarch_base_libdir}/ld-musl-${MUSL_LDSO_ARCH}.so.1 ${sysconfdir}/ld-musl-${MUSL_LDSO_ARCH}.path"
FILES:${PN}-staticdev = "${libdir}/libc.a"
FILES:${PN}-dev =+ "${libdir}/libcrypt.a ${libdir}/libdl.a ${libdir}/libm.a \
${libdir}/libpthread.a ${libdir}/libresolv.a \
${libdir}/librt.a ${libdir}/libutil.a ${libdir}/libxnet.a \
"
RDEPENDS:${PN}-dev += "linux-libc-headers-dev bsd-headers-dev libssp-nonshared-staticdev"
RPROVIDES:${PN}-dev += "libc-dev virtual-libc-dev"
RPROVIDES:${PN} += "ldd rtld(GNU_HASH)"
LEAD_SONAME = "libc.so"
INSANE_SKIP:${PN}-dev = "staticdev"
INSANE_SKIP:${PN} = "libdir"
UPSTREAM_CHECK_COMMITS = "1"