lkundrak / rpms / busybox

Forked from rpms/busybox 4 years ago
Clone
Blob Blame History Raw
diff -up busybox-1.9.0/scripts/trylink.sect busybox-1.9.0/scripts/trylink
--- busybox-1.9.0/scripts/trylink.sect	2007-12-21 23:00:25.000000000 +0100
+++ busybox-1.9.0/scripts/trylink	2008-01-07 11:59:14.000000000 +0100
@@ -76,7 +76,6 @@ try $CC $LDFLAGS \
 	-o $EXE \
 	-Wl,--sort-common \
 	$SORT_SECTION \
-	-Wl,--gc-sections \
 	-Wl,--start-group $O_FILES $A_FILES -Wl,--end-group \
 	$l_list \
 || {
@@ -100,7 +99,6 @@ while test "$LDLIBS"; do
 		-o $EXE \
 		-Wl,--sort-common \
 		$SORT_SECTION \
-		-Wl,--gc-sections \
 		-Wl,--start-group $O_FILES $A_FILES -Wl,--end-group \
 		$l_list
 	if test $? = 0; then
@@ -129,7 +127,6 @@ if ! test -f busybox_ldscript; then
 	    -o $EXE \
 	    -Wl,--sort-common \
 	    $SORT_SECTION \
-	    -Wl,--gc-sections \
 	    -Wl,--start-group $O_FILES $A_FILES -Wl,--end-group \
 	    $l_list \
 	    -Wl,--warn-common \
@@ -151,7 +148,6 @@ else
 	    -o $EXE \
 	    -Wl,--sort-common \
 	    $SORT_SECTION \
-	    -Wl,--gc-sections \
 	    -Wl,-T -Wl,busybox_ldscript \
 	    -Wl,--start-group $O_FILES $A_FILES -Wl,--end-group \
 	    $l_list \
@@ -207,7 +203,6 @@ if test "$CONFIG_FEATURE_SHARED_BUSYBOX"
 	    -o $EXE \
 	    -Wl,--sort-common \
 	    $SORT_SECTION \
-	    -Wl,--gc-sections \
 	    -Wl,--start-group $O_FILES -Wl,--end-group \
 	    -L"$sharedlib_dir" -lbusybox \
 	    -Wl,--warn-common \
@@ -246,7 +241,6 @@ int main(int argc, char **argv)
 		-o $EXE \
 		-Wl,--sort-common \
 		$SORT_SECTION \
-		-Wl,--gc-sections \
 		-L"$sharedlib_dir" -lbusybox \
 		-Wl,--warn-common \
 	|| {
diff -up busybox-1.9.0/applets/applets.c.sect busybox-1.9.0/applets/applets.c
--- busybox-1.9.0/applets/applets.c.sect	2007-12-21 23:00:32.000000000 +0100
+++ busybox-1.9.0/applets/applets.c	2008-01-07 12:00:45.000000000 +0100
@@ -10,17 +10,6 @@
 #include <assert.h>
 #include "busybox.h"
 
-/* Apparently uclibc defines __GLIBC__ (compat trick?). Oh well. */
-#if ENABLE_STATIC && defined(__GLIBC__) && !defined(__UCLIBC__)
-#warning Static linking against glibc produces buggy executables
-#warning (glibc does not cope well with ld --gc-sections).
-#warning See sources.redhat.com/bugzilla/show_bug.cgi?id=3400
-#warning Note that glibc is unsuitable for static linking anyway.
-#warning If you still want to do it, remove -Wl,--gc-sections
-#warning from scripts/trylink and remove this warning.
-#error Aborting compilation.
-#endif
-
 #if ENABLE_BUILD_LIBBUSYBOX
 int main(int argc, char **argv)
 {