openwrt/toolchain/glibc/common.mk
Hauke Mehrtens 8d2d49195f toolchain: glibc: Update glibc 2.41 to recent HEAD
373408c19f stdlib: resolve a double lock init issue after fork [BZ #32994]
62928cf7d8 elf: Do not add a copy of _dl_find_object to libc.so
f48de98bce elf: Extract rtld_setup_phdr function from dl_main
513629b14d elf: Handle ld.so with LOAD segment gaps in _dl_find_object (bug 31943)
1502c248d5 nptl: Fix SYSCALL_CANCEL for return values larger than INT_MAX (BZ 33245)
daa4de5253 AArch64: Avoid memset ifunc in cpu-features.c [BZ #33112]
0bb6dad5af AArch64: Optimize algorithm in users of SVE expf helper
2a0b52fdd6 AArch64: Optimize inverse trig functions
307a8a4434 AArch64: Improve codegen in SVE log1p
503f7a7d33 AArch64: Optimize SVE exp functions
6db0f659c8 AArch64: Optimise SVE FP64 Hyperbolics
c467918138 AArch64: Improve codegen SVE log1p helper
330cd035df Remove <libc-tsd.h>
f409ec073f Use proper extern declaration for _nl_C_LC_CTYPE_{class,toupper,tolower}
5d8614b284 ctype: Fallback initialization of TLS using relocations (bug 19341, bug 32483)
940d821afb Use TLS initial-exec model for __libc_tsd_CTYPE_* thread variables [BZ #33234]
4a3e5f1e4c elf: Introduce separate _r_debug_array variable
9d6577fdff elf: Introduce _dl_debug_change_state
b05ce0de3d elf: Restore support for _r_debug interpositions and copy relocations
85780b6055 elf: Compile _dl_debug_state separately (bug 33224)
dd87fcda43 x86-64: Add GLIBC_ABI_GNU2_TLS version [BZ #33129]
e2d9e9eb26 x86-64: Add GLIBC_ABI_DT_X86_64_PLT [BZ #33212]
3f3b4fdd0b elf: Fix handling of symbol versions which hash to zero (bug 29190)
42f9c70ac2 elf: Test dlopen (NULL, RTLD_LAZY) from an ELF constructor
aa5dbd5332 elf: Preserve _rtld_global layout for the release branch
c1bec0b52d i386: Update ___tls_get_addr to preserve vector registers
7aa907241c i386: Also add GLIBC_ABI_GNU2_TLS version [BZ #33129]
ed4672abb5 i386: Add GLIBC_ABI_GNU_TLS version [BZ #33221]
a52c9b75c7 Optimize __libc_tsd_* thread variable access
9867e44cdc AArch64: Fix SVE powf routine [BZ #33299]
cf926cd7fb nss: Group merge does not react to ERANGE during merge (bug 33361)
4b1f8c90f9 x86: Detect Intel Wildcat Lake Processor
7c0632472d x86: Detect Intel Nova Lake Processor
580746904b x86: fix wmemset ifunc stray '!' (bug 33542)
1f57ffdf35 aarch64: Disable ZA state of SME in setjmp and sigsetjmp
97076e0cf1 aarch64: update tests for SME
1a0ee26714 aarch64: define macro for calling __libc_arm_za_disable
889ae4bdbb aarch64: clear ZA state of SME before clone and clone3 syscalls
e4ffcf32b9 aarch64: tests for SME
5bf8ee7ad5 aarch64: fix cfi directives around __libc_arm_za_disable
75b6b263e9 aarch64: Do not link conform tests with -Wl,-z,force-bti (bug 33601)
215e9155ea aarch64: fix includes in SME tests
360f60fb63 AArch64: Optimise SVE scalar callbacks
ca489fc802 AArch64: Fix instability in AdvSIMD tan
442cc3901b AArch64: Fix instability in AdvSIMD sinh
1e16b570bb AArch64: fix SVE tanpi(f) [BZ #33642]
5c6445672a AArch64: Fix and improve SVE pow(f) special cases
040256e79b ppc64le: Restore optimized strcmp for power10
f8cdc03e1e ppc64le: Restore optimized strncmp for power10
6a0b8e3665 ppc64le: Power 10 rawmemchr clobbers v20 (bug #33091)

Link: https://github.com/openwrt/openwrt/pull/20989
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-11-30 19:14:52 +01:00

102 lines
3.2 KiB
Makefile

#
# Copyright (C) 2006-2020 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
PKG_NAME:=glibc
PKG_VERSION:=2.41
PKG_RELEASE:=1
PKG_SOURCE_PROTO:=git
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
PKG_SOURCE_VERSION:=6a0b8e366520a09722aef6c17ec1b103e82f3c28
PKG_MIRROR_HASH:=5bd5efe0b037cada9b2dfdfa75bbc83f087751dd14d7dd8af974b8a37467ec68
PKG_SOURCE_URL:=https://sourceware.org/git/glibc.git
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.zst
PKG_CPE_ID:=cpe:/a:gnu:glibc
HOST_BUILD_DIR:=$(BUILD_DIR_TOOLCHAIN)/$(PKG_SOURCE_SUBDIR)
CUR_BUILD_DIR:=$(HOST_BUILD_DIR)-$(VARIANT)
PATCH_DIR:=$(PATH_PREFIX)/patches
include $(INCLUDE_DIR)/toolchain-build.mk
HOST_STAMP_PREPARED:=$(HOST_BUILD_DIR)/.prepared
HOST_STAMP_CONFIGURED:=$(CUR_BUILD_DIR)/.configured
HOST_STAMP_BUILT:=$(CUR_BUILD_DIR)/.built
HOST_STAMP_INSTALLED:=$(TOOLCHAIN_DIR)/stamp/.glibc_$(VARIANT)_installed
ifeq ($(ARCH),mips64)
ifdef CONFIG_MIPS64_ABI_N64
TARGET_CFLAGS += -mabi=64
endif
ifdef CONFIG_MIPS64_ABI_N32
TARGET_CFLAGS += -mabi=n32
endif
ifdef CONFIG_MIPS64_ABI_O32
TARGET_CFLAGS += -mabi=32
endif
endif
# -Os miscompiles w. 2.24 gcc5/gcc6
# only -O2 tested by upstream changeset
# "Optimize i386 syscall inlining for GCC 5"
GLIBC_CONFIGURE:= \
unset LD_LIBRARY_PATH; \
BUILD_CC="$(HOSTCC)" \
$(TARGET_CONFIGURE_OPTS) \
CFLAGS="-O2 $(filter-out -Os,$(call qstrip,$(TARGET_CFLAGS)))" \
libc_cv_slibdir="/lib" \
use_ldconfig=no \
$(HOST_BUILD_DIR)/$(GLIBC_PATH)configure \
--prefix= \
--build=$(GNU_HOST_NAME) \
--host=$(REAL_GNU_TARGET_NAME) \
--with-headers=$(TOOLCHAIN_DIR)/include \
--disable-profile \
--disable-werror \
--without-gd \
--without-cvs \
--enable-add-ons \
--$(if $(CONFIG_SOFT_FLOAT),without,with)-fp \
$(if $(CONFIG_PKG_CC_STACKPROTECTOR_REGULAR),--enable-stack-protector=yes) \
$(if $(CONFIG_PKG_CC_STACKPROTECTOR_STRONG),--enable-stack-protector=strong) \
$(if $(CONFIG_PKG_CC_STACKPROTECTOR_ALL),--enable-stack-protector=all) \
$(if $(CONFIG_PKG_RELRO_FULL),--enable-bind-now) \
$(if $(CONFIG_PKG_FORTIFY_SOURCE_1),--enable-fortify-source=1) \
$(if $(CONFIG_PKG_FORTIFY_SOURCE_2),--enable-fortify-source=2) \
$(if $(CONFIG_PKG_FORTIFY_SOURCE_3),--enable-fortify-source=3) \
--enable-kernel=6.6.0
export libc_cv_ssp=no
export libc_cv_ssp_strong=no
export ac_cv_header_cpuid_h=yes
export HOST_CFLAGS := $(HOST_CFLAGS) -idirafter $(CURDIR)/$(PATH_PREFIX)/include
define Host/SetToolchainInfo
$(SED) 's,^\(LIBC_TYPE\)=.*,\1=$(PKG_NAME),' $(TOOLCHAIN_DIR)/info.mk
$(SED) 's,^\(LIBC_URL\)=.*,\1=http://www.gnu.org/software/libc/,' $(TOOLCHAIN_DIR)/info.mk
$(SED) 's,^\(LIBC_VERSION\)=.*,\1=$(PKG_VERSION),' $(TOOLCHAIN_DIR)/info.mk
$(SED) 's,^\(LIBC_SO_VERSION\)=.*,\1=$(PKG_VERSION),' $(TOOLCHAIN_DIR)/info.mk
endef
define Host/Configure
mkdir -p $(CUR_BUILD_DIR)
( cd $(CUR_BUILD_DIR); rm -f config.cache; \
$(GLIBC_CONFIGURE) \
);
endef
define Host/Prepare
$(call Host/Prepare/Default)
ln -snf $(PKG_SOURCE_SUBDIR) $(BUILD_DIR_TOOLCHAIN)/$(PKG_NAME)
endef
define Host/Clean
rm -rf $(CUR_BUILD_DIR)* \
$(BUILD_DIR_TOOLCHAIN)/$(LIBC)-dev \
$(BUILD_DIR_TOOLCHAIN)/$(PKG_NAME)
endef