about summary refs log tree commit diff
path: root/Rules
diff options
context:
space:
mode:
Diffstat (limited to 'Rules')
-rw-r--r--Rules13
1 files changed, 12 insertions, 1 deletions
diff --git a/Rules b/Rules
index f3d8bdd746..9881848646 100644
--- a/Rules
+++ b/Rules
@@ -88,7 +88,10 @@ endif
 ifeq ($(cross-compiling),yes)
 tests: $(addprefix $(objpfx),$(tests) $(test-srcs))
 else
-tests: $(tests:%=$(objpfx)%.out)
+ifeq ($(build-bounded),yes)
+tests-bp.out = $(tests:%=$(objpfx)%-bp.out)
+endif
+tests: $(tests:%=$(objpfx)%.out) $(tests-bp.out)
 endif
 
 ifeq ($(build-programs),yes)
@@ -115,6 +118,14 @@ $(addprefix $(objpfx),$(binaries-static)): %: %.o \
 	$(+link-static)
 endif
 
+ifeq ($(build-bounded),yes)
+binaries-bounded = $(addsuffix -bp,$(tests) $(test-srcs))
+$(addprefix $(objpfx),$(binaries-bounded)): %-bp: %.ob \
+  $(sort $(filter $(common-objpfx)lib%,$(link-libc-bounded))) \
+  $(addprefix $(csu-objpfx),start.ob) $(+preinit) $(+postinit)
+	$(+link-bounded)
+endif
+
 ifneq "$(strip $(tests) $(test-srcs))" ""
 # These are the implicit rules for making test outputs
 # from the test programs and whatever input files are present.