summaryrefslogtreecommitdiff
path: root/Makeconfig
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2004-01-13 08:17:00 +0000
committerUlrich Drepper <drepper@redhat.com>2004-01-13 08:17:00 +0000
commit1c563add69af03557ba47a4a13790d821133478c (patch)
tree4ddc09af1ce6674145caa11785db7e5b83e868d3 /Makeconfig
parenta5ee0b9e1219191b3f321542138f0c21102df6f1 (diff)
downloadglibc-1c563add69af03557ba47a4a13790d821133478c.tar.gz
Define relro-LDFLAGS if have-z-relro==yes. Add it to LDFLAGS.so and LDFLAGS-rtld. (+link): Add relro-LDFLAGS.
Diffstat (limited to 'Makeconfig')
-rw-r--r--Makeconfig10
1 files changed, 8 insertions, 2 deletions
diff --git a/Makeconfig b/Makeconfig
index 03352ffc3f..e0b3433cdc 100644
--- a/Makeconfig
+++ b/Makeconfig
@@ -1,4 +1,4 @@
-# Copyright (C) 1991-2000,01,02, 03 Free Software Foundation, Inc.
+# Copyright (C) 1991-2003, 2004 Free Software Foundation, Inc.
# This file is part of the GNU C Library.
# The GNU C Library is free software; you can redistribute it and/or
@@ -389,11 +389,17 @@ LDFLAGS.so += $(combreloc-LDFLAGS)
LDFLAGS-rtld += $(combreloc-LDFLAGS)
endif
+ifeq (yes,$(have-z-relro))
+relro-LDFLAGS = -Wl,-z,relro
+LDFLAGS.so += $(relro-LDFLAGS)
+LDFLAGS-rtld += $(relro-LDFLAGS)
+endif
+
# Command for linking programs with the C library.
ifndef +link
+link = $(CC) -nostdlib -nostartfiles -o $@ \
$(sysdep-LDFLAGS) $(config-LDFLAGS) $(LDFLAGS) $(LDFLAGS-$(@F)) \
- $(combreloc-LDFLAGS) \
+ $(combreloc-LDFLAGS) $(relro-LDFLAGS) \
$(addprefix $(csu-objpfx),$(start-installed-name)) \
$(+preinit) $(+prector) \
$(filter-out $(addprefix $(csu-objpfx),start.o \