link errors with -flto and -Wl,-soname,f.o

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



With GCC 4.9 (built from svn r209238 on Linux x86-64) I'm getting these errors:

$ echo "void f() {}" > f.c
$ gcc -flto -c f.c
$ gcc -flto -o f.so -shared -Wl,-soname,f.o f.o
f.c:1:6: error: 'f' has already been defined
 void f() {}
      ^
f.c:1:6: note: previously defined here
lto1: fatal error: errors during merging of translation units
compilation terminated.
lto-wrapper: /home/jay/gcc/local/bin/gcc returned 1 exit status
collect2: error: lto-wrapper returned 1 exit status

I realise that setting the soname to f.o (instead of f.so) is an odd
thing to do, but I don't see why it should provoke these errors.

I don't see the errors with GCC 4.8.1 (at least the version of it
supplied with Ubuntu 13.10).

Thanks,
Jay.




[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux