summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makeconfig11
-rw-r--r--Makerules12
-rw-r--r--NEWS1
-rw-r--r--elf/sotruss-lib.c4
4 files changed, 22 insertions, 6 deletions
diff --git a/Makeconfig b/Makeconfig
index 92affd81b0..0a17cc82c8 100644
--- a/Makeconfig
+++ b/Makeconfig
@@ -876,6 +876,13 @@ 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)
@@ -980,7 +987,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 testsuite-internal
in-module = $(subst -,_,$(firstword $(libof-$(basename $(@F))) \
$(libof-$(<F)) \
@@ -1020,7 +1027,7 @@ endif
override CFLAGS = -std=gnu11 -fgnu89-inline $(config-extra-cflags) \
$(filter-out %frame-pointer,$(+cflags)) $(+gccwarn-c) \
- $(+extra-math-flags) \
+ $(+extra-math-flags) $(+extra-time-flags) \
$(sysdep-CFLAGS) $(CFLAGS-$(suffix $@)) $(CFLAGS-$(<F)) \
$(CFLAGS-$(@F)) $(tls-model) \
$(foreach lib,$(libof-$(basename $(@F))) \
diff --git a/Makerules b/Makerules
index e5916f29fa..689842ba56 100644
--- a/Makerules
+++ b/Makerules
@@ -1266,14 +1266,22 @@ lib := testsuite
include $(patsubst %,$(..)libof-iterator.mk,$(cpp-srcs-left))
endif
-all-nonlib := $(strip $(tests-internal) $(test-internal-extras) \
- $(others) $(others-extras))
+all-nonlib := $(strip $(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/NEWS b/NEWS
index b189735031..2765efc5a2 100644
--- a/NEWS
+++ b/NEWS
@@ -51,6 +51,7 @@ The following bugs are resolved with this release:
[11053] regex: Wrong results with backreferences
[12154] Do not fail DNS resolution for CNAMEs which are not host names
[12889] nptl: Fix race between pthread_kill and thread exit
+ [15333] libc: Use 64-bit stat functions in installed programs
[15533] dynamic-link: LD_AUDIT introduces an avoidable performance
degradation
[19193] nptl: pthread_kill, pthread_cancel should not fail after exit
diff --git a/elf/sotruss-lib.c b/elf/sotruss-lib.c
index e4ebc8dbc6..45dc6d5ffe 100644
--- a/elf/sotruss-lib.c
+++ b/elf/sotruss-lib.c
@@ -91,7 +91,7 @@ init (void)
if (which_process == NULL || which_process[0] == '\0')
snprintf (endp, 13, ".%ld", (long int) pid);
- out_fd = open (fullname, O_RDWR | O_CREAT | O_TRUNC, 0666);
+ out_fd = open64 (fullname, O_RDWR | O_CREAT | O_TRUNC, 0666);
if (out_fd != -1)
print_pid = 0;
}
@@ -104,7 +104,7 @@ init (void)
program. */
if (out_fd == -1)
{
- out_fd = fcntl (STDERR_FILENO, F_DUPFD, 1000);
+ out_fd = fcntl64 (STDERR_FILENO, F_DUPFD, 1000);
if (out_fd == -1)
out_fd = dup (STDERR_FILENO);
}