https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85915

--- Comment #2 from Arfrever Frehtes Taifersar Arahesis <Arfrever.FTA at GMail 
dot Com> ---
I have firstly rebuilt glibc with GCC 8.1.0 without -mfunction-return=thunk and
at that time GCC 7.3.0 and 8.1.0 were working.

Next I have rebuilt glibc with GCC 8.1.0 with -mfunction-return=thunk and now
GCC 8.1.0 seems to work, but GCC 7.3.0 is broken (even without
-mfunction-return=thunk or with explicit -mfunction-return=keep):

$ gcc-7.3.0 -mfunction-return=thunk -o test -x c - <<< 'int main(){}'
/usr/lib64/libc_nonshared.a(elf-init.oS): In function `__x86_return_thunk':
(.text.__x86_return_thunk[__x86_return_thunk]+0x0): multiple definition of
`__x86_return_thunk'
/usr/lib/gcc/x86_64-pc-linux-gnu/7.3.0/crtbeginS.o:(.text.__x86_indirect_thunk[__x86_indirect_thunk]+0x0):
first defined here
collect2: error: ld returned 1 exit status
$ gcc-8.1.0 -mfunction-return=thunk -o test -x c - <<< 'int main(){}'
$ gcc-7.3.0 -o test -x c - <<< 'int main(){}'
/usr/lib64/libc_nonshared.a(elf-init.oS): In function `__x86_return_thunk':
(.text.__x86_return_thunk[__x86_return_thunk]+0x0): multiple definition of
`__x86_return_thunk'
/usr/lib/gcc/x86_64-pc-linux-gnu/7.3.0/crtbeginS.o:(.text.__x86_indirect_thunk[__x86_indirect_thunk]+0x0):
first defined here
collect2: error: ld returned 1 exit status

Reply via email to