This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug lto/80699] New: multiple prevailing defs with -flto and -Wl,--wrap
- From: "trippels at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 10 May 2017 07:36:08 +0000
- Subject: [Bug lto/80699] New: multiple prevailing defs with -flto and -Wl,--wrap
- Auto-submitted: auto-generated
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80699
Bug ID: 80699
Summary: multiple prevailing defs with -flto and -Wl,--wrap
Product: gcc
Version: 7.1.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: lto
Assignee: unassigned at gcc dot gnu.org
Reporter: trippels at gcc dot gnu.org
Target Milestone: ---
markus@x4 /tmp % cat test.c
void foo() {}
markus@x4 /tmp % cat test_warp.c
extern void foo();
void __wrap_foo() { foo(); };
int main() {}
markus@x4 /tmp % gcc -Wl,--wrap=foo test.c test_warp.c
markus@x4 /tmp % clang -flto -Wl,--wrap=foo test.c test_warp.c
markus@x4 /tmp % gcc -flto -Wl,--wrap=foo test.c test_warp.c
lto1: fatal error: multiple prevailing defs for ‘foo’
compilation terminated.
lto-wrapper: fatal error: /usr/x86_64-pc-linux-gnu/gcc-bin/7.1.1/gcc returned 1
exit status
compilation terminated.
/usr/lib/gcc/x86_64-pc-linux-gnu/7.1.1/../../../../x86_64-pc-linux-gnu/bin/ld:
fatal error: lto-wrapper failed
collect2: error: ld returned 1 exit status