53e40a2cad
Drop 0003-rewrite-wcsnrtombs-to-fix-buffer-overflow-and-other-.patch as it is a backport of upstream commit 3ab2a4e02682df1382955071919d8aa3c3ec40d4 which is part of the 1.2.2 release. 1.2.2 release notes major changes: - child restrictions lifted after fork of multithreaded parent new features: - _Fork function (POSIX-future) - reallocarray function (extension from OpenBSD, now widespread) - gettid function (kernel tid as supported concept) - SIGEV_THREAD_ID sigevent API (Linux extension) - tcgetwinsize and tcsetwinsize functions (POSIX-future) performance: - faster software sqrt on archs without native sqrt instruction compatibility: - realpath no longer depends on procfs availability & accuracy - time zone parser now always prefers 64-bit tables if present - crypt_blowfish now supports $2b$ prefix - res_query now reports errors via h_errno - set*id and setrlimit are now safe in vforked/cloned child - setgroups now applies to all threads - dlopen debugger notification is improved, should work with lldb - setrlimit no longer needs __synccall broadcast on linux 2.6.36+ - faccessat with AT_EACCESS no longer needs child process on linux 5.8+ bugs fixed: - buffer overflow and infinite loop errors in wcsnrtombs (CVE-2020-28928) - sem_close unmapped still-referenced semaphores - fork of process with active aio could deadlock or crash paren - pthread_cond_wait was broken with priority-inheritance mutex - getgrouplist wrongly failed when nscd reported an empty list - abort could leak modified SIGABRT disposition to fork or posix_spawn child - regression with mallocng: malloc_usable_size(0) crashed - readlink wrongly gave EINVAL on zero length dest buffer - sqrtl was severely inaccurate (not correctly rounded) on ldquad archs - assert failure wrongly flushed stdio (possible deadlock) - MUSL_LOCPATH search was broken with multiple components - missing newline in herror output - possible deadlock in pthread_exit with pshared mutex or barrier usage - pthread_mutexattr_getprotocol didn't read back protocol - v4l2 ioctl translation for pre-time64 kernels didn't work arch-specific bugs fixed: - x86_64 longjmp failed to handle 0 argument reliably - i386 __set_thread_area fallback for pre-2.6 kernels didn't work - missing O_LARGEFILE macro value on x86_64, x32, mips64 - unpredictable s390x breakage from failure to preserve call-saved registers Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
65 lines
2.0 KiB
Makefile
65 lines
2.0 KiB
Makefile
################################################################################
|
|
#
|
|
# musl
|
|
#
|
|
################################################################################
|
|
|
|
MUSL_VERSION = 1.2.2
|
|
MUSL_SITE = http://www.musl-libc.org/releases
|
|
MUSL_LICENSE = MIT
|
|
MUSL_LICENSE_FILES = COPYRIGHT
|
|
|
|
# Before musl is configured, we must have the first stage
|
|
# cross-compiler and the kernel headers
|
|
MUSL_DEPENDENCIES = host-gcc-initial linux-headers
|
|
|
|
# musl does not provide an implementation for sys/queue.h or sys/cdefs.h.
|
|
# So, add the musl-compat-headers package that will install those files,
|
|
# into the staging directory:
|
|
# sys/queue.h: header from NetBSD
|
|
# sys/cdefs.h: minimalist header bundled in Buildroot
|
|
MUSL_DEPENDENCIES += musl-compat-headers
|
|
|
|
# musl is part of the toolchain so disable the toolchain dependency
|
|
MUSL_ADD_TOOLCHAIN_DEPENDENCY = NO
|
|
|
|
MUSL_INSTALL_STAGING = YES
|
|
|
|
# Thumb build is broken, build in ARM mode, since all architectures
|
|
# that support Thumb1 also support ARM.
|
|
ifeq ($(BR2_ARM_INSTRUCTIONS_THUMB),y)
|
|
MUSL_EXTRA_CFLAGS += -marm
|
|
endif
|
|
|
|
define MUSL_CONFIGURE_CMDS
|
|
(cd $(@D); \
|
|
$(TARGET_CONFIGURE_OPTS) \
|
|
CFLAGS="$(filter-out -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64,$(TARGET_CFLAGS)) $(MUSL_EXTRA_CFLAGS)" \
|
|
CPPFLAGS="$(filter-out -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64,$(TARGET_CPPFLAGS))" \
|
|
./configure \
|
|
--target=$(GNU_TARGET_NAME) \
|
|
--host=$(GNU_TARGET_NAME) \
|
|
--prefix=/usr \
|
|
--libdir=/lib \
|
|
--disable-gcc-wrapper \
|
|
--enable-static \
|
|
$(if $(BR2_STATIC_LIBS),--disable-shared,--enable-shared))
|
|
endef
|
|
|
|
define MUSL_BUILD_CMDS
|
|
$(TARGET_MAKE_ENV) $(MAKE) -C $(@D)
|
|
endef
|
|
|
|
define MUSL_INSTALL_STAGING_CMDS
|
|
$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) \
|
|
DESTDIR=$(STAGING_DIR) install-libs install-tools install-headers
|
|
endef
|
|
|
|
define MUSL_INSTALL_TARGET_CMDS
|
|
$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) \
|
|
DESTDIR=$(TARGET_DIR) install-libs
|
|
$(RM) $(addprefix $(TARGET_DIR)/lib/,crt1.o crtn.o crti.o rcrt1.o Scrt1.o)
|
|
endef
|
|
|
|
$(eval $(generic-package))
|