summaryrefslogblamecommitdiff
path: root/flx/remount/files/9999-MEDIUM-Remove-strip-and-uclibc.patch
blob: 6ffe6b44370cbc8706d48f19584610a73e32ebb3 (plain) (tree)




















































































































































                                                                                                             
From caa62e8ba16c340aafd45375ec99f48261e62abf Mon Sep 17 00:00:00 2001
From: Bertrand Jacquin <bertrand@jacquin.bzh>
Date: Mon, 27 May 2013 22:36:39 +0200
Subject: [PATCH 1/2] MEDIUM: Remove strip and uclibc

---
 flx/Makefile       |  1 -
 ifenslave/Makefile |  3 ---
 include/rules.make | 16 +---------------
 lcd/Makefile       |  3 ---
 mii/Makefile       |  3 ---
 mktmp/Makefile     |  3 ---
 remount/Makefile   |  3 ---
 signfs/Makefile    |  1 -
 wd/Makefile        |  3 ---
 9 files changed, 1 insertion(+), 35 deletions(-)

diff --git a/flx/Makefile b/flx/Makefile
index 68ecb4c..408c9b5 100644
--- a/flx/Makefile
+++ b/flx/Makefile
@@ -39,7 +39,6 @@ all:	$(NAME)
 
 $(NAME): $(OBJ)
 	$(CC) -o $(NAME) $(OBJ) $(LDFLAGS) 
-#	strip -R .note -R .comment signfs
 
 clean:
 	@$(RM) -vf $(NAME) $(OBJ) $(LIBTOOLS:.c=.o) *~ core *.bak
diff --git a/ifenslave/Makefile b/ifenslave/Makefile
index 7ba3dc7..14fd640 100644
--- a/ifenslave/Makefile
+++ b/ifenslave/Makefile
@@ -13,9 +13,6 @@ ifenslave:
 
 ifenslave%: ifenslave%.o
 	$(CC) $(LDFLAGS) $(CFLAGS) -o $@ $<
-	$(STRIP) -x --strip-unneeded -R .comment -R .note $@
-	$(OBJDUMP) -h $@ | grep -q '\.data[ ]*00000000' && $(STRIP) -R .data $@ || true
-	# sstrip $@
 
 %.o:	%.c
 	$(CC) $(CFLAGS) -c -o $@ $<
diff --git a/include/rules.make b/include/rules.make
index 715db29..f373aad 100644
--- a/include/rules.make
+++ b/include/rules.make
@@ -1,30 +1,16 @@
 CC      ?= gcc
-STRIP   ?= strip
-OBJDUMP ?= objdump
-SSTRIP  ?= sstrip
-UCLIBC	?= uclibc
-
-CC_ORIG := $(CC)
-override CC := $(UCLIBC) $(CC) -Os
 
 CFLAGS=$(GCC_ARCH_SMALL) $(GCC_CPU_SMALL) $(GCC_OPT_SMALL)
 #-mpreferred-stack-boundary=2 -malign-jumps=0 -malign-loops=0 -malign-functions=0 -Os -march=i386 -mcpu=i386
-LDFLAGS=-s -Wl,--gc-sections
+LDFLAGS=-Wl,--gc-sections
 
 all:	$(OBJS)
 
 %:	%.c
 	$(CC) $(LDFLAGS) $(CFLAGS) -o $@ $<
-	$(STRIP) -x --strip-unneeded -R .comment -R .note $@
-	$(OBJDUMP) -h $@ | grep -q '\.data[ ]*00000000' && $(STRIP) -R .data $@ || true
-	$(OBJDUMP) -h $@ | grep -q '\.sbss[ ]*00000000' && $(STRIP) -R .sbss $@ || true
-	#-if [ -n "$(SSTRIP)" ]; then $(SSTRIP) $@ ; fi
 
 %-debug:	%.c
 	$(CC) $(LDFLAGS) $(CFLAGS) -DDEBUG -o $@ $<
-	$(STRIP) -x --strip-unneeded -R .comment -R .note $@
-	$(OBJDUMP) -h $@ | grep -q '\.data[ ]*00000000' && $(STRIP) -R .data $@ || true
-	$(OBJDUMP) -h $@ | grep -q '\.sbss[ ]*00000000' && $(STRIP) -R .sbss $@ || true
 
 clean:
 	@rm -f *.[ao] *~ core
diff --git a/lcd/Makefile b/lcd/Makefile
index 71d861f..4de920f 100644
--- a/lcd/Makefile
+++ b/lcd/Makefile
@@ -4,6 +4,3 @@ CFLAGS+=-fomit-frame-pointer
 
 %:	%.c
 	$(CC) $(LDFLAGS) $(CFLAGS) -o $@ $<
-	$(STRIP) -x --strip-unneeded -R .comment -R .note $@
-	$(OBJDUMP) -h $@ | grep -q '\.data[ ]*00000000' && $(STRIP) -R .data $@ || true
-	#$(SSTRIP) $@
diff --git a/mii/Makefile b/mii/Makefile
index 791f6b9..21d64d3 100644
--- a/mii/Makefile
+++ b/mii/Makefile
@@ -7,9 +7,6 @@ all:	$(OBJS)
 
 %-diag:	%-diag.o libmii.o
 	$(CC) $(LDFLAGS) $(CFLAGS) -o $@ $^
-	$(STRIP) -x --strip-unneeded -R .comment -R .note $@
-	$(OBJDUMP) -h $@ | grep -q '\.data[ ]*00000000' && $(STRIP) -R .data $@ || true
-	#$(SSTRIP) $@
 
 %.o:	%.c
 	$(CC) -DLIBMII $(CFLAGS) -c -o $@ $<
diff --git a/mktmp/Makefile b/mktmp/Makefile
index 2188b91..ef4b083 100644
--- a/mktmp/Makefile
+++ b/mktmp/Makefile
@@ -4,6 +4,3 @@ include ../include/rules.make
 
 %:	%.c
 	$(CC) $(LDFLAGS) $(CFLAGS) -o $@ $<
-	$(STRIP) -x --strip-unneeded -R .comment -R .note $@
-	$(OBJDUMP) -h $@ | grep -q '\.data[ ]*00000000' && $(STRIP) -R .data $@ || true
-	#$(SSTRIP) $@
diff --git a/remount/Makefile b/remount/Makefile
index 5aa2491..54a79ad 100644
--- a/remount/Makefile
+++ b/remount/Makefile
@@ -7,6 +7,3 @@ remountw : remountr
 
 %:	%.c
 	$(CC) $(LDFLAGS) $(CFLAGS) -o $@ $<
-	$(STRIP) -x --strip-unneeded -R .comment -R .note $@
-	$(OBJDUMP) -h $@ | grep -q '\.data[ ]*00000000' && $(STRIP) -R .data $@ || true
-	-if [ -n "$(SSTRIP)" ]; then $(SSTRIP) $@ ; fi
diff --git a/signfs/Makefile b/signfs/Makefile
index f50b301..d4214c6 100644
--- a/signfs/Makefile
+++ b/signfs/Makefile
@@ -35,7 +35,6 @@ LIBTOOLS=md5.c libtools.c others.c
 
 $(NAME): libtools.a $(OBJ)
 	$(CC) -o $(NAME) $(OBJ) $(LDFLAGS) 
-	#strip -R .note -R .comment signfs
 
 libtools.a: $(LIBTOOLS:.c=.o)
 	$(AR) -r libtools.a $(LIBTOOLS:.c=.o)
diff --git a/wd/Makefile b/wd/Makefile
index 6f1fa72..eaf857a 100644
--- a/wd/Makefile
+++ b/wd/Makefile
@@ -4,6 +4,3 @@ CFLAGS+=-fomit-frame-pointer
 
 %:	%.c
 	$(CC) $(LDFLAGS) $(CFLAGS) -W -Wall -U_FORTIFY_SOURCE -o $@ $<
-	$(STRIP) -x --strip-unneeded -R .comment -R .note $@
-	$(OBJDUMP) -h $@ | grep -q '\.data[ ]*00000000' && $(STRIP) -R .data $@ || true
-	-if [ -n "$(SSTRIP)" ]; then $(SSTRIP) $@ ; fi