summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Rules.mak1
-rw-r--r--libc/sysdeps/linux/common/Makefile2
-rw-r--r--test/assert/Makefile7
-rw-r--r--test/ctype/Makefile7
-rw-r--r--test/pwd_grp/Makefile9
-rw-r--r--test/signal/Makefile7
-rw-r--r--test/silly/Makefile9
-rw-r--r--test/stdlib/Makefile17
-rw-r--r--test/string/Makefile9
-rw-r--r--test/unistd/Makefile7
10 files changed, 26 insertions, 49 deletions
diff --git a/Rules.mak b/Rules.mak
index a4e1496c8..600ce5ea8 100644
--- a/Rules.mak
+++ b/Rules.mak
@@ -41,6 +41,7 @@ CFLAGS=$(ARCH_CFLAGS) $(CCFLAGS) $(DEFS)
ifeq ($(DODEBUG),true)
CFLAGS += -Wall -g
LDFLAGS = -nostdlib -Wl,-warn-common
+ STRIPTOOL = /bin/true -Since_we_are_debugging
else
CFLAGS += -Wall #-fomit-frame-pointer
LDFLAGS = -s -nostdlib -Wl,-warn-common
diff --git a/libc/sysdeps/linux/common/Makefile b/libc/sysdeps/linux/common/Makefile
index b658df65f..03a4603e9 100644
--- a/libc/sysdeps/linux/common/Makefile
+++ b/libc/sysdeps/linux/common/Makefile
@@ -51,7 +51,7 @@ $(MOBJ): $(MSRC)
$(COBJS):
$(CC) $(CFLAGS) -g $< -c $*.c -o $*.o
- #$(STRIPTOOL) -x -R .note -R .comment $*.o
+ $(STRIPTOOL) -x -R .note -R .comment $*.o
clean:
rm -f *.[oa] *~ core
diff --git a/test/assert/Makefile b/test/assert/Makefile
index 807a01a7b..54553ce00 100644
--- a/test/assert/Makefile
+++ b/test/assert/Makefile
@@ -13,11 +13,6 @@ EXTRA_LIBS=$(TOPDIR)libc.a -lgcc
YCFLAGS = -Wall -Os -fomit-frame-pointer
YLDFLAGS = -s --static
-# Allow alternative stripping tools to be used...
-ifndef $(STRIPTOOL)
- STRIPTOOL = strip
-endif
-STRIP = $(STRIPTOOL) --remove-section=.note --remove-section=.comment $@
TARGETS=assert assert_glibc
@@ -30,6 +25,7 @@ assert: assert.c Makefile $(TOPDIR)libc.a
-@ echo " "
$(CC) $(XCFLAGS) -c $< -o $@.o
$(CC) $(XLDFLAGS) $@.o -o $@ $(EXTRA_LIBS)
+ $(STRIPTOOL) -x -R .note -R .comment $@
-./$@
-@ echo "This was supposed to core dump on test #3"
-@rm -f core
@@ -42,6 +38,7 @@ assert_glibc: assert.c Makefile $(TOPDIR)libc.a
-@ echo " "
$(CC) $(YCFLAGS) -c $< -o $@.o
$(CC) $(YLDFLAGS) --static $@.o -o $@
+ $(STRIPTOOL) -x -R .note -R .comment $@
-./$@
-@ echo "This was supposed to core dump on test #3"
-@rm -f core
diff --git a/test/ctype/Makefile b/test/ctype/Makefile
index f8992f4fe..3ed4cb411 100644
--- a/test/ctype/Makefile
+++ b/test/ctype/Makefile
@@ -13,11 +13,6 @@ EXTRA_LIBS=$(TOPDIR)libc.a -lgcc
YCFLAGS = -Wall -Os -fomit-frame-pointer
YLDFLAGS = -s --static
-# Allow alternative stripping tools to be used...
-ifndef $(STRIPTOOL)
- STRIPTOOL = strip
-endif
-STRIP = $(STRIPTOOL) --remove-section=.note --remove-section=.comment $@
TARGETS=ctype ctype_glibc
@@ -30,6 +25,7 @@ ctype: ctype.c ../testsuite.h Makefile $(TOPDIR)libc.a
-@ echo " "
$(CC) $(XCFLAGS) -c $< -o $@.o
$(CC) $(XLDFLAGS) $@.o -o $@ $(EXTRA_LIBS)
+ $(STRIPTOOL) -x -R .note -R .comment $@
./$@
-@ echo " "
@@ -40,6 +36,7 @@ ctype_glibc: ctype.c ../testsuite.h Makefile $(TOPDIR)libc.a
-@ echo " "
$(CC) $(YCFLAGS) -c $< -o $@.o
$(CC) $(YLDFLAGS) --static $@.o -o $@
+ $(STRIPTOOL) -x -R .note -R .comment $@
-./$@
-@ echo " "
diff --git a/test/pwd_grp/Makefile b/test/pwd_grp/Makefile
index 0ae2e233d..212765de4 100644
--- a/test/pwd_grp/Makefile
+++ b/test/pwd_grp/Makefile
@@ -13,11 +13,6 @@ EXTRA_LIBS=$(TOPDIR)libc.a -lgcc
YCFLAGS = -Wall -Os -fomit-frame-pointer
YLDFLAGS = -s --static
-# Allow alternative stripping tools to be used...
-ifndef $(STRIPTOOL)
- STRIPTOOL = strip
-endif
-STRIP = $(STRIPTOOL) --remove-section=.note --remove-section=.comment $@
TARGETS=test_pwd test_pwd_glibc
TARGETS+=test_grp test_grp_glibc
@@ -32,6 +27,7 @@ test_pwd: test_pwd.c Makefile $(TOPDIR)libc.a
-@ echo " "
$(CC) $(XCFLAGS) -c $< -o $@.o
$(CC) $(XLDFLAGS) $@.o -o $@ $(EXTRA_LIBS)
+ $(STRIPTOOL) -x -R .note -R .comment $@
-./$@ 2>&1 >test_pwd.out
-@ echo " "
@@ -42,6 +38,7 @@ test_pwd_glibc: test_pwd.c Makefile $(TOPDIR)libc.a
-@ echo " "
$(CC) $(YCFLAGS) -c $< -o $@.o
$(CC) $(YLDFLAGS) --static $@.o -o $@
+ $(STRIPTOOL) -x -R .note -R .comment $@
-./$@ 2>&1 >test_pwd_glibc.out
-@ echo " "
@@ -52,6 +49,7 @@ test_grp: test_grp.c Makefile $(TOPDIR)libc.a
-@ echo " "
$(CC) $(XCFLAGS) -c $< -o $@.o
$(CC) $(XLDFLAGS) $@.o -o $@ $(EXTRA_LIBS)
+ $(STRIPTOOL) -x -R .note -R .comment $@
-./$@ 2>&1 >test_grp.out
-@ echo " "
@@ -62,6 +60,7 @@ test_grp_glibc: test_grp.c Makefile $(TOPDIR)libc.a
-@ echo " "
$(CC) $(YCFLAGS) -c $< -o $@.o
$(CC) $(YLDFLAGS) --static $@.o -o $@
+ $(STRIPTOOL) -x -R .note -R .comment $@
-./$@ 2>&1 >test_grp_glibc.out
-@ echo " "
diff --git a/test/signal/Makefile b/test/signal/Makefile
index 649a7dffd..7a7bc1dbb 100644
--- a/test/signal/Makefile
+++ b/test/signal/Makefile
@@ -13,11 +13,6 @@ EXTRA_LIBS=$(TOPDIR)libc.a -lgcc
YCFLAGS = -Wall -Os -fomit-frame-pointer
YLDFLAGS = -s --static
-# Allow alternative stripping tools to be used...
-ifndef $(STRIPTOOL)
- STRIPTOOL = strip
-endif
-STRIP = $(STRIPTOOL) --remove-section=.note --remove-section=.comment $@
TARGETS=signal signal_glibc
@@ -30,6 +25,7 @@ signal: signal.c Makefile $(TOPDIR)libc.a
-@ echo " "
$(CC) $(XCFLAGS) -c $< -o $@.o
$(CC) $(XLDFLAGS) $@.o -o $@ $(EXTRA_LIBS)
+ $(STRIPTOOL) -x -R .note -R .comment $@
-./$@
-@ echo " "
@@ -40,6 +36,7 @@ signal_glibc: signal.c Makefile $(TOPDIR)libc.a
-@ echo " "
$(CC) $(YCFLAGS) -c $< -o $@.o
$(CC) $(YLDFLAGS) --static $@.o -o $@
+ $(STRIPTOOL) -x -R .note -R .comment $@
-./$@
-@ echo " "
diff --git a/test/silly/Makefile b/test/silly/Makefile
index 426882043..2a14ed16b 100644
--- a/test/silly/Makefile
+++ b/test/silly/Makefile
@@ -13,11 +13,6 @@ EXTRA_LIBS=$(TOPDIR)libc.a -lgcc
YCFLAGS = -Wall -Os -fomit-frame-pointer
YLDFLAGS = -s --static
-# Allow alternative stripping tools to be used...
-ifndef $(STRIPTOOL)
- STRIPTOOL = strip
-endif
-STRIP = $(STRIPTOOL) --remove-section=.note --remove-section=.comment $@
TARGETS=hello_source hello hello_glibc
@@ -38,7 +33,7 @@ hello: hello.c Makefile $(TOPDIR)libc.a
-@ echo " "
$(CC) $(XCFLAGS) -c $< -o $@.o
$(CC) $(XLDFLAGS) $@.o -o $@ $(EXTRA_LIBS)
- $(STRIP)
+ $(STRIPTOOL) -x -R .note -R .comment $@
-ldd $@
ls $(LSFLAGS) $@
-./$@
@@ -51,7 +46,7 @@ hello_glibc: hello.c Makefile $(TOPDIR)libc.a
-@ echo " "
$(CC) $(YCFLAGS) -c $< -o $@.o
$(CC) $(YLDFLAGS) --static $@.o -o $@
- $(STRIP)
+ $(STRIPTOOL) -x -R .note -R .comment $@
-ldd $@
ls $(LSFLAGS) $@
-./$@
diff --git a/test/stdlib/Makefile b/test/stdlib/Makefile
index 424b0ba88..86c9e88df 100644
--- a/test/stdlib/Makefile
+++ b/test/stdlib/Makefile
@@ -13,11 +13,6 @@ EXTRA_LIBS=$(TOPDIR)libc.a -lgcc
YCFLAGS = -Wall -Os -fomit-frame-pointer
YLDFLAGS = -s --static
-# Allow alternative stripping tools to be used...
-ifndef $(STRIPTOOL)
- STRIPTOOL = strip
-endif
-STRIP = $(STRIPTOOL) --remove-section=.note --remove-section=.comment $@
TARGETS=testmalloc testmalloc_glibc
TARGETS=mallocbug mallocbug_glibc
@@ -39,7 +34,7 @@ testmalloc: testmalloc.c Makefile $(TOPDIR)libc.a
-@ echo " "
$(CC) $(XCFLAGS) -c $< -o $@.o
$(CC) $(XLDFLAGS) $@.o -o $@ $(EXTRA_LIBS)
- $(STRIP)
+ $(STRIPTOOL) -x -R .note -R .comment $@
-ldd $@
ls $(LSFLAGS) $@
-./$@
@@ -52,7 +47,7 @@ testmalloc_glibc: testmalloc.c Makefile $(TOPDIR)libc.a
-@ echo " "
$(CC) $(YCFLAGS) -c $< -o $@.o
$(CC) $(YLDFLAGS) --static $@.o -o $@
- $(STRIP)
+ $(STRIPTOOL) -x -R .note -R .comment $@
-ldd $@
ls $(LSFLAGS) $@
-./$@
@@ -65,7 +60,7 @@ mallocbug: mallocbug.c Makefile $(TOPDIR)libc.a
-@ echo " "
$(CC) $(XCFLAGS) -c $< -o $@.o
$(CC) $(XLDFLAGS) $@.o -o $@ $(EXTRA_LIBS)
- $(STRIP)
+ $(STRIPTOOL) -x -R .note -R .comment $@
-ldd $@
ls $(LSFLAGS) $@
-./$@
@@ -78,7 +73,7 @@ mallocbug_glibc: mallocbug.c Makefile $(TOPDIR)libc.a
-@ echo " "
$(CC) $(YCFLAGS) -c $< -o $@.o
$(CC) $(YLDFLAGS) --static $@.o -o $@
- $(STRIP)
+ $(STRIPTOOL) -x -R .note -R .comment $@
-ldd $@
ls $(LSFLAGS) $@
-./$@
@@ -98,7 +93,7 @@ teststrtol: teststrtol.c Makefile $(TOPDIR)libc.a
-@ echo " "
$(CC) $(XCFLAGS) -c $< -o $@.o
$(CC) $(XLDFLAGS) $@.o -o $@ $(EXTRA_LIBS)
- $(STRIP)
+ $(STRIPTOOL) -x -R .note -R .comment $@
-ldd $@
ls -sh $@
-./$@ > $@.out
@@ -111,7 +106,7 @@ teststrtol_glibc: teststrtol.c Makefile $(TOPDIR)libc.a
-@ echo " "
$(CC) $(YCFLAGS) -c $< -o $@.o
$(CC) $(YLDFLAGS) --static $@.o -o $@
- $(STRIP)
+ $(STRIPTOOL) -x -R .note -R .comment $@
-ldd $@
ls -sh $@
-./$@ > $@.out
diff --git a/test/string/Makefile b/test/string/Makefile
index bf847f66e..2bf5b83c2 100644
--- a/test/string/Makefile
+++ b/test/string/Makefile
@@ -16,11 +16,6 @@ EXTRA_LIBS=$(TOPDIR)libc.a -lgcc
YCFLAGS = -Wall -Os -fomit-frame-pointer
YLDFLAGS = -s --static
-# Allow alternative stripping tools to be used...
-ifndef $(STRIPTOOL)
- STRIPTOOL = strip
-endif
-STRIP = $(STRIPTOOL) --remove-section=.note --remove-section=.comment $@
TARGETS=string string_glibc
TARGETS+=testcopy testcopy_glibc
@@ -34,6 +29,7 @@ string: string.c Makefile $(TOPDIR)libc.a
-@ echo " "
$(CC) $(XCFLAGS) -c $< -o $@.o
$(CC) $(XLDFLAGS) $@.o -o $@ $(EXTRA_LIBS)
+ $(STRIPTOOL) -x -R .note -R .comment $@
-./$@
-@ echo " "
@@ -44,6 +40,7 @@ string_glibc: string.c Makefile $(TOPDIR)libc.a
-@ echo " "
$(CC) $(YCFLAGS) -c $< -o $@.o
$(CC) $(YLDFLAGS) --static $@.o -o $@
+ $(STRIPTOOL) -x -R .note -R .comment $@
-./$@
-@ echo " "
@@ -54,6 +51,7 @@ testcopy: testcopy.c Makefile $(TOPDIR)libc.a
-@ echo " "
$(CC) $(XCFLAGS) -c $< -o $@.o
$(CC) $(XLDFLAGS) $@.o -o $@ $(EXTRA_LIBS)
+ $(STRIPTOOL) -x -R .note -R .comment $@
-./$@ > testcopy.out
-@ echo " "
@@ -64,6 +62,7 @@ testcopy_glibc: testcopy.c Makefile $(TOPDIR)libc.a
-@ echo " "
$(CC) $(YCFLAGS) -c $< -o $@.o
$(CC) $(YLDFLAGS) --static $@.o -o $@
+ $(STRIPTOOL) -x -R .note -R .comment $@
-./$@ > testcopy.gnu.out
-@ echo " "
diff --git a/test/unistd/Makefile b/test/unistd/Makefile
index 27551a873..c922bc676 100644
--- a/test/unistd/Makefile
+++ b/test/unistd/Makefile
@@ -13,11 +13,6 @@ EXTRA_LIBS=$(TOPDIR)libc.a -lgcc
YCFLAGS = -Wall -Os -fomit-frame-pointer
YLDFLAGS = -s --static
-# Allow alternative stripping tools to be used...
-ifndef $(STRIPTOOL)
- STRIPTOOL = strip
-endif
-STRIP = $(STRIPTOOL) --remove-section=.note --remove-section=.comment $@
TARGETS=fork fork_glibc
@@ -30,6 +25,7 @@ fork: fork.c ../testsuite.h Makefile $(TOPDIR)libc.a
-@ echo " "
$(CC) $(XCFLAGS) -c $< -o $@.o
$(CC) $(XLDFLAGS) $@.o -o $@ $(EXTRA_LIBS)
+ $(STRIPTOOL) -x -R .note -R .comment $@
./$@
-@ echo " "
@@ -40,6 +36,7 @@ fork_glibc: fork.c ../testsuite.h Makefile $(TOPDIR)libc.a
-@ echo " "
$(CC) $(YCFLAGS) -c $< -o $@.o
$(CC) $(YLDFLAGS) --static $@.o -o $@
+ $(STRIPTOOL) -x -R .note -R .comment $@
-./$@
-@ echo " "