If one passes -Wl,-oldstyle_liblookup to gcc (in order to pass the option to ld), collect2 interprets the option as specifying the output file. i.e. "-ofoo" is the same as "-o foo" In the latest snapshot, SWITCHES_NEED_SPACES can be defined to prevent this problem, Release: gcc-3.4 originally reported for gcc 2.95.2 and latest snapshot Environment: alpha-dec-osf4.0a, also x86 How-To-Repeat: gcc -o foo -Wl,-oldstyle_liblookup foo.c Unformatted: From: epeisach@zif.mit.edu Reply-To: epeisach@zif.mit.edu X-Send-Pr-Version: gnatsweb-2.6 (1.135) X-GNATS-Notify:
Fix: For 2.95 - without some recoding, nothing can be done, for newer gcc's, define SWITCHES_NEED_SPACES "o" in gcc/config/alpha/osf.h
State-Changed-From-To: open->analyzed State-Changed-Why: This still happens, the problem is not arch specific. IMHO -Wl, should not treat any following -o as an option to gcc.
This is a dup of bug 5762 which contains a patch. *** This bug has been marked as a duplicate of 5762 ***
Gcc 3.3.2 on Tru64 5.1A (alphaev56-dec-osf5.1) with patched collect2.c according bug 5762. Compiling Samba 3.0 with Active Directory support (need Kerberos) finish without support of AD (configure doesn't recognize Kerberos) Reason: gcc with options "-Wl,-oldstyle_liblookup" collect2 still interprets the option as specifying the output file. For example one message from log file: configure:23198: checking for krb5_encrypt_data in -lk5crypto configure:23229: gcc -o conftest -L/usr/local/BerkeleyDB.4.1/lib -L/usr/local/ssl/lib -L/usr/local/include conftest.c -lk5crypto -Wl,-oldstyle_liblookup -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err -lsecurity -lresolv >&5 collect2: ldstyle_liblookup: cannot open as COFF file collect2: Jan Jech
Any suggestion to solve it?
reopening ...
... to confirm. Patch to be submitted shortly.
Patch here: http://gcc.gnu.org/ml/gcc-patches/2004-04/msg01920.html
Subject: Bug 1963 CVSROOT: /cvs/gcc Module name: gcc Changes by: ro@gcc.gnu.org 2004-04-30 20:09:51 Modified files: gcc : ChangeLog gcc/config/alpha: osf.h Log message: PR other/1963 * config/alpha/osf.h (SWITCHES_NEED_SPACES): Define. Patches: http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.3532&r2=2.3533 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/alpha/osf.h.diff?cvsroot=gcc&r1=1.35&r2=1.36
Subject: Bug 1963 CVSROOT: /cvs/gcc Module name: gcc Branch: gcc-3_4-branch Changes by: ro@gcc.gnu.org 2004-04-30 20:12:57 Modified files: gcc : ChangeLog gcc/config/alpha: osf.h Log message: PR other/1963 * config/alpha/osf.h (SWITCHES_NEED_SPACES): Define. Patches: http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=2.2326.2.427&r2=2.2326.2.428 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/alpha/osf.h.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.35&r2=1.35.4.1
Fixed for 3.4.1, 3.5.