openwrt/toolchain/glibc/common.mk
Hauke Mehrtens 05a1a71530
Some checks failed
Build Kernel / Build all affected Kernels (push) Waiting to run
Build all core packages / Build all core packages for selected target (push) Waiting to run
Build and Push prebuilt tools container / Build and Push all prebuilt containers (push) Has been cancelled
Build Toolchains / Build Toolchains for each target (push) Has been cancelled
Build host tools / Build host tools for linux and macos based systems (push) Has been cancelled
toolchain: glibc: Update glibc 2.38 to recent HEAD
f510d75ff7 nscd: Use time_t for return type of addgetnetgrentX
5aa4bb67b9 resolv: Fix some unaligned accesses in resolver [BZ #30750]
249646f12b Force DT_RPATH for --enable-hardcoded-path-in-tests
697ab62d11 i386: Disable Intel Xeon Phi tests for GCC 15 and above (BZ 31782)
c8cb4d2b86 misc: Add support for Linux uio.h RWF_NOAPPEND flag
712453634c s390x: Fix segfault in wcsncmp [BZ #31934]
7bfc35959d nptl: fix potential merge of __rseq_* relro symbols
d9d019d674 elf: Make dl-rseq-symbols Linux only
bb30bd2162 Linux: Make __rseq_size useful for feature detection (bug 31965)
dc512364e8 resolv: Allow short error responses to match any query (bug 31890)
6cad0f543c resolv: Do not wait for non-existing second DNS response after error (bug 30081)
1bed6acf50 resolv: Track single-request fallback via _res._flags (bug 31476)
0301637b99 linux: Update the mremap C implementation [BZ #31968]
f0e2114535 mremap: Update manual entry
6bb75212e6 Add mremap tests
3ac7ba61d2 Update syscall lists for Linux 6.5
9184c13681 resolv: Fix tst-resolv-short-response for older GCC (bug 32042)
059f82c3b9 Fix name space violation in fortify wrappers (bug 32052)
c005d1bd6f x86: Fix bug in strchrnul-evex512 [BZ #32078]
28f358bc42 support: Add FAIL test failure helper
99ffa84bdc stdio-common: Add test for vfscanf with matches longer than INT_MAX [BZ #27650]
87a1968a72 Make tst-ungetc use libsupport
804d3c8db7 ungetc: Fix uninitialized read when putting into unused streams [BZ #27821]
b9f72bd5de ungetc: Fix backup buffer leak on program exit [BZ #27821]
15ca66303f posix: Use <support/check.h> facilities in tst-truncate and tst-truncate64
f30501ca75 nptl: Use <support/check.h> facilities in tst-setuid3
370be85892 libio: Attempt wide backup free only for non-legacy code
4dd8641461 Add crt1-2.0.o for glibc 2.0 compatibility tests
fa4ad10406 elf: Change ldconfig auxcache magic number (bug 32231)
9423cc5387 nptl: initialize rseq area prior to registration
37ded328c4 nptl: initialize cpu_id_start prior to rseq registration
cf06772360 x86: Avoid integer truncation with large cache sizes (bug 32470)
5c9be512ee x86_64: Sort fpu/multiarch/Makefile
49016f2190 x86_64: Add log2 with FMA
b2a45f1eee x86_64: Add expm1 with FMA
c92946d9b2 x86_64: Add log1p with FMA
58822f954f x86: Check the lower byte of EAX of CPUID leaf 2 [BZ #30643]
7772f9358c elf: Fix slow tls access after dlopen [BZ #19924]
5a64f93365 x86: Only align destination to 1x VEC_SIZE in memset 4x loop
0d14bf0754 sysdeps/x86/Makefile: Split and sort tests
dc1762113d x86_64: Fix missing wcsncat function definition without multiarch (x86-64-v4)
04b8d48432 x86: Improve large memset perf with non-temporal stores [RHEL-29312]
12fec8aae5 x86/string: Fixup alignment of main loop in str{n}cmp-evex [BZ #32212]
48642ef1a5 elf: Avoid some free (NULL) calls in _dl_update_slotinfo
549e7f7c5a elf: Support recursive use of dynamic TLS in interposed malloc
c32fd59314 Fix underallocation of abort_msg_s struct (CVE-2025-0395)
650a0aaaff stdlib: Test using setenv with updated environ [BZ #32588]
f984e2d7e8 assert: Add test for CVE-2025-0395
9ca74b8ad1 AArch64: Improve generic strlen
95aa21432c AArch64: Optimize memset
5fe151d86a AArch64: Remove zva_128 from memset
3de5112326 math: Improve layout of expf data
52c2b1556f AArch64: Add SVE memset
097299ffa9 AArch64: Use prefer_sve_ifuncs for SVE memset
5a08d049dc math: Improve layout of exp/exp10 data
3be3728df2 elf: Ignore LD_LIBRARY_PATH and debug env var for setuid for static
454f24e981 support: Use const char * argument in support_capture_subprogram_self_sgid
4335cd9b58 support: Add support_record_failure_barrier
31fa0f73e2 elf: Test case for bug 32976 (CVE-2025-4802)
ca41fe44a5 x86_64: Fix typo in ifunc-impl-list.c.
ca7e32d024 elf: Fix subprocess status handling for tst-dlopen-sgid (bug 32987)
81f58dd9b7 support: Pick group in support_capture_subprogram_self_sgid if UID == 0
5a6276d97a Fix error reporting (false negatives) in SGID tests
1a0d73a625 pthreads NPTL: lost wakeup fix 2
b5c4727e59 nptl: Update comments and indentation for new condvar implementation
1fa5e51897 nptl: Remove unnecessary catch-all-wake in condvar group switch
44eaf0615d nptl: Remove unnecessary quadruple check in pthread_cond_wait
7625579f11 nptl: Remove g_refs from condition variables
6bac834c5a nptl: Use a single loop in pthread_cond_wait instaed of a nested loop
5765653697 nptl: Fix indentation
8899e89b29 nptl: rename __condvar_quiesce_and_switch_g1
39a80f4035 nptl: Use all of g1_start and g_signals
51210d6496 nptl: PTHREAD_COND_INITIALIZER compatibility with pre-2.41 versions (bug 32786)
879f0ee122 malloc: add indirection for malloc(-like) functions in tests [BZ #32366]
a637f2c42f malloc: obscure calloc use in tst-calloc
21019afe65 malloc: cleanup casts in tst-calloc
6a52d5cab0 posix: Fix double-free after allocation failure in regcomp (bug 33185)

Link: https://github.com/openwrt/openwrt/pull/19551
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-07-27 19:47:26 +02: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.38
PKG_RELEASE:=1
PKG_SOURCE_PROTO:=git
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
PKG_SOURCE_VERSION:=6a52d5cab01ee8d3303f7c0939d6b2618c8a9606
PKG_MIRROR_HASH:=2f55c40271e064e4fa338d9a04fd258c4c59a6ad198ab4bbfb7782e318db80c2
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 \
--enable-crypt \
--$(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) \
--enable-kernel=5.15.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