|
@@ -5,21 +5,19 @@
|
|
|
%if "%{_target_cpu}" != "%(arch)"
|
|
|
%global _sourcedir %{_topdir}/SOURCES/glibc
|
|
|
%define build_compat32 1
|
|
|
-%define compat32_prefix compat32-
|
|
|
-%define compat32_group ,legacy
|
|
|
%else
|
|
|
%define build_compat32 0
|
|
|
%endif
|
|
|
|
|
|
-%define glibcversion 2.38
|
|
|
+%define glibcversion 2.39
|
|
|
%define glibcsrcdir glibc-%{glibcversion}
|
|
|
|
|
|
Summary: The GNU libc libraries
|
|
|
Summary(ja): GNU libc ライブラリ
|
|
|
-Name: %{?compat32_prefix}glibc
|
|
|
+Name: glibc
|
|
|
Version: %{glibcversion}
|
|
|
-Release: 3%{?_dist_release}%{?with_systemd:.systemd}
|
|
|
-Group: system%{?compat32_group}
|
|
|
+Release: 1%{?_dist_release}%{?with_systemd:.systemd}
|
|
|
+Group: system
|
|
|
Vendor: Project Vine
|
|
|
Distribution: Vine Linux
|
|
|
|
|
@@ -65,7 +63,7 @@ rpm.define("__debug_install_post bash " .. wrapper
|
|
|
%undefine _unique_build_ids
|
|
|
|
|
|
# patch from upstream
|
|
|
-Patch0: glibc-2.38-20231006.patch
|
|
|
+Patch0: glibc-%{version}-20240605.patch
|
|
|
|
|
|
# patches from Fedora
|
|
|
Patch4: glibc-fedora-linux-tcsetattr.patch
|
|
@@ -75,7 +73,7 @@ Patch13: glibc-fedora-localedata-rh61908.patch
|
|
|
# remove /bin from CS_PATH
|
|
|
#Patch17: glibc-cs-path.patch
|
|
|
Patch23: glibc-python3.patch
|
|
|
-Patch24: glibc-disable-werror-tst-realloc.patch
|
|
|
+Patch78: glibc-RHEL-22226.patch
|
|
|
|
|
|
# patch for Vine
|
|
|
Patch1000: glibc-fedora-locarchive.patch
|
|
@@ -133,7 +131,7 @@ Obsoletes: glibc-profile < 2.4
|
|
|
Requires(pre): basesystem, libgcc
|
|
|
# This is for building auxiliary programs like memusage, nscd
|
|
|
# For initial glibc bootstraps it can be commented out
|
|
|
-BuildRequires: gd-devel libpng-devel zlib-devel texinfo
|
|
|
+BuildRequires: gd-devel libpng-devel pkgconfig(zlib) texinfo
|
|
|
BuildRequires: audit-libs-devel >= 1.1.3, sed >= 3.95, libcap-devel, gettext, nss-devel
|
|
|
BuildRequires: python3-devel
|
|
|
BuildRequires: bison
|
|
@@ -225,7 +223,7 @@ Install glibc-xen if you might run your system under the Xen hypervisor.
|
|
|
%package devel
|
|
|
Summary: Object files for development using standard C libraries.
|
|
|
Summary(ja): 標準 C ライブラリで使われるオブジェクトファイル
|
|
|
-Group: programming{?compat32_group}
|
|
|
+Group: programming
|
|
|
Requires: %{name} = %{version}-%{release}
|
|
|
%if %{build_compat32}
|
|
|
Requires: glibc-devel >= %{version}-%{release}
|
|
@@ -258,7 +256,7 @@ glibc-devel パッケージには (ほとんどすべてのプログラムで使
|
|
|
%package static
|
|
|
Summary: C library static libraries for -static linking.
|
|
|
Summary(ja): -static リンクのための静的 C ライブラリ
|
|
|
-Group: programming{?compat32_group}
|
|
|
+Group: programming
|
|
|
Requires: %{name}-devel = %{version}-%{release}
|
|
|
|
|
|
%description static
|
|
@@ -401,6 +399,46 @@ xtrace (関数呼出しトレーサ)。
|
|
|
これらが必要かどうか分からない場合は、インストールする必要はありません。
|
|
|
|
|
|
|
|
|
+%if %{build_compat32}
|
|
|
+%package -n compat32-glibc
|
|
|
+Summary: The GNU libc libraries (32bit)
|
|
|
+Summary(ja): GNU libc ライブラリ (32ビット)
|
|
|
+Group: system,legacy
|
|
|
+
|
|
|
+%description -n compat32-glibc
|
|
|
+This package contains the GNU libc for 32bit.
|
|
|
+
|
|
|
+%description -n compat32-glibc -l ja
|
|
|
+このパッケージはGNU libcの32bit版を収録しています。
|
|
|
+
|
|
|
+
|
|
|
+%package -n compat32-glibc-devel
|
|
|
+Summary: Object files for development using standard C libraries (32bit).
|
|
|
+Summary(ja): 標準 C ライブラリで使われるオブジェクトファイル (32ビット)
|
|
|
+Group: programming,legacy
|
|
|
+Requires: compat32-glibc = %{version}-%{release}
|
|
|
+
|
|
|
+%description -n compat32-glibc-devel
|
|
|
+This package contains the 32bit version of development files for GNU libc.
|
|
|
+
|
|
|
+%description -n compat32-glibc-devel -l ja
|
|
|
+このパッケージはGNU libcを用いた開発に必要なファイルの32bit版を収録しています。
|
|
|
+
|
|
|
+
|
|
|
+%package -n compat32-glibc-static
|
|
|
+Summary: C library static libraries for -static linking (32bit).
|
|
|
+Summary(ja): -static リンクのための静的 C ライブラリ (32ビット)
|
|
|
+Group: programming,legacy
|
|
|
+Requires: compat32-glibc-devel = %{version}-%{release}
|
|
|
+
|
|
|
+%description -n compat32-glibc-static
|
|
|
+This package contains the 32bit version of static library for GNU libc.
|
|
|
+
|
|
|
+%description -n compat32-glibc-devel -l ja
|
|
|
+このパッケージはGNU libcの静的ライブラリの32bit版を収録しています。
|
|
|
+%endif
|
|
|
+
|
|
|
+
|
|
|
%debug_package
|
|
|
|
|
|
|
|
@@ -440,73 +478,97 @@ cp -f %{SOURCE1000} ./
|
|
|
GCC=gcc
|
|
|
GXX=g++
|
|
|
|
|
|
-# Part of rpm_inherit_flags. Is overridden below.
|
|
|
-rpm_append_flag ()
|
|
|
-{
|
|
|
- BuildFlags="$BuildFlags $*"
|
|
|
-}
|
|
|
-
|
|
|
-# Propagates the listed flags to rpm_append_flag if supplied by
|
|
|
-# redhat-rpm-config.
|
|
|
-BuildFlags="-O2 -g"
|
|
|
-rpm_inherit_flags ()
|
|
|
-{
|
|
|
- local reference=" $* "
|
|
|
- local flag
|
|
|
- for flag in $RPM_OPT_FLAGS $RPM_LD_FLAGS ; do
|
|
|
- if echo "$reference" | grep -q -F " $flag " ; then
|
|
|
- rpm_append_flag "$flag"
|
|
|
- fi
|
|
|
- done
|
|
|
-}
|
|
|
-
|
|
|
# Propgate select compiler flags from redhat-rpm-config. These flags
|
|
|
# are target-dependent, so we use only those which are specified in
|
|
|
# redhat-rpm-config. We keep the -m32/-m32/-m64 flags to support
|
|
|
# multilib builds.
|
|
|
-#
|
|
|
-# Note: For building alternative run-times, care is required to avoid
|
|
|
-# overriding the architecture flags which go into CC/CXX. The flags
|
|
|
-# below are passed in CFLAGS.
|
|
|
-
|
|
|
-rpm_inherit_flags \
|
|
|
- "-Wp,-D_GLIBCXX_ASSERTIONS" \
|
|
|
- "-fasynchronous-unwind-tables" \
|
|
|
- "-fstack-clash-protection" \
|
|
|
- "-fno-omit-frame-pointer" \
|
|
|
- "-funwind-tables" \
|
|
|
- "-m31" \
|
|
|
- "-m32" \
|
|
|
- "-m64" \
|
|
|
- "-march=armv8-a+lse" \
|
|
|
- "-march=armv8.1-a" \
|
|
|
- "-march=haswell" \
|
|
|
- "-march=i686" \
|
|
|
- "-march=x86-64" \
|
|
|
- "-march=x86-64-v2" \
|
|
|
- "-march=x86-64-v3" \
|
|
|
- "-march=x86-64-v4" \
|
|
|
- "-march=z13" \
|
|
|
- "-march=z14" \
|
|
|
- "-march=z15" \
|
|
|
- "-march=zEC12" \
|
|
|
- "-mbranch-protection=standard" \
|
|
|
- "-mcpu=power10" \
|
|
|
- "-mcpu=power8" \
|
|
|
- "-mcpu=power9" \
|
|
|
- "-mfpmath=sse" \
|
|
|
- "-mno-omit-leaf-frame-pointer" \
|
|
|
- "-msse2" \
|
|
|
- "-mstackrealign" \
|
|
|
- "-mtune=generic" \
|
|
|
- "-mtune=power10" \
|
|
|
- "-mtune=power8" \
|
|
|
- "-mtune=power9" \
|
|
|
- "-mtune=z13" \
|
|
|
- "-mtune=z14" \
|
|
|
- "-mtune=z15" \
|
|
|
- "-mtune=zEC12" \
|
|
|
- "-specs=/usr/lib/rpm/redhat/redhat-annobin-cc1" \
|
|
|
+
|
|
|
+%{lua:
|
|
|
+-- Split the string argument into keys of an associate array.
|
|
|
+-- The values are set to true.
|
|
|
+local function string_to_array(s)
|
|
|
+ local result = {}
|
|
|
+ for e in string.gmatch(s, "%S+") do
|
|
|
+ result[e] = true
|
|
|
+ end
|
|
|
+ return result
|
|
|
+end
|
|
|
+
|
|
|
+local inherit_flags = {}
|
|
|
+
|
|
|
+-- These flags are put into the CC and CXX arguments to configure.
|
|
|
+-- Alternate builds do not use the flags listed here, only the main build does.
|
|
|
+inherit_flags.cc_main = string_to_array [[
|
|
|
+-march=armv8-a+lse
|
|
|
+-march=armv8.1-a
|
|
|
+-march=haswell
|
|
|
+-march=i686
|
|
|
+-march=x86-64
|
|
|
+-march=x86-64-v2
|
|
|
+-march=x86-64-v3
|
|
|
+-march=x86-64-v4
|
|
|
+-march=z13
|
|
|
+-march=z14
|
|
|
+-march=z15
|
|
|
+-march=zEC12
|
|
|
+-mcpu=power10
|
|
|
+-mcpu=power8
|
|
|
+-mcpu=power9
|
|
|
+-mtune=generic
|
|
|
+-mtune=power10
|
|
|
+-mtune=power8
|
|
|
+-mtune=power9
|
|
|
+-mtune=z13
|
|
|
+-mtune=z14
|
|
|
+-mtune=z15
|
|
|
+-mtune=zEC12
|
|
|
+]]
|
|
|
+
|
|
|
+-- Like inherit_flags_cc_main, but also used for alternate builds.
|
|
|
+inherit_flags.cc = string_to_array [[
|
|
|
+-m31
|
|
|
+-m32
|
|
|
+-m64
|
|
|
+]]
|
|
|
+
|
|
|
+-- These flags are passed through CFLAGS and CXXFLAGS.
|
|
|
+inherit_flags.cflags = string_to_array [[
|
|
|
+-O2
|
|
|
+-O3
|
|
|
+-Wall
|
|
|
+-Wp,-D_GLIBCXX_ASSERTIONS
|
|
|
+-fasynchronous-unwind-tables
|
|
|
+-fno-omit-frame-pointer
|
|
|
+-fstack-clash-protection
|
|
|
+-funwind-tables
|
|
|
+-g
|
|
|
+-mbackchain
|
|
|
+-mbranch-protection=standard
|
|
|
+-mfpmath=sse
|
|
|
+-mno-omit-leaf-frame-pointer
|
|
|
+-msse2
|
|
|
+-mstackrealign
|
|
|
+-specs=/usr/lib/rpm/redhat/redhat-annobin-cc1
|
|
|
+]]
|
|
|
+
|
|
|
+-- Iterate over the build_cflags RPM variable and emit a shell
|
|
|
+-- variable that contains the inherited flags of the indicated variant.
|
|
|
+local function shell_build_flags(variant)
|
|
|
+ local result = {}
|
|
|
+ local inherit = assert(inherit_flags[variant])
|
|
|
+ for f in string.gmatch(rpm.expand("%build_cflags"), "%S+") do
|
|
|
+ if inherit[f] then
|
|
|
+ result[#result + 1] = f
|
|
|
+ end
|
|
|
+ end
|
|
|
+ print("glibc_flags_" .. variant .. "=\"" .. table.concat(result, " ")
|
|
|
+ .. "\"\n")
|
|
|
+end
|
|
|
+
|
|
|
+shell_build_flags('cc_main') -- Set $glibc_flags_cc_main.
|
|
|
+shell_build_flags('cc') -- Set $glibc_flags_cc.
|
|
|
+shell_build_flags('cflags') -- Set $glibc_flags_cflags.
|
|
|
+}
|
|
|
|
|
|
# libc_nonshared.a cannot be built with the default hardening flags
|
|
|
# because the glibc build system is incompatible with
|
|
@@ -536,24 +598,17 @@ EnableKernel="--enable-kernel=%{enablekernel}"
|
|
|
##############################################################################
|
|
|
build()
|
|
|
{
|
|
|
- local builddir=build-%{target}${1:+-$1}
|
|
|
- ${1+shift}
|
|
|
- local build_triplet=$(LANG=C gcc -v 2>&1 | grep "Target: " | cut -d " " -f 2)
|
|
|
+ local builddir=$1
|
|
|
+ shift
|
|
|
rm -rf $builddir
|
|
|
mkdir $builddir
|
|
|
pushd $builddir
|
|
|
- ../configure \
|
|
|
- CC="$GCC" CFLAGS="$BuildFlags $*" \
|
|
|
- CXX="$GXX" CXXFLAGS="$BuildFlags $*" \
|
|
|
+ ../configure "$@" \
|
|
|
--prefix=%{_prefix} \
|
|
|
--with-headers=%{_prefix}/include $EnableKernel \
|
|
|
--with-nonshared-cflags="$BuildFlagsNonshared" \
|
|
|
--enable-bind-now \
|
|
|
--build=${build_triplet} \
|
|
|
-%if %{build_compat32}
|
|
|
- --host=%{target} \
|
|
|
- --target=%{target} \
|
|
|
-%endif
|
|
|
--enable-stack-protector=strong \
|
|
|
%ifarch %{pie_arches}
|
|
|
--enable-static-pie \
|
|
@@ -563,9 +618,6 @@ build()
|
|
|
--enable-systemtap \
|
|
|
%endif
|
|
|
${core_with_options} \
|
|
|
-%ifarch x86_64 %{ix86}
|
|
|
- --enable-cet \
|
|
|
-%endif
|
|
|
%ifarch %{ix86}
|
|
|
--disable-multi-arch \
|
|
|
%endif
|
|
@@ -591,19 +643,30 @@ build()
|
|
|
popd
|
|
|
}
|
|
|
|
|
|
-%if %{build_compat32}
|
|
|
-GCC="gcc -m32"
|
|
|
-GXX="g++ -m32"
|
|
|
+%if 0
|
|
|
+# Build for the glibc32 package.
|
|
|
+build build-%{target}-32 \
|
|
|
+ CC="gcc -m32" \
|
|
|
+ CXX="g++ -m32" \
|
|
|
+ CFLAGS="${glibc_flags_cflags/-m64/-m32}" \
|
|
|
+ --host=i686-linux-gnu \
|
|
|
+#
|
|
|
%endif
|
|
|
|
|
|
-# Save the used compiler and options into the file "Gcc" for use later
|
|
|
-# by %%install.
|
|
|
-
|
|
|
-echo "$GCC" > Gcc
|
|
|
-echo "$GXX" > Gxx
|
|
|
-
|
|
|
# Default set of compiler options.
|
|
|
-build
|
|
|
+build build-%{target} \
|
|
|
+ CC="gcc $glibc_flags_cc $glibc_flags_cc_main" \
|
|
|
+ CXX="g++ $glibc_flags_cc $glibc_flags_cc_main" \
|
|
|
+ CFLAGS="$glibc_flags_cflags" \
|
|
|
+%if %{build_compat32}
|
|
|
+ --build=i686-linux-gnu \
|
|
|
+ --host=i686-linux-gnu \
|
|
|
+ --target=i686-linux-gnu \
|
|
|
+%else
|
|
|
+%ifarch x86_64
|
|
|
+ --enable-cet=permissive \
|
|
|
+%endif
|
|
|
+%endif
|
|
|
|
|
|
|
|
|
%install
|
|
@@ -617,24 +680,33 @@ rm -rf %{buildroot}
|
|
|
# Remove existing file lists.
|
|
|
find . -type f -name '*.filelist' -exec rm -rf {} \;
|
|
|
|
|
|
-# Reload compiler and build options that were used during %%build.
|
|
|
-GCC=`cat Gcc`
|
|
|
-GXX=`cat Gxx`
|
|
|
+%if 0
|
|
|
+# Install for the glibc32 package.
|
|
|
+pushd build-%{target}-32
|
|
|
+%make_build install_root=%{glibc_sysroot} install
|
|
|
+popd
|
|
|
+pushd %{glibc_sysroot}
|
|
|
+rm -rf etc sbin var usr/bin usr/lib/gconv usr/libexec usr/sbin usr/share
|
|
|
+#rm -f lib/libnss_db* lib/libnss_hesiod* lib/libnsl* usr/lib/libnsl* usr/lib/libnss*
|
|
|
+#rm usr/lib/libc_malloc_debug.so
|
|
|
+strip -g usr/lib/*.o
|
|
|
+mv lib/{libmemusage,libpcprofile}.so usr/lib/
|
|
|
+popd
|
|
|
+%endif
|
|
|
|
|
|
# Build and install:
|
|
|
-%make_build install_root=%{glibc_sysroot} install -C build-%{target}
|
|
|
-
|
|
|
-# If we are not building an auxiliary arch then install all of the supported
|
|
|
-# locales.
|
|
|
-%ifnarch %{auxarches}
|
|
|
pushd build-%{target}
|
|
|
-# Do not use a parallel make here because the hardlink optimization in
|
|
|
-# localedef is not fully reproducible when running concurrently.
|
|
|
+%make_build install_root=%{glibc_sysroot} install
|
|
|
+%if !%{build_compat32}
|
|
|
%make_build install_root=%{glibc_sysroot} \
|
|
|
install-locale-files -C ../localedata objdir=`pwd`
|
|
|
+%else
|
|
|
+ %{nil}
|
|
|
+%endif
|
|
|
popd
|
|
|
# Locale creation via install-locale-files does not group identical files
|
|
|
# via hardlinks, so we must group them ourselves.
|
|
|
+%if !%{build_compat32}
|
|
|
hardlink -c %{glibc_sysroot}/usr/lib/locale
|
|
|
%endif
|
|
|
|
|
@@ -772,7 +844,7 @@ $olddir/build-%{target}/elf/ld.so \
|
|
|
mv locale-archive{,.tmpl}
|
|
|
cp -a locale-archive{.tmpl,-ja.tmpl}
|
|
|
# Create the file lists for the language specific sub-packages:
|
|
|
-for i in eo syr *_*
|
|
|
+for i in eo syr tok *_*
|
|
|
do
|
|
|
lang=${i%%_*}
|
|
|
# if [ ! -e langpack-${lang}.filelist ]; then
|
|
@@ -843,7 +915,7 @@ touch -r inet/etc.rpc %{glibc_sysroot}/etc/rpc
|
|
|
|
|
|
%ifnarch %{auxarches}
|
|
|
pushd build-%{target}
|
|
|
-$GCC -Os -g -static -o build-locale-archive %{SOURCE1} \
|
|
|
+gcc -Os -g -static -o build-locale-archive %{SOURCE1} \
|
|
|
../build-%{target}/locale/locarchive.o \
|
|
|
../build-%{target}/locale/md5.o \
|
|
|
../build-%{target}/locale/record-status.o \
|
|
@@ -1680,6 +1752,7 @@ rm -rf "$RPM_BUILD_ROOT"
|
|
|
rm -f *.filelist*
|
|
|
|
|
|
|
|
|
+%if !%{build_compat32}
|
|
|
%ifnarch %{auxarches}
|
|
|
%files -f glibc.filelist
|
|
|
%defattr(-,root,root)
|
|
@@ -1768,20 +1841,23 @@ rm -f *.filelist*
|
|
|
%ghost %config(missingok,noreplace) /etc/sysconfig/nscd
|
|
|
%endif
|
|
|
|
|
|
-%if %{build_compat32}
|
|
|
-%files -f compat32-glibc.filelist
|
|
|
+%else
|
|
|
+%files -n compat32-glibc -f compat32-glibc.filelist
|
|
|
/%{_lib}/libnsl.so.*
|
|
|
|
|
|
-%files devel -f compat32-devel.filelist
|
|
|
+%files -n compat32-glibc-devel -f compat32-devel.filelist
|
|
|
%defattr(-,root,root)
|
|
|
%exclude %{_prefix}/share
|
|
|
|
|
|
-%files static -f compat32-static.filelist
|
|
|
+%files -n compat32-glibc-static -f compat32-static.filelist
|
|
|
%defattr(-,root,root)
|
|
|
%endif
|
|
|
|
|
|
|
|
|
%changelog
|
|
|
+* Sat Jun 08 2024 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 2.39-1
|
|
|
+- updated to 2.39.
|
|
|
+
|
|
|
* Fri Oct 06 2023 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 2.38-3
|
|
|
- updated Patch0.
|
|
|
|