This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug lto/42690] Undefined reference errors with -flto -fuse-linker-plugin



------- Comment #4 from hjl dot tools at gmail dot com  2010-01-15 03:41 -------
Works for me:

[hjl@gnu-6 gold-2]$ vi pr42690.c
[hjl@gnu-6 gold-2]$ cat pr42690.c
int f(long long a, long long b)
{
#ifdef BUG
    return (int) (a / b);
#else
    return (int) __divdi3(a, b);
#endif
}

int main(void)
{
    return f(2718281828459045, 543656365691809);
}
[hjl@gnu-6 gold-2]$ /export/build/gnu/gcc/build-x86_64-linux/gcc/xgcc -B./
-B/export/build/gnu/gcc/build-x86_64-linux/gcc/
-B/export/build/gnu/gcc/build-x86_64-linux/gcc/../lto-plugin/.libs/ -flto
-fuse-linker-plugin -DBUG pr42690.c
[hjl@gnu-6 gold-2]$ /export/build/gnu/gcc/build-x86_64-linux/gcc/xgcc -v
Using built-in specs.
COLLECT_GCC=/export/build/gnu/gcc/build-x86_64-linux/gcc/xgcc
Target: x86_64-unknown-linux-gnu
Configured with: /export/gnu/import/git/gcc/configure --enable-languages=c
--disable-bootstrap --prefix=/usr/gcc-4.5.0 --with-local-prefix=/usr/local
--with-plugin-ld=ld.gold --enable-gold
Thread model: posix
gcc version 4.5.0 20100114 (experimental) (GCC)
[hjl@gnu-6 gold-2]$


-- 

hjl dot tools at gmail dot com changed:

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


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]