Issue metadata
Sign in to add a comment
|
cannot build hello word problem with glibc 2.27 |
||||||||||||||||||||
Issue description
With glibc 2.27
cat a.c
#include "stdio.h"
int main() {
printf("hello.\n");
}
clang -static a.c
/usr/lib/gcc/x86_64-pc-linux-gnu/4.9.x/../../../../lib64/libc.a(printf_fp.o): In function `__printf_fp_l':
(.text+0x5ea): undefined reference to `__unordtf2'
/usr/lib/gcc/x86_64-pc-linux-gnu/4.9.x/../../../../lib64/libc.a(printf_fphex.o): In function `__printf_fphex':
(.text+0x9a): undefined reference to `__unordtf2'
,
Aug 3
This bug has an owner, thus, it's been triaged. Changing status to "assigned".
,
Oct 16
I was able to compile a simple hello.c:
cr) ((e0f4c4f...)) mvcheng@otc-chromeosbuild-3 ~/trunk/src/scripts/test $ cat hello.c
#include "stdio.h"
int main() {
printf("Hello world \n");
}
(cr) ((e0f4c4f...)) mvcheng@otc-chromeosbuild-3 ~/trunk/src/scripts/test $ clang -static hello.c -v
Chromium OS 8.0_pre339409_p20180926-r3 clang version 8.0.0 (/var/cache/chromeos-cache/distfiles/host/egit-src/clang.git 6601c8f525499269dba75f75bbd1ee2671aaa262) (/var/cache/chromeos-cache/distfiles/host/egit-src/llvm.git 36f54002c931a026f490f9fb074c11d91e3487a2) (based on LLVM 8.0.0svn)
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/bin
Selected GCC installation: /usr/lib/gcc/x86_64-pc-linux-gnu/4.9.x
Candidate multilib: .;@m64
Candidate multilib: 32;@m32
Selected multilib: .;@m64
"/usr/bin/clang-8" -cc1 -triple x86_64-pc-linux-gnu -emit-obj -mrelax-all -disable-free -disable-llvm-verifier -discard-value-names -main-file-name hello.c -static-define -mrelocation-model static -mthread-model posix -mdisable-fp-elim -fmath-errno -masm-verbose -mconstructor-aliases -munwind-tables -fuse-init-array -target-cpu x86-64 -dwarf-column-info -debugger-tuning=gdb -v -resource-dir /usr/lib64/clang/8.0.0 -internal-isystem /usr/local/include -internal-isystem /usr/lib64/clang/8.0.0/include -internal-externc-isystem /include -internal-externc-isystem /usr/include -fdebug-compilation-dir /home/mvcheng/trunk/src/scripts/test -ferror-limit 19 -fmessage-length 425 -fobjc-runtime=gcc -fdiagnostics-show-option -fcolor-diagnostics -o /tmp/hello-4ba8dd.o -x c hello.c -faddrsig
clang -cc1 version 8.0.0 based upon LLVM 8.0.0svn default target x86_64-pc-linux-gnu
ignoring nonexistent directory "/usr/local/include"
ignoring nonexistent directory "/include"
#include "..." search starts here:
#include <...> search starts here:
/usr/lib64/clang/8.0.0/include
/usr/include
End of search list.
"/usr/bin/x86_64-pc-linux-gnu-ld" --build-id --eh-frame-hdr -m elf_x86_64 -static -o a.out /usr/lib/gcc/x86_64-pc-linux-gnu/4.9.x/../../../../lib64/crt1.o /usr/lib/gcc/x86_64-pc-linux-gnu/4.9.x/../../../../lib64/crti.o /usr/lib/gcc/x86_64-pc-linux-gnu/4.9.x/crtbeginT.o -L/usr/lib/gcc/x86_64-pc-linux-gnu/4.9.x -L/usr/lib/gcc/x86_64-pc-linux-gnu/4.9.x/../../../../lib64 -L/usr/bin/../lib64 -L/lib/../lib64 -L/usr/lib/../lib64 -L/usr/lib/gcc/x86_64-pc-linux-gnu/4.9.x/../../../../x86_64-pc-linux-gnu/lib -L/usr/lib/gcc/x86_64-pc-linux-gnu/4.9.x/../../.. -L/usr/bin/../lib -L/lib -L/usr/lib /tmp/hello-4ba8dd.o --start-group /usr/lib64/clang/8.0.0/lib/linux/libclang_rt.builtins-x86_64.a -lgcc_eh -lc --end-group /usr/lib/gcc/x86_64-pc-linux-gnu/4.9.x/crtend.o /usr/lib/gcc/x86_64-pc-linux-gnu/4.9.x/../../../../lib64/crtn.o
(cr) ((e0f4c4f...)) mvcheng@otc-chromeosbuild-3 ~/trunk/src/scripts/test $ ./a.out
Hello world
,
Oct 24
,
Oct 25
yunlian, is this still an issue?
,
Oct 25
Yes or no. With my patch to disable float128, it works. But we want a better fix for the future.
,
Oct 25
I have a patch in works for compiler-rt https://reviews.llvm.org/D53608 but will take a while since the builtins problem in compiler-rt turned up more complicated than what I originally expected. |
|||||||||||||||||||||
►
Sign in to add a comment |
|||||||||||||||||||||
Comment 1 by yunlian@chromium.org
, May 16 2018