public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "krisztian.kocsis at optimaster dot eu" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug lto/49612] New: LTO cannot link objects
Date: Sat, 02 Jul 2011 05:30:00 -0000	[thread overview]
Message-ID: <bug-49612-4@http.gcc.gnu.org/bugzilla/> (raw)

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

           Summary: LTO cannot link objects
           Product: gcc
           Version: 4.5.3
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: lto
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: krisztian.kocsis@optimaster.eu


I made a toolchain for embedded Geode CPUs but if LTO is enabled (-flto) then
the compiler cannot link objects.

Piece of config.log from fuse:

configure:3352: checking whether the C compiler works
configure:3374:
/project/optinux/toolchains/geode-lx-r1/bin/i686-optinux-linux-gnu-gcc -pipe
--param l1-cache-line-size=32 --param l1-cache-size=64 --param
l2-cache-size=128 -march=i686 -mtune=geode -mmmx -m3dnow -g -O2 -fmodulo-sched
-fgcse-after-reload -ftree-loop-linear -fivopts -flto 
-D__optinux_target_geode_lx_r1__ -D__optinux_target__ -D__optinux__ -Wl,-O1
-Wl,-z,combreloc -Wl,-z,relro -Wl,-z,noexecstack -Wl,-z,noexecheap
-Wl,--enable-new-dtags -Wl,--gc-sections -Wl,--hash-style=both
../sysdeps/generic/initfini.c:86:1: error: '_init' has already been defined
../sysdeps/generic/initfini.c:86:1: note: previously defined here
../sysdeps/generic/initfini.c:63:1: error: 'dummy' has already been defined
../sysdeps/generic/initfini.c:63:1: note: previously defined here
../sysdeps/generic/initfini.c:112:1: error: '_fini' has already been defined
../sysdeps/generic/initfini.c:112:1: note: previously defined here
lto-wrapper:
/project/optinux/toolchains/geode-lx-r1/bin/i686-optinux-linux-gnu-gcc returned
1 exit status
lto-wrapper: deleting LTRANS file /tmp/ccoThRvh.lto.o: No such file or
directory
collect2: lto-wrapper returned 1 exit status
configure:3378: $? = 1
configure:3416: result: no
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "fuse"
| #define PACKAGE_TARNAME "fuse"
| #define PACKAGE_VERSION "2.8.5"
| #define PACKAGE_STRING "fuse 2.8.5"
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE_URL ""
| #define PACKAGE "fuse"
| #define VERSION "2.8.5"
| /* end confdefs.h.  */
|.
| int
| main ()
| {
|.
|   ;
|   return 0;
| }
configure:3421: error: in `/project/optinux/products/mpbr/.builds/fuse-2.8.5':
configure:3423: error: C compiler cannot create executables
See `config.log' for more details

If I remove '-flto' then everything works OK!

gmp-5.0.2
mpfr-3.0.1
ppl-0.10.2
cloog-ppl-0.15.11
mpc-0.9
libelf-0.8.13
linux-2.6.35 (headers)
binutils-2.21
gcc-4.5.3
eglibc-2.14


             reply	other threads:[~2011-07-02  5:30 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-02  5:30 krisztian.kocsis at optimaster dot eu [this message]
2011-07-02 12:40 ` [Bug lto/49612] " rguenth at gcc dot gnu.org
2011-07-03  7:31 ` krisztian.kocsis at optimaster dot eu
2012-05-07 12:38 ` rguenth at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-49612-4@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).