public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug lto/60394] New: LTO link fails when -fno-builtin is specified
@ 2014-03-02 22:23 patrick at motec dot com.au
  2014-03-03  4:06 ` [Bug lto/60394] " pinskia at gcc dot gnu.org
  0 siblings, 1 reply; 2+ messages in thread
From: patrick at motec dot com.au @ 2014-03-02 22:23 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 60394
           Summary: LTO link fails when -fno-builtin is specified
           Product: gcc
           Version: 4.8.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: lto
          Assignee: unassigned at gcc dot gnu.org
          Reporter: patrick at motec dot com.au

Attached are three test cases which demonstrate:

1. Successful link with "-Os -flto -nostdlib"
2. Successful link with "-Os -fno-builtin -nostdlib"
3. Failed link with "-Os -flto -fno-builtin -nostdlib"

Test case attached.

Full "-v" log for the failed link:

Using built-in specs.
COLLECT_GCC=powerpc-eabispe-gcc
COLLECT_LTO_WRAPPER=/home/patrick/src/e7/toolchain/stage2/libexec/gcc/powerpc-eabispe/4.8.2/lto-wrapper
Target: powerpc-eabispe
Configured with: /home/patrick/src/e7/toolchain/src/gcc-4.8.2/configure
--prefix=/home/patrick/src/e7/toolchain/stage2 --build=x86_64-unknown-linux-gnu
--host=x86_64-unknown-linux-gnu --target=powerpc-eabispe
--enable-languages=c,c++
--with-sysroot=/home/patrick/src/e7/toolchain/../prex_sysroot --disable-nls
--disable-werror --with-newlib --with-gmp=/home/patrick/src/e7/toolchain/stage2
--with-mpfr=/home/patrick/src/e7/toolchain/stage2 --disable-shared
--disable-debug --disable-libssp --with-cpu=8540
Thread model: single
gcc version 4.8.2 (GCC) 
COLLECT_GCC_OPTIONS='-v' '-Os' '-flto' '-fno-builtin' '-nostdlib' '-o' 'test3'
'-mcpu=8540'
 /home/patrick/src/e7/toolchain/stage2/libexec/gcc/powerpc-eabispe/4.8.2/cc1
-quiet -v test.c -quiet -dumpbase test.c -mcpu=8540 -auxbase test -Os -version
-flto -fno-builtin -o /tmp/ccKQLXfn.s
GNU C (GCC) version 4.8.2 (powerpc-eabispe)
    compiled by GNU C version 4.8.1, GMP version 5.0.1, MPFR version 3.1.2, MPC
version 0.9
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
ignoring nonexistent directory
"/home/patrick/src/e7/toolchain/../prex_sysroot/usr/local/include"
#include "..." search starts here:
#include <...> search starts here:
 /home/patrick/src/e7/toolchain/stage2/lib/gcc/powerpc-eabispe/4.8.2/include

/home/patrick/src/e7/toolchain/stage2/lib/gcc/powerpc-eabispe/4.8.2/include-fixed

/home/patrick/src/e7/toolchain/stage2/lib/gcc/powerpc-eabispe/4.8.2/../../../../powerpc-eabispe/include
 /home/patrick/src/e7/toolchain/../prex_sysroot/usr/include
End of search list.
GNU C (GCC) version 4.8.2 (powerpc-eabispe)
    compiled by GNU C version 4.8.1, GMP version 5.0.1, MPFR version 3.1.2, MPC
version 0.9
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: 1cf996be489ceb10fd0eea05167fda0c
COLLECT_GCC_OPTIONS='-v' '-Os' '-flto' '-fno-builtin' '-nostdlib' '-o' 'test3'
'-mcpu=8540'

/home/patrick/src/e7/toolchain/stage2/lib/gcc/powerpc-eabispe/4.8.2/../../../../powerpc-eabispe/bin/as
-me500 -many -mbig -o /tmp/cc651b3O.o /tmp/ccKQLXfn.s
COLLECT_GCC_OPTIONS='-v' '-Os' '-flto' '-fno-builtin' '-nostdlib' '-o' 'test3'
'-mcpu=8540'
 /home/patrick/src/e7/toolchain/stage2/libexec/gcc/powerpc-eabispe/4.8.2/cc1
-quiet -v string.c -quiet -dumpbase string.c -mcpu=8540 -auxbase string -Os
-version -flto -fno-builtin -o /tmp/ccKQLXfn.s
GNU C (GCC) version 4.8.2 (powerpc-eabispe)
    compiled by GNU C version 4.8.1, GMP version 5.0.1, MPFR version 3.1.2, MPC
version 0.9
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
ignoring nonexistent directory
"/home/patrick/src/e7/toolchain/../prex_sysroot/usr/local/include"
#include "..." search starts here:
#include <...> search starts here:
 /home/patrick/src/e7/toolchain/stage2/lib/gcc/powerpc-eabispe/4.8.2/include

/home/patrick/src/e7/toolchain/stage2/lib/gcc/powerpc-eabispe/4.8.2/include-fixed

/home/patrick/src/e7/toolchain/stage2/lib/gcc/powerpc-eabispe/4.8.2/../../../../powerpc-eabispe/include
 /home/patrick/src/e7/toolchain/../prex_sysroot/usr/include
End of search list.
GNU C (GCC) version 4.8.2 (powerpc-eabispe)
    compiled by GNU C version 4.8.1, GMP version 5.0.1, MPFR version 3.1.2, MPC
version 0.9
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: 1cf996be489ceb10fd0eea05167fda0c
COLLECT_GCC_OPTIONS='-v' '-Os' '-flto' '-fno-builtin' '-nostdlib' '-o' 'test3'
'-mcpu=8540'

/home/patrick/src/e7/toolchain/stage2/lib/gcc/powerpc-eabispe/4.8.2/../../../../powerpc-eabispe/bin/as
-me500 -many -mbig -o /tmp/ccYvBHUg.o /tmp/ccKQLXfn.s
COMPILER_PATH=/home/patrick/src/e7/toolchain/stage2/libexec/gcc/powerpc-eabispe/4.8.2/:/home/patrick/src/e7/toolchain/stage2/libexec/gcc/powerpc-eabispe/4.8.2/:/home/patrick/src/e7/toolchain/stage2/libexec/gcc/powerpc-eabispe/:/home/patrick/src/e7/toolchain/stage2/lib/gcc/powerpc-eabispe/4.8.2/:/home/patrick/src/e7/toolchain/stage2/lib/gcc/powerpc-eabispe/:/home/patrick/src/e7/toolchain/stage2/lib/gcc/powerpc-eabispe/4.8.2/../../../../powerpc-eabispe/bin/
LIBRARY_PATH=/home/patrick/src/e7/toolchain/stage2/lib/gcc/powerpc-eabispe/4.8.2/:/home/patrick/src/e7/toolchain/stage2/lib/gcc/powerpc-eabispe/4.8.2/../../../../powerpc-eabispe/lib/
COLLECT_GCC_OPTIONS='-v' '-Os' '-flto' '-fno-builtin' '-nostdlib' '-o' 'test3'
'-mcpu=8540'

/home/patrick/src/e7/toolchain/stage2/libexec/gcc/powerpc-eabispe/4.8.2/collect2
-plugin
/home/patrick/src/e7/toolchain/stage2/libexec/gcc/powerpc-eabispe/4.8.2/liblto_plugin.so
-plugin-opt=/home/patrick/src/e7/toolchain/stage2/libexec/gcc/powerpc-eabispe/4.8.2/lto-wrapper
-plugin-opt=-fresolution=/tmp/ccl3CrNI.res -flto
--sysroot=/home/patrick/src/e7/toolchain/../prex_sysroot --eh-frame-hdr -V -dn
-Bstatic -o test3
-L/home/patrick/src/e7/toolchain/stage2/lib/gcc/powerpc-eabispe/4.8.2
-L/home/patrick/src/e7/toolchain/stage2/lib/gcc/powerpc-eabispe/4.8.2/../../../../powerpc-eabispe/lib
/tmp/cc651b3O.o /tmp/ccYvBHUg.o
GNU ld (GNU Binutils) 2.24
  Supported emulations:
   elf32ppc
   elf32ppclinux
   elf32ppcsim
   elf64ppc powerpc-eabispe-gcc @/tmp/ccla6gRR.args
Using built-in specs.
COLLECT_GCC=powerpc-eabispe-gcc
Target: powerpc-eabispe
Configured with: /home/patrick/src/e7/toolchain/src/gcc-4.8.2/configure
--prefix=/home/patrick/src/e7/toolchain/stage2 --build=x86_64-unknown-linux-gnu
--host=x86_64-unknown-linux-gnu --target=powerpc-eabispe
--enable-languages=c,c++
--with-sysroot=/home/patrick/src/e7/toolchain/../prex_sysroot --disable-nls
--disable-werror --with-newlib --with-gmp=/home/patrick/src/e7/toolchain/stage2
--with-mpfr=/home/patrick/src/e7/toolchain/stage2 --disable-shared
--disable-debug --disable-libssp --with-cpu=8540
Thread model: single
gcc version 4.8.2 (GCC) 
COLLECT_GCC_OPTIONS='-c' '-mcpu=8540' '-v' '-Os' '-nostdlib' '-mcpu=8540'
'-dumpdir' './' '-dumpbase' 'test3.wpa'
'-fltrans-output-list=/tmp/ccrNJKXp.ltrans.out' '-fwpa'
'-fresolution=/tmp/ccl3CrNI.res'
 /home/patrick/src/e7/toolchain/stage2/libexec/gcc/powerpc-eabispe/4.8.2/lto1
-quiet -dumpdir ./ -dumpbase test3.wpa -mcpu=8540 -mcpu=8540 -auxbase cc651b3O
-Os -version -fltrans-output-list=/tmp/ccrNJKXp.ltrans.out -fwpa
-fresolution=/tmp/ccl3CrNI.res @/tmp/ccesTw9p
GNU GIMPLE (GCC) version 4.8.2 (powerpc-eabispe)
    compiled by GNU C version 4.8.1, GMP version 5.0.1, MPFR version 3.1.2, MPC
version 0.9
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
GNU GIMPLE (GCC) version 4.8.2 (powerpc-eabispe)
    compiled by GNU C version 4.8.1, GMP version 5.0.1, MPFR version 3.1.2, MPC
version 0.9
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
COMPILER_PATH=/home/patrick/src/e7/toolchain/stage2/libexec/gcc/powerpc-eabispe/4.8.2/:/home/patrick/src/e7/toolchain/stage2/libexec/gcc/powerpc-eabispe/4.8.2/:/home/patrick/src/e7/toolchain/stage2/libexec/gcc/powerpc-eabispe/:/home/patrick/src/e7/toolchain/stage2/lib/gcc/powerpc-eabispe/4.8.2/:/home/patrick/src/e7/toolchain/stage2/lib/gcc/powerpc-eabispe/:/home/patrick/src/e7/toolchain/stage2/lib/gcc/powerpc-eabispe/4.8.2/../../../../powerpc-eabispe/bin/:/home/patrick/src/e7/toolchain/stage2/libexec/gcc/powerpc-eabispe/4.8.2/:/home/patrick/src/e7/toolchain/stage2/libexec/gcc/powerpc-eabispe/4.8.2/:/home/patrick/src/e7/toolchain/stage2/libexec/gcc/powerpc-eabispe/:/home/patrick/src/e7/toolchain/stage2/lib/gcc/powerpc-eabispe/4.8.2/:/home/patrick/src/e7/toolchain/stage2/lib/gcc/powerpc-eabispe/:/home/patrick/src/e7/toolchain/stage2/lib/gcc/powerpc-eabispe/4.8.2/../../../../powerpc-eabispe/bin/
LIBRARY_PATH=/home/patrick/src/e7/toolchain/stage2/lib/gcc/powerpc-eabispe/4.8.2/:/home/patrick/src/e7/toolchain/stage2/lib/gcc/powerpc-eabispe/4.8.2/../../../../powerpc-eabispe/lib/
COLLECT_GCC_OPTIONS='-c' '-mcpu=8540' '-v' '-Os' '-nostdlib' '-mcpu=8540'
'-dumpdir' './' '-dumpbase' 'test3.wpa'
'-fltrans-output-list=/tmp/ccrNJKXp.ltrans.out' '-fwpa'
'-fresolution=/tmp/ccl3CrNI.res'
 powerpc-eabispe-gcc @/tmp/ccEkKUGL.args
Using built-in specs.
COLLECT_GCC=powerpc-eabispe-gcc
Target: powerpc-eabispe
Configured with: /home/patrick/src/e7/toolchain/src/gcc-4.8.2/configure
--prefix=/home/patrick/src/e7/toolchain/stage2 --build=x86_64-unknown-linux-gnu
--host=x86_64-unknown-linux-gnu --target=powerpc-eabispe
--enable-languages=c,c++
--with-sysroot=/home/patrick/src/e7/toolchain/../prex_sysroot --disable-nls
--disable-werror --with-newlib --with-gmp=/home/patrick/src/e7/toolchain/stage2
--with-mpfr=/home/patrick/src/e7/toolchain/stage2 --disable-shared
--disable-debug --disable-libssp --with-cpu=8540
Thread model: single
gcc version 4.8.2 (GCC) 
COLLECT_GCC_OPTIONS='-c' '-mcpu=8540' '-v' '-Os' '-nostdlib' '-mcpu=8540'
'-dumpdir' './' '-dumpbase' 'test3.ltrans0' '-fltrans' '-o'
'/tmp/ccrNJKXp.ltrans0.ltrans.o'
 /home/patrick/src/e7/toolchain/stage2/libexec/gcc/powerpc-eabispe/4.8.2/lto1
-quiet -dumpdir ./ -dumpbase test3.ltrans0 -mcpu=8540 -mcpu=8540 -auxbase-strip
/tmp/ccrNJKXp.ltrans0.ltrans.o -Os -version -fltrans @/tmp/ccNxJAQt -o
/tmp/ccrWTSMV.s
GNU GIMPLE (GCC) version 4.8.2 (powerpc-eabispe)
    compiled by GNU C version 4.8.1, GMP version 5.0.1, MPFR version 3.1.2, MPC
version 0.9
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
GNU GIMPLE (GCC) version 4.8.2 (powerpc-eabispe)
    compiled by GNU C version 4.8.1, GMP version 5.0.1, MPFR version 3.1.2, MPC
version 0.9
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
COLLECT_GCC_OPTIONS='-c' '-mcpu=8540' '-v' '-Os' '-nostdlib' '-mcpu=8540'
'-dumpdir' './' '-dumpbase' 'test3.ltrans0' '-fltrans' '-o'
'/tmp/ccrNJKXp.ltrans0.ltrans.o'

/home/patrick/src/e7/toolchain/stage2/lib/gcc/powerpc-eabispe/4.8.2/../../../../powerpc-eabispe/bin/as
-me500 -many -mbig -o /tmp/ccrNJKXp.ltrans0.ltrans.o /tmp/ccrWTSMV.s
COMPILER_PATH=/home/patrick/src/e7/toolchain/stage2/libexec/gcc/powerpc-eabispe/4.8.2/:/home/patrick/src/e7/toolchain/stage2/libexec/gcc/powerpc-eabispe/4.8.2/:/home/patrick/src/e7/toolchain/stage2/libexec/gcc/powerpc-eabispe/:/home/patrick/src/e7/toolchain/stage2/lib/gcc/powerpc-eabispe/4.8.2/:/home/patrick/src/e7/toolchain/stage2/lib/gcc/powerpc-eabispe/:/home/patrick/src/e7/toolchain/stage2/lib/gcc/powerpc-eabispe/4.8.2/../../../../powerpc-eabispe/bin/:/home/patrick/src/e7/toolchain/stage2/libexec/gcc/powerpc-eabispe/4.8.2/:/home/patrick/src/e7/toolchain/stage2/libexec/gcc/powerpc-eabispe/4.8.2/:/home/patrick/src/e7/toolchain/stage2/libexec/gcc/powerpc-eabispe/:/home/patrick/src/e7/toolchain/stage2/lib/gcc/powerpc-eabispe/4.8.2/:/home/patrick/src/e7/toolchain/stage2/lib/gcc/powerpc-eabispe/:/home/patrick/src/e7/toolchain/stage2/lib/gcc/powerpc-eabispe/4.8.2/../../../../powerpc-eabispe/bin/
LIBRARY_PATH=/home/patrick/src/e7/toolchain/stage2/lib/gcc/powerpc-eabispe/4.8.2/:/home/patrick/src/e7/toolchain/stage2/lib/gcc/powerpc-eabispe/4.8.2/../../../../powerpc-eabispe/lib/
COLLECT_GCC_OPTIONS='-c' '-mcpu=8540' '-v' '-Os' '-nostdlib' '-mcpu=8540'
'-dumpdir' './' '-dumpbase' 'test3.ltrans0' '-fltrans' '-o'
'/tmp/ccrNJKXp.ltrans0.ltrans.o'
/home/patrick/src/e7/toolchain/stage2/lib/gcc/powerpc-eabispe/4.8.2/../../../../powerpc-eabispe/bin/ld:
warning: cannot find entry symbol _start; defaulting to 0000000001800054
`memset' referenced in section `.text' of /tmp/ccrNJKXp.ltrans0.ltrans.o:
defined in discarded section `.text' of /tmp/ccYvBHUg.o (symbol from plugin)
collect2: error: ld returned 1 exit status


^ permalink raw reply	[flat|nested] 2+ messages in thread

* [Bug lto/60394] LTO link fails when -fno-builtin is specified
  2014-03-02 22:23 [Bug lto/60394] New: LTO link fails when -fno-builtin is specified patrick at motec dot com.au
@ 2014-03-03  4:06 ` pinskia at gcc dot gnu.org
  0 siblings, 0 replies; 2+ messages in thread
From: pinskia at gcc dot gnu.org @ 2014-03-03  4:06 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|---                         |DUPLICATE

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Dup of bug 60395

*** This bug has been marked as a duplicate of bug 60395 ***


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-03-03  4:06 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-03-02 22:23 [Bug lto/60394] New: LTO link fails when -fno-builtin is specified patrick at motec dot com.au
2014-03-03  4:06 ` [Bug lto/60394] " pinskia at gcc dot gnu.org

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).