[patch] Tiny fix of LINK_COMMAND_SPEC
Kaz Kojima
kkojima@rr.iij4u.or.jp
Wed Jul 6 13:30:00 GMT 2005
Hi,
I hit
/exp/ldroot/dodes/xsh-gcc/gcc/xgcc -B/exp/ldroot/dodes/xsh-gcc/gcc/ /exp/ldroot/dodes/LOCAL/gcc/gcc/testsuite/gcc.dg/special/gcsec-1.c -ffunction-sections -fdata-sections -Wl,--gc-sections -static -fno-show-column -lm -fstack-protector -o ./gcsec-1.exe
/usr/local/bin/sh4-unknown-linux-gnu-ld: group ended before it began (--help for usage)
in the regression test of the experimental stack protector support
for SH. gcsec-1 results UNSUPPORTED for i686-pc-linux-gnu on my FC3
box, though I got the same error when compiling gcsec-1.c with the
same options manually on that box. -v shows why ld complains:
/exp/ldroot/dodes/xsh-gcc/gcc/collect2 -m shlelf_linux -static -o ./gcsec-1.exe /exp/ldroot/lib/crt1.o /exp/ldroot/lib/crti.o /exp/ldroot/dodes/xsh-gcc/gcc/crtbeginT.o -L/exp/ldroot/dodes/xsh-gcc/gcc -L/usr/local/lib/gcc/sh4-unknown-linux-gnu/../../../sh4-unknown-linux-gnu/lib -L/exp/ldroot/lib -L/exp/ldroot/usr/lib /tmp/ccyKjU7d.o --gc-sections -lm -lssp_nonshared -lssp--start-group -lgcc -lgcc_eh -lc --end-group /exp/ldroot/dodes/xsh-gcc/gcc/crtend.o /exp/ldroot/lib/crtn.o
and it looks that the space after -lssp is eaten up. The patch
below seems to fix it. Bootstrap and regtested on i686-pc-linux-gnu.
Ok for mainline?
Regards,
kaz
--
2005-07-06 Kaz Kojima <kkojima@gcc.gnu.org>
* gcc.c (LINK_COMMAND_SPEC): Add space after %(link_ssp).
--- ORIG/gcc/gcc/gcc.c 2005-07-05 06:32:53.000000000 +0900
+++ LOCAL/gcc/gcc/gcc.c 2005-07-06 08:29:17.000000000 +0900
@@ -697,7 +697,7 @@ proper position among the other output f
%{s} %{t} %{u*} %{x} %{z} %{Z} %{!A:%{!nostdlib:%{!nostartfiles:%S}}}\
%{static:} %{L*} %(mfwrap) %(link_libgcc) %o %(mflib)\
%{fprofile-arcs|fprofile-generate|coverage:-lgcov}\
- %{!nostdlib:%{!nodefaultlibs:%(link_ssp)%(link_gcc_c_sequence)}}\
+ %{!nostdlib:%{!nodefaultlibs:%(link_ssp) %(link_gcc_c_sequence)}}\
%{!A:%{!nostdlib:%{!nostartfiles:%E}}} %{T*} }}}}}}"
#endif
More information about the Gcc-patches
mailing list