#if defined(__GLIBC__) && !defined(__UCLIBC__)
syntax error here
#endif
- " >"$tempname"
+ " >"$tempname".c
if $CC "$tempname".c -c -o "$tempname".o >/dev/null 2>&1; then
echo "$2";
else
A_FILES="$6"
LDLIBS="$7"
-# The -Wl,--sort-section option is not supported by older versions of ld
-SORT_SECTION=`check_cc "-Wl,--sort-section -Wl,alignment" ""`
+# The --sort-section option is not supported by older versions of ld
+SORT_SECTION=`check_cc "-Wl,--sort-section,alignment" ""`
# Static linking against glibc produces buggy executables
# (glibc does not cope well with ld --gc-sections).
# See sources.redhat.com/bugzilla/show_bug.cgi?id=3400
# Note that glibc is unsuitable for static linking anyway.
# We are removing -Wl,--gc-sections from link command line.
-GC_SECTION=`(
+GC_SECTIONS=`(
. ./.config
if test x"$CONFIG_STATIC" = x"y"; then
check_libc_is_glibc "" "-Wl,--gc-sections"
-o $EXE \
-Wl,--sort-common \
$SORT_SECTION \
- $GC_SECTION \
+ $GC_SECTIONS \
-Wl,--start-group $O_FILES $A_FILES -Wl,--end-group \
$l_list \
|| {
-o $EXE \
-Wl,--sort-common \
$SORT_SECTION \
- $GC_SECTION \
+ $GC_SECTIONS \
-Wl,--start-group $O_FILES $A_FILES -Wl,--end-group \
$l_list
if test $? = 0; then
-o $EXE \
-Wl,--sort-common \
$SORT_SECTION \
- $GC_SECTION \
+ $GC_SECTIONS \
-Wl,--start-group $O_FILES $A_FILES -Wl,--end-group \
$l_list \
-Wl,--warn-common \
-o $EXE \
-Wl,--sort-common \
$SORT_SECTION \
- $GC_SECTION \
+ $GC_SECTIONS \
-Wl,-T -Wl,busybox_ldscript \
-Wl,--start-group $O_FILES $A_FILES -Wl,--end-group \
$l_list \
-o $EXE \
-Wl,--sort-common \
$SORT_SECTION \
- $GC_SECTION \
+ $GC_SECTIONS \
-Wl,--start-group $O_FILES -Wl,--end-group \
-L"$sharedlib_dir" -lbusybox \
-Wl,--warn-common \
-o $EXE \
-Wl,--sort-common \
$SORT_SECTION \
- $GC_SECTION \
+ $GC_SECTIONS \
-L"$sharedlib_dir" -lbusybox \
-Wl,--warn-common \
|| {