Skip to contentSkip to conversation

svn commit: trunk/buildroot/toolchain/gcc

Buildroot ulf at uclibc.org 3 participants 4 messages Jul 7, 2007

lore
Share & tools
lore
#0 lore raw

Author: ulf
Date: 2007-07-07 00:34:37 -0700 (Sat, 07 Jul 2007) New Revision: 19014

Log:
Avoid stripping a script file

Modified:
trunk/buildroot/toolchain/gcc/gcc-uclibc-4.x.mk

Changeset:
Modified: trunk/buildroot/toolchain/gcc/gcc-uclibc-4.x.mk
===================================================================

buildroot/toolchain/gcc/gcc-uclibc-4.x.mk +9 -1
@@ -249,7 +249,15 @@
 	fi
 	# Strip the host binaries
 ifeq ($(GCC_STRIP_HOST_BINARIES),true)
-	-strip --strip-all -R .note -R .comment $(STAGING_DIR)/usr/bin/*
+	if [ -e $(STAGING_DIR)/usr/bin/*-gccbug ] ; then \
+		mkdir -p "$(STAGING_DIR)/tmp" ; \
+		mv $(STAGING_DIR)/usr/bin/*-gccbug  $(STAGING_DIR)/tmp ; \
+		-strip --strip-all -R .note -R .comment $(STAGING_DIR)/usr/bin/* ; \
+		mv $(STAGING_DIR)/tmp/*-gccbug $(STAGING_DIR)/usr/bin ; \
+		rmdir "$(STAGING_DIR)/tmp" ; \
+	else \
+		-strip --strip-all -R .note -R .comment $(STAGING_DIR)/usr/bin/* ; \
+	fi
 endif
 	# Make sure we have 'cc'.
 	if [ ! -e $(STAGING_DIR)/usr/bin/$(REAL_GNU_TARGET_NAME)-cc ] ; then \
#1 lore raw
Quoted 17 lines · ulf at uclibc.org

Author: ulf
Date: 2007-07-07 00:34:37 -0700 (Sat, 07 Jul 2007) New Revision: 19014

Log:
Avoid stripping a script file

Modified:
trunk/buildroot/toolchain/gcc/gcc-uclibc-4.x.mk

Changeset:
Modified: trunk/buildroot/toolchain/gcc/gcc-uclibc-4.x.mk
===================================================================

buildroot/toolchain/gcc/gcc-uclibc-4.x.mk line 252

Quoted 5 lines
buildroot/toolchain/gcc/gcc-uclibc-4.x.mk +1 -1
@@ -249,7 +249,15 @@
 	fi
 	# Strip the host binaries
 ifeq ($(GCC_STRIP_HOST_BINARIES),true)
-	-strip --strip-all -R .note -R .comment $(STAGING_DIR)/usr/bin/*
+	if [ -e $(STAGING_DIR)/usr/bin/*-gccbug ] ; then \

testing for existance doesn't work on all solaris test(1). What you really want is perhaps something like ifneq $((..$(wildcard..)),)

buildroot/toolchain/gcc/gcc-uclibc-4.x.mk line 253

Quoted 1 line
buildroot/toolchain/gcc/gcc-uclibc-4.x.mk +1 -0
+		mkdir -p "$(STAGING_DIR)/tmp" ; \

If by now $(STAGING_DIR) could not be created, then something is fundamentally wrong (the -p is superfluous).

Quoted 7 lines
buildroot/toolchain/gcc/gcc-uclibc-4.x.mk +7 -0
+		mv $(STAGING_DIR)/usr/bin/*-gccbug  $(STAGING_DIR)/tmp ; \
+		-strip --strip-all -R .note -R .comment $(STAGING_DIR)/usr/bin/* ; \
+		mv $(STAGING_DIR)/tmp/*-gccbug $(STAGING_DIR)/usr/bin ; \
+		rmdir "$(STAGING_DIR)/tmp" ; \
+	else \
+		-strip --strip-all -R .note -R .comment $(STAGING_DIR)/usr/bin/* ; \
+	fi
#2 lore raw
Quoted 6 lines
Quoted 4 lines

# Strip the host binaries
ifeq ($(GCC_STRIP_HOST_BINARIES),true)
- -strip --strip-all -R .note -R .comment $(STAGING_DIR)/usr/bin/*
+ if [ -e $(STAGING_DIR)/usr/bin/*-gccbug ] ; then \

testing for existance doesn't work on all solaris test(1).

What will happen on a Solaris host then if this is found? Will [ -a <file> ] work?

Quoted 2 lines

What you really want is perhaps something like ifneq $((..$(wildcard..)),)

I believe ifneq is read in stage 1 of the Makefile, so this wont work either, right? The files will only exist in mid build.

Maybe we should not create "arm-linux-uclibc-gccbug" to begin with... If we rename "arm-linux-uclibc-gccbug" to "arm-linux-gccbug" right after the make and then strip

* "$(REAL_GNU_TARGET_NAME)-*"
* "faked"

we should be OK.

Quoted 5 lines
Quoted 1 line

+ mkdir -p "$(STAGING_DIR)/tmp" ; \

If by now $(STAGING_DIR) could not be created, then something is fundamentally wrong (the -p is superfluous).

$(STAGING_DIR) is OK, but "$(STAGING_DIR)/tmp" could exist if someone adds this in the future and does not remove it.

Best Regards
Ulf Samuelsson

#3 lore raw
Quoted 10 lines · Ulf Samuelsson
Quoted 6 lines
Quoted 4 lines

# Strip the host binaries
ifeq ($(GCC_STRIP_HOST_BINARIES),true)
- -strip --strip-all -R .note -R .comment $(STAGING_DIR)/usr/bin/*
+ if [ -e $(STAGING_DIR)/usr/bin/*-gccbug ] ; then \

testing for existance doesn't work on all solaris test(1).

What will happen on a Solaris host then if this is found? Will [ -a <file> ] work?

KISS.
-f FILE
-x FILE

This place doesn't need anything but checking by one of the above.

Quoted 4 lines
Quoted 2 lines

What you really want is perhaps something like ifneq $((..$(wildcard..)),)

I believe ifneq is read in stage 1 of the Makefile, so this wont work either, right?

Could be that it doesn't work, yes. Didn't try since i regard it as completely unimportant there.

We don't bail out on failures from strip, and if you are not interrested in errors, then redirect stderr to /dev/null instead of needlessly stat()ing around, IMO.