armhfp, i686: Revert 64-bit time_t/off_t for internal use (#2034715)

This commit is contained in:
Florian Weimer 2021-12-28 21:41:25 +01:00
parent 2762250016
commit 3987f952fb
2 changed files with 98 additions and 1 deletions

93
glibc-rh2034715.patch Normal file
View File

@ -0,0 +1,93 @@
Revert "Use LFS and 64 bit time for installed programs (BZ #15333)"
This reverts commit a6d2f948b71adcb5ea395cb04833bc645eab45e6.
Temporary measure to avoid breakage on 32-bit systems.
diff --git a/Makeconfig b/Makeconfig
index 64ef166e9af0e848..da9faeef6963bccd 100644
--- a/Makeconfig
+++ b/Makeconfig
@@ -866,13 +866,6 @@ endif
# -fno-math-errno.
+extra-math-flags = $(if $(filter libm,$(in-module)),-fno-math-errno,-fmath-errno)
-# Use 64 bit time_t support for installed programs
-installed-modules = nonlib nscd lddlibc4 libresolv ldconfig locale_programs \
- iconvprogs libnss_files libnss_compat libnss_db libnss_hesiod \
- libutil libpcprofile libSegFault
-+extra-time-flags = $(if $(filter $(installed-modules),\
- $(in-module)),-D_TIME_BITS=64 -D_FILE_OFFSET_BITS=64)
-
# We might want to compile with some stack-protection flag.
ifneq ($(stack-protector),)
+stack-protector=$(stack-protector)
@@ -970,7 +963,7 @@ libio-include = -I$(..)libio
built-modules = iconvprogs iconvdata ldconfig lddlibc4 libmemusage \
libSegFault libpcprofile librpcsvc locale-programs \
memusagestat nonlib nscd extramodules libnldbl libsupport \
- testsuite testsuite-internal
+ testsuite
in-module = $(subst -,_,$(firstword $(libof-$(basename $(@F))) \
$(libof-$(<F)) \
@@ -1010,7 +1003,7 @@ endif
override CFLAGS = -std=gnu11 -fgnu89-inline $(config-extra-cflags) \
$(filter-out %frame-pointer,$(+cflags)) $(+gccwarn-c) \
- $(+extra-math-flags) $(+extra-time-flags) \
+ $(+extra-math-flags) \
$(sysdep-CFLAGS) $(CFLAGS-$(suffix $@)) $(CFLAGS-$(<F)) \
$(CFLAGS-$(@F)) $(tls-model) \
$(foreach lib,$(libof-$(basename $(@F))) \
diff --git a/Makerules b/Makerules
index a4a3a12210e3f0d6..8db0ca129650a9ca 100644
--- a/Makerules
+++ b/Makerules
@@ -1251,22 +1251,14 @@ lib := testsuite
include $(patsubst %,$(..)libof-iterator.mk,$(cpp-srcs-left))
endif
-all-nonlib := $(strip $(others) $(others-extras))
+all-nonlib := $(strip $(tests-internal) $(test-internal-extras) \
+ $(others) $(others-extras))
ifneq (,$(all-nonlib))
cpp-srcs-left = $(all-nonlib)
lib := nonlib
include $(patsubst %,$(..)libof-iterator.mk,$(cpp-srcs-left))
endif
-# All internal tests use testsuite-internal module since for 64 bit time
-# support is set as default for MODULE_NAME=nonlib (which include some
-# installed programs).
-all-testsuite-internal := $(strip $(tests-internal) $(test-internal-extras))
-ifneq (,$(all-testsuite-internal))
-cpp-srcs-left = $(all-testsuite-internal)
-lib := testsuite-internal
-include $(patsubst %,$(..)libof-iterator.mk,$(cpp-srcs-left))
-endif
ifeq ($(build-shared),yes)
# Generate normalized lists of symbols, versions, and data sizes.
diff --git a/elf/sotruss-lib.c b/elf/sotruss-lib.c
index f69d23894bf76de0..934ae52854b4fe2d 100644
--- a/elf/sotruss-lib.c
+++ b/elf/sotruss-lib.c
@@ -89,7 +89,7 @@ init (void)
if (which_process == NULL || which_process[0] == '\0')
snprintf (endp, 13, ".%ld", (long int) pid);
- out_fd = open64 (fullname, O_RDWR | O_CREAT | O_TRUNC, 0666);
+ out_fd = open (fullname, O_RDWR | O_CREAT | O_TRUNC, 0666);
if (out_fd != -1)
print_pid = 0;
}
@@ -102,7 +102,7 @@ init (void)
program. */
if (out_fd == -1)
{
- out_fd = fcntl64 (STDERR_FILENO, F_DUPFD, 1000);
+ out_fd = fcntl (STDERR_FILENO, F_DUPFD, 1000);
if (out_fd == -1)
out_fd = dup (STDERR_FILENO);
}

View File

@ -148,7 +148,7 @@ end \
Summary: The GNU libc libraries
Name: glibc
Version: %{glibcversion}
Release: 33%{?dist}
Release: 34%{?dist}
# In general, GPLv2+ is used by programs, LGPLv2+ is used for
# libraries.
@ -221,6 +221,7 @@ Patch15: glibc-rh1070416.patch
Patch17: glibc-cs-path.patch
Patch23: glibc-python3.patch
Patch30: glibc-deprecated-selinux-makedb.patch
Patch31: glibc-rh2034715.patch
##############################################################################
# Continued list of core "glibc" package information:
@ -2153,6 +2154,9 @@ update_gconv_modules_cache ()
%files -f compat-libpthread-nonshared.filelist -n compat-libpthread-nonshared
%changelog
* Tue Dec 28 2021 Florian Weimer <fweimer@redhat.com> - 2.34.9000-34
- armhfp, i686: Revert 64-bit time_t/off_t for internal use (#2034715)
* Fri Dec 17 2021 Florian Weimer <fweimer@redhat.com> - 2.34.9000-33
- Auto-sync with upstream branch master,
commit b99b0f93ee8762fe53ff65802deb6f00700b9924: