openwrt/toolchain/glibc/common.mk

102 lines
3.0 KiB
Makefile
Raw Normal View History

#
# 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.33
PKG_RELEASE:=2
PKG_SOURCE_PROTO:=git
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
glibc: update to latest 2.33 HEAD 14f2867b57 Fix failing nss/tst-nss-files-hosts-long with local resolver d27d1e4d13 posix: Fix attribute access mode on getcwd [BZ #27476] 4b95183785 S390: Add PCI_MIO and SIE HWCAPs 6090cf1330 elf: Replace nsid with args.nsid [BZ #27609] 9edf29fd72 s390: Use long branches across object boundaries (jgh instead of jh) 94c91ce231 support: Add xpthread_kill f9592d65f2 nptl: Do not set signal mask on second setjmp return [BZ #28607] 1cc490adca powerpc64[le]: Fix CFI and LR save address for asm syscalls [BZ #28532] c76a0ba878 gconv: Do not emit spurious NUL character in ISO-2022-JP-3 (bug 28524) c493f6a0e4 powerpc64[le]: Allocate extra stack frame on syscall.S 55b99e9ed0 powerpc: Fix unrecognized instruction errors with recent GCC a51b76b71e x86: use default cache size if it cannot be determined [BZ #28784] f10e992e8d socket: Add the __sockaddr_un_set function 4653cd9e36 CVE-2022-23219: Buffer overflow in sunrpc clnt_create for "unix" (bug 22542) dae9a8e7f6 sunrpc: Test case for clnt_create "unix" buffer overflow (bug 22542) 4f4452721d <shlib-compat.h>: Support compat_symbol_reference for _ISOMAC 0f70b829f8 CVE-2022-23218: Buffer overflow in sunrpc svcunix_create (bug 28768) 5cab4e3f3a powerpc: Fix unrecognized instruction errors with recent binutils ac148bdd88 elf: Fix glibc-hwcaps priorities with cache flags mismatches [BZ #27046] e081bafcb1 support: Add helpers to create paths longer than PATH_MAX e41e5b97e3 realpath: Set errno to ENAMETOOLONG for result larger than PATH_MAX [BZ #28770] f63cb3cf72 tst-realpath-toolong: Fix hurd build 46a70c49ba support: Add xclone bcdde07537 getcwd: Set errno to ERANGE for size == 1 (CVE-2021-3999) 41980af2d7 realpath: Avoid overwriting preexisting error (CVE-2021-3998) 48d9161e02 Linux: Detect user namespace support in io/tst-getcwd-smallbuff 06ce5fbd6d support: Fix xclone build failures on ia64 and hppa d251ad533e aarch64: align stack in clone [BZ #27939] 3d52239b30 x86: Fix __wcsncmp_avx2 in strcmp-avx2.S [BZ# 28755] 86c153d092 NEWS: Add a bug fix entry for BZ #28755 6b7b6c7514 test-strnlen.c: Initialize wchar_t string with wmemset [BZ #27655] a744a0a3fe test-strnlen.c: Check that strnlen won't go beyond the maximum length f0a2b67147 x86: Set Prefer_No_VZEROUPPER and add Prefer_AVX2_STRCMP 9cee072f8f x86-64: Add ifunc-avx2.h functions with 256-bit EVEX 06d1aed51b x86-64: Add strcpy family functions with 256-bit EVEX 1697e739ef x86-64: Add memmove family functions with 256-bit EVEX 47bf9f38bb x86-64: Add memset family functions with 256-bit EVEX 15bae38c8b x86-64: Add memcmp family functions with 256-bit EVEX 0598a25cbe x86-64: Add AVX optimized string/memory functions for RTM 82f1ba9af7 x86: Add string/memory function tests in RTM region 763cea698b x86-64: Use ZMM16-ZMM31 in AVX512 memset family functions d49105cc7a x86-64: Use ZMM16-ZMM31 in AVX512 memmove family functions 31dd3e3cb3 x86-64: Fix ifdef indentation in strlen-evex.S 902af2f5ee NEWS: Add a bug fix entry for BZ #27457 e09c377806 x86: Optimize memchr-avx2.S 453ed0a0f2 x86: Fix overflow bug with wmemchr-sse2 and wmemchr-avx2 [BZ #27974] b72b89705e x86: Optimize strlen-avx2.S 355afae940 x86: Optimize memchr-evex.S 3dea108f60 x86-64: Fix an unknown vector operation in memchr-evex.S 5697e2dda8 x86-64: Move strlen.S to multiarch/strlen-vec.S 3ac5a7fe8b x86-64: Add wcslen optimize for sse4.1 cef3bffade x86: Fix overflow bug in wcsnlen-sse4_1 and wcsnlen-avx2 [BZ #27974] 8a3a0177c7 x86: Optimize strlen-evex.S 2b00ee820a String: Add overflow tests for strnlen, memchr, and strncat [BZ #27974] 25941de34e NEWS: Add a bug fix entry for BZ #27974 3e2a15c666 x86-64: Require BMI2 for __strlen_evex and __strnlen_evex 5cb6edb6cd x86: Copy IBT and SHSTK usable only if CET is enabled 0a5f5e2dc1 x86: Check RTM_ALWAYS_ABORT for RTM [BZ #28033] 54fdfa2b33 x86: Black list more Intel CPUs for TSX [BZ #27398] 1b8f2456b9 x86: Use CHECK_FEATURE_PRESENT to check HLE [BZ #27398] 260360e89b x86: Remove wcsnlen-sse4_1 from wcslen ifunc-impl-list [BZ #28064] 1956ad4930 x86-64: Test strlen and wcslen with 0 in the RSI register [BZ #28064] 78d25827ae Linux: Simplify __opensock and fix race condition [BZ #28353] 9495d729f6 hurd if_index: Explicitly use AF_INET for if index discovery 55446dd8a2 socket: Do not use AF_NETLINK in __opensock Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2022-02-12 21:31:50 +00:00
PKG_SOURCE_VERSION:=55446dd8a2d7b84d966fe4248427c02845b036d4
PKG_MIRROR_HASH:=ef5ae2f63828aa3330e36ee2ec81a2de874c11d4dc24f0229109ab5581f29d76
PKG_SOURCE_URL:=https://sourceware.org/git/glibc.git
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.xz
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) \
--enable-kernel=4.14.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
[ -f $(HOST_BUILD_DIR)/.autoconf ] || { \
cd $(HOST_BUILD_DIR)/; \
autoconf --force && \
touch $(HOST_BUILD_DIR)/.autoconf; \
}
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