This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libgcj/40947] Invalid flag usage: Wl,-rpath, -Wx,-option must appear after -_SYSTYPE_SVR4


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40947

--- Comment #15 from ro at CeBiTec dot Uni-Bielefeld.DE <ro at CeBiTec dot Uni-Bielefeld.DE> 2011-08-03 11:37:17 UTC ---
> last part of output:
> -------------------
> libtool: link: /home/htl10/tmp-build/gcc-446-obj/gcc/gcj
> -B/home/htl10/tmp-build/gcc-446-obj/alphaev68-dec-osf5.1a/libjava/
> -B/home/htl10/tmp-build/gcc-446-obj/gcc/ -mieee -g -O2 -o .libs/jv-convert
> --main=gnu.gcj.convert.Convert -shared-libgcc 
> -L/home/htl10/tmp-build/gcc-446-obj/alphaev68-dec-osf5.1a/libjava/.libs
> -L/home/htl10/tmp-build/gcc-446-obj/alphaev68-dec-osf5.1a/libjava
> ./.libs/libgcj.so -lpthread -lrt -Wl,-rpath -Wl,/usr/local/lib
> /bin/ld:
> Invalid flag usage: Wl,-rpath, -Wx,-option must appear after -_SYSTYPE_SVR4 

I've no idea what's going on there: modulo pathname and target triplet
differences, I have exactly the same gcj command line to link
jv-convert.  Could you please manually invoke that command with -v
added, so I can see how exactly collect2 resp. ld is called?

What I do see is that if you add some -W option to ld, you get exactly
the message you observe.  E.g.

ld -G 8 -O3 -S -call_shared -o .libs/jv-convert /usr/lib/cmplrs/cc/crt0.o
-L.libs -L. -L../../gcc -L/usr/lib/cmplrs/cc gnu.gcj.convert.Convertmain.o
./.libs/libgcj.so -lpthread -lrt -rpath /vol/gcc/lib -lgcc_s -lgcc -lgcj -lm
-liconv -lpthread -lrt -lgcc_s -lgcc -lc -lgcc_s -lgcc -Wno-unused
ld:
Invalid flag usage: Wno-unused, -Wx,-option must appear after -_SYSTYPE_SVR4 
ld: Usage: ld [options] file [...]

Do you happen to have some environment variable set to -W<something>?
Though I have found no hint that ld would check for this, it's a
possibility.

    Rainer


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]