http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54155
Eric Botcazou <ebotcazou at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |WAITING
Last reconfirmed| |2012-08-02
CC| |ebotcazou at gcc dot
| |gnu.org
Ever Confirmed|0 |1
--- Comment #1 from Eric Botcazou <ebotcazou at gcc dot gnu.org> 2012-08-02
07:36:14 UTC ---
> /******* COMPILATION OUTPUT *******************/
> bash-3.2# gcc -o test1 test.cpp -m32 -mcpu=ultrasparc -lstdc++
> /usr/local/bin/ld: target elf32-sparc not found
> collect2: ld returned 1 exit status
> #############################################################
>
> If I eliminate the -m32/-m64 flag output file is successfully generated.
> #############################################################
> bash-3.2# file test1
> test1: ELF 32-bit MSB executable SPARC32PLUS Version 1, V8+ Required,
> dynamically linked, not stripped
> #############################################################
>
> Is it something that has gone wrong during configuration due to which the
> compiler does not recognize the -m option?
Rather strange indeed. What does `/usr/local/bin/ld -V' report?
Could you compare the command line passed to collect2 w/ and w/o the -m32 flag?
You need to add -v on the link line to have it printed.