diff options
author | Greg McGary <greg@mcgary.org> | 2000-07-26 18:18:43 +0000 |
---|---|---|
committer | Greg McGary <greg@mcgary.org> | 2000-07-26 18:18:43 +0000 |
commit | ac556388135e5bf0578cb24bc958870ff3a0f00c (patch) | |
tree | 4c3c8c7213d349cd412270e4346b94f85d7521e0 /Makeconfig | |
parent | e04b831ab49dfb24f1c1a70b3816bff5515cbab9 (diff) | |
download | glibc-ac556388135e5bf0578cb24bc958870ff3a0f00c.zip glibc-ac556388135e5bf0578cb24bc958870ff3a0f00c.tar.gz glibc-ac556388135e5bf0578cb24bc958870ff3a0f00c.tar.bz2 |
* Makeconfig (+link-bounded, link-libc-bounded,
link-extra-libs-bounded): New variables.
(built-program-cmd): Omit $(run-program-prefix) for static BP tests.
* Makerules (do-tests-clean, common-mostlyclean): Remove BP test files.
* Rules (tests-bp.out): New variable.
(tests): Conditionally add BP tests.
(binaries-bounded): Add variable and associated rule.
* csu/Makefile [build-bounded] (extra-objs, install-lib):
Move conditional stuff after place where condition is defined.
Diffstat (limited to 'Makeconfig')
-rw-r--r-- | Makeconfig | 19 |
1 files changed, 18 insertions, 1 deletions
@@ -400,6 +400,18 @@ ifndef +link-static $(common-objpfx)libc% $(+postinit),$^) \ $(link-extra-libs-static) $(link-libc-static) $(+postctor) $(+postinit) endif +# Command for statically linking bounded-pointer programs with the C library. +ifndef +link-bounded ++link-bounded = $(CC) -nostdlib -nostartfiles -static -fbounded-pointers -o $@ \ + $(sysdep-LDFLAGS) $(LDFLAGS) \ + $(addprefix $(csu-objpfx),b$(static-start-installed-name)) \ + $(+preinit) $(+prector) \ + $(filter-out $(addprefix $(csu-objpfx),start.o \ + $(start-installed-name))\ + $(+preinit) $(link-extra-libs-bounded) \ + $(common-objpfx)libc% $(+postinit),$^) \ + $(link-extra-libs-bounded) $(link-libc-bounded) $(+postctor) $(+postinit) +endif ifndef config-LDFLAGS ifeq (yes,$(build-shared)) config-LDFLAGS = -Wl,-dynamic-linker=$(slibdir)/$(rtld-installed-name) @@ -458,6 +470,8 @@ link-libc-static = $(gnulib) $(common-objpfx)libc_pic.a link-extra-libs-static = $(link-extra-libs) endif endif +link-libc-bounded = $(common-objpfx)libc_b.a $(gnulib) $(common-objpfx)libc_b.a +link-extra-libs-bounded = $(foreach lib,$(LDLIBS-$(@F)),$(common-objpfx)$(lib)_b.a) ifndef gnulib gnulib := -lgcc @@ -486,7 +500,10 @@ run-program-prefix = $(elf-objpfx)$(rtld-installed-name) \ else run-program-prefix = endif -built-program-cmd = $(run-program-prefix) $(built-program-file) +# Never use $(run-program-prefix) for the statically-linked %-bp test programs +built-program-cmd = $(patsubst %,$(run-program-prefix),\ + $(filter-out %-bp,$(built-program-file))) \ + $(built-program-file) ifndef LD LD := ld -X |