aboutsummaryrefslogtreecommitdiff
path: root/Makeconfig
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2024-04-30 09:57:12 -0700
committerH.J. Lu <hjl.tools@gmail.com>2024-05-06 07:49:40 -0700
commit5f245f3bfbe61b2182964dafb94907e38284b806 (patch)
treea659a989f529ef0cfa2430b051bece7406d1889b /Makeconfig
parent23f0d81608d0ca6379894ef81670cf30af7fd081 (diff)
downloadglibc-5f245f3bfbe61b2182964dafb94907e38284b806.zip
glibc-5f245f3bfbe61b2182964dafb94907e38284b806.tar.gz
glibc-5f245f3bfbe61b2182964dafb94907e38284b806.tar.bz2
Add crt1-2.0.o for glibc 2.0 compatibility tests
Starting from glibc 2.1, crt1.o contains _IO_stdin_used which is checked by _IO_check_libio to provide binary compatibility for glibc 2.0. Add crt1-2.0.o for tests against glibc 2.0. Define tests-2.0 for glibc 2.0 compatibility tests. Add and update glibc 2.0 compatibility tests for stderr, matherr and pthread_kill. Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Diffstat (limited to 'Makeconfig')
-rw-r--r--Makeconfig21
1 files changed, 21 insertions, 0 deletions
diff --git a/Makeconfig b/Makeconfig
index e583765..61ff1d0 100644
--- a/Makeconfig
+++ b/Makeconfig
@@ -360,6 +360,8 @@ whole-archive = -Wl,--whole-archive
# Installed name of the startup code.
# The ELF convention is that the startfile is called crt1.o
start-installed-name = crt1.o
+# Similar to crt1.o, but without _IO_stdin_used.
+start-name-2.0 = crt1-2.0.o
# On systems that do not need a special startfile for statically linked
# binaries, simply set it to the normal name.
ifndef static-start-installed-name
@@ -537,6 +539,25 @@ else # build-static
endif # build-shared
endif # +link
+# Command for linking test programs with crt1.o from glibc 2.0.
++link-2.0-before-inputs = -nostdlib -nostartfiles $(no-pie-ldflag) \
+ $(sysdep-LDFLAGS) $(LDFLAGS) $(LDFLAGS-$(@F)) \
+ $(relro-LDFLAGS) $(hashstyle-LDFLAGS) \
+ $(firstword $(CRT-$(@F)) $(csu-objpfx)$(start-name-2.0)) \
+ $(+preinit) $(+prector)
++link-2.0-before-libc = -o $@ $(+link-2.0-before-inputs) \
+ $(filter-out $(addprefix $(csu-objpfx),start.o \
+ $(start-name-2.0))\
+ $(+preinit) $(link-extra-libs) \
+ $(common-objpfx)libc% $(+postinit),$^) \
+ $(link-extra-libs)
++link-after-libc = $(+postctor) $(+postinit)
+define +link-2.0-tests
+$(CC) $(+link-2.0-before-libc) $(rtld-tests-LDFLAGS) $(link-libc-tests) \
+ $(+link-after-libc)
+$(call after-link,$@)
+endef
+
# The pretty printer test programs need to be compiled without optimizations
# so they won't confuse gdb. We could use either the 'GCC optimize' pragma
# or the 'optimize' function attribute to achieve this; however, at least on