This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug driver/46410] [4.6 Regression] Linker options no longer accepted
- From: "rguenther at suse dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 10 Nov 2010 13:28:39 +0000
- Subject: [Bug driver/46410] [4.6 Regression] Linker options no longer accepted
- Auto-submitted: auto-generated
- References: <bug-46410-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46410
--- Comment #4 from rguenther at suse dot de <rguenther at suse dot de> 2010-11-10 13:28:21 UTC ---
On Wed, 10 Nov 2010, joseph at codesourcery dot com wrote:
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46410
>
> --- Comment #3 from joseph at codesourcery dot com <joseph at codesourcery dot com> 2010-11-10 13:13:06 UTC ---
> Yes, these options were ignored in general; the driver would have
> translated -- to -f, but the linker specs don't pass down -f options, and
> now -- is only translated to -f if a corresponding -f option actually
> exists. If the packages actually want these options to go to the linker,
> they should use -Wl, to pass them.
>
> > biosdevname:gcc: error: unrecognized option '-all-static'
> > dconf:gcc: error: unrecognized option '-avoid-version'
>
> These would have previously been allowed by %{a*} specs because the
> long-ago removal of support for the old -a profiling options had some bits
> missing that I caught. As those were compiler specs, this just meant that
> the options were quietly ignored (any option accepted by a spec is
> accepted) rather than being passed to the linker.
>
> > ecj-bootstrap:gcj: error: unrecognized option '-s-bc-abi'
>
> This option is meant to be valid - in java/lang.opt and in libgcj.spec.
> If it's being rejected perhaps there's something wrong with your
> libgcj.spec? It's nothing new that an option needs to be in a spec for
> the driver to accept it.
Ah, true.
find $RPM_BUILD_ROOT -name libgcj.spec | xargs \
sed -i -e 's/lib: /&%%{static:%%eJava programs cannot be linked
statically}/'
probably kills it? The result is
%rename startfile startfileorig
*startfile: %(startfileorig)
%rename lib liborig
*lib: %{static:%eJava programs cannot be linked
statically}%{static-libgcj:-non_shared}
%{static|static-libgcj|!s-bc-abi:-lgcj;:-lgcj_bc}
%{static-libgcj:-call_shared} -lm -lpthread -lrt -ldl %(libgcc)
%(liborig)
*jc1: -fhash-synchronization -fno-use-divide-subroutine -fuse-boehm-gc
-fnon-call-exceptions %{findirect-dispatch:-fPIC}
-fkeep-inline-functions
OTOH gcj is invoked as
gcj -Wno-deprecated -findirect-dispatch -Bsymbolic -C --classpath
.:/usr/share/java/libgcj-tools-4.6.jar:/usr/share/java/libgcj-4.6.jar
and I can't see where -s-bc-abi slips in. Hmm. I'll investigate closer
when I have time to.