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/80699] New: multiple prevailing defs with -flto and -Wl,--wrap


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

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