Description
Bugzilla Link | 14665 |
Version | trunk |
OS | Linux |
Reporter | LLVM Bugzilla Contributor |
CC | @d0k |
Extended Description
This is similar to bug 11173, but it's a regression in Clang trunk from (at least) 3.0.
When linking wine/loader/preloader.c (at -O1 or -O2, but not -O0), the linker fails with an undefined reference to memset.
If I install clang-3.0 from debian's repo, it works fine. But with clang built locally, it fails:
austin@debian-home:~/wine-tmp/loader$ make preloader.o
clang -c -I. -I. -I../include -I../include -D__WINESRC__ -Wall -pipe -fno-strict-aliasing -Wdeclaration-after-statement -Wempty-body -Wignored-qualifiers -Wstrict-prototypes -Wtype-limits -Wunused-but-set-parameter -Wwrite-strings -gdwarf-2 -gstrict-dwarf -fno-omit-frame-pointer -Wpointer-arith -I/usr/include/freetype2 --std=gnu89 -g -O1 -o preloader.o preloader.c
austin@debian-home:~/wine-tmp/loader$ make
clang -o wine-preloader -static -nostartfiles -nodefaultlibs -Wl,-Ttext=0x7c400000 preloader.o ../libs/port/libwine_port.a
preloader.o: In function wld_memset': /home/austin/wine-tmp/loader/preloader.c:455: undefined reference to
memset'
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [wine-preloader] Error 1
llvm head is at:
commit 270bfbd
Author: Jakub Staszak kubastaszak@gmail.com
Date: Tue Dec 18 22:57:56 2012 +0000
Reverse order of checking SSE level when calculating compare cost, so we check
AVX2 before AVX.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170464 91177308-0d34-0410-b5e6-96231b3b80d8
and clang:
commit e77372ac818cf202571dcbf8ab656c8f47ba3423
Author: Eli Bendersky eliben@google.com
Date: Tue Dec 18 22:22:16 2012 +0000
Similar to 170440 - fix build warning with gcc
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170461 91177308-0d34-0410-b5e6-96231b3b80d8
Please let me know what additional info is needed. I can perform a regression test, if needed, though tips on how to handle it with two different repos would be appreciated.