Hi, On building tini the following error is thrown: /usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/../../../../lib64/libc.a(iofclose.o): In function `_IO_new_fclose': iofclose.c:(.text+0x274): undefined reference to `_Unwind_Resume' /usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/../../../../lib64/libc.a(iofflush.o): In function `_IO_fflush': iofflush.c:(.text+0x159): undefined reference to `_Unwind_Resume' /usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/../../../../lib64/libc.a(iofwrite.o): In function `_IO_fwrite': iofwrite.c:(.text+0x1f1): undefined reference to `_Unwind_Resume' /usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/../../../../lib64/libc.a(wfileops.o): In function `_IO_wfile_underflow': wfileops.c:(.text+0x6f8): undefined reference to `_Unwind_Resume' /usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/../../../../lib64/libc.a(fileops.o): In function `_IO_new_file_underflow': fileops.c:(.text+0x496): undefined reference to `_Unwind_Resume' /usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/../../../../lib64/libc.a(backtrace.o): In function `backtrace_helper': backtrace.c:(.text+0x24): undefined reference to `_Unwind_GetIP' backtrace.c:(.text+0x30): undefined reference to `_Unwind_GetCFA' /usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/../../../../lib64/libc.a(backtrace.o): In function `__backtrace': backtrace.c:(.text+0xbc): undefined reference to `_Unwind_Backtrace' /usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/../../../../lib64/libc.a(fprintf_chk.o): In function `___fprintf_chk': fprintf_chk.c:(.text+0x1e9): undefined reference to `_Unwind_Resume' /usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/../../../../lib64/libc.a(iofputs.o): In function `_IO_fputs': iofputs.c:(.text+0x182): undefined reference to `_Unwind_Resume' /usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/../../../../lib64/libc.a(iogetdelim.o): In function `_IO_getdelim': iogetdelim.c:(.text+0x316): undefined reference to `_Unwind_Resume' /usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/../../../../lib64/libc.a(fseek.o): In function `fseek': fseek.c:(.text+0x14d): undefined reference to `_Unwind_Resume' /usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/../../../../lib64/libc.a(ftello.o): In function `__ftello': ftello.c:(.text+0x1e2): undefined reference to `_Unwind_Resume' /usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/../../../../lib64/libc.a(ioseekoff.o):ioseekoff.c:(.text+0x224): more undefined references to `_Unwind_Resume' follow /usr/bin/../lib/clang/3.9.1/lib/linux/libclang_rt.builtins-x86_64.a(gcc_personality_v0.c.o): In function `__gcc_personality_v0': /home/portage/portage/sys-devel/llvm-3.9.1/work/llvm-3.9.1.src/projects/compiler-rt/lib/builtins/gcc_personality_v0.c:(.text.__gcc_personality_v0+0x27): undefined reference to `_Unwind_GetLanguageSpecificData' /home/portage/portage/sys-devel/llvm-3.9.1/work/llvm-3.9.1.src/projects/compiler-rt/lib/builtins/gcc_personality_v0.c:(.text.__gcc_personality_v0+0x45): undefined reference to `_Unwind_GetIP' /home/portage/portage/sys-devel/llvm-3.9.1/work/llvm-3.9.1.src/projects/compiler-rt/lib/builtins/gcc_personality_v0.c:(.text.__gcc_personality_v0+0x52): undefined reference to `_Unwind_GetRegionStart' /home/portage/portage/sys-devel/llvm-3.9.1/work/llvm-3.9.1.src/projects/compiler-rt/lib/builtins/gcc_personality_v0.c:(.text.__gcc_personality_v0+0x1a0): undefined reference to `_Unwind_SetGR' /home/portage/portage/sys-devel/llvm-3.9.1/work/llvm-3.9.1.src/projects/compiler-rt/lib/builtins/gcc_personality_v0.c:(.text.__gcc_personality_v0+0x1af): undefined reference to `_Unwind_SetGR' /home/portage/portage/sys-devel/llvm-3.9.1/work/llvm-3.9.1.src/projects/compiler-rt/lib/builtins/gcc_personality_v0.c:(.text.__gcc_personality_v0+0x1bf): undefined reference to `_Unwind_SetIP' clang-3.9: error: linker command failed with exit code 1 (use -v to see invocation) make[2]: *** [CMakeFiles/tini-static.dir/build.make:95: tini-static] Error 1 make[2]: Leaving directory '/home/portage/portage/sys-process/tini-0.13.2/work/tini-0.13.2_build' make[1]: *** [CMakeFiles/Makefile2:105: CMakeFiles/tini-static.dir/all] Error 2 make[1]: Leaving directory '/home/portage/portage/sys-process/tini-0.13.2/work/tini-0.13.2_build' which shows libclang_rt.builtins-x86_64.a linking against TEMPDIR files
Looks like either -nodefaultlibs problem or something weird. It's missing -lunwind, and this should be added by libcxx linker script.
Ok, so it seems to be actually a problem in clang driver. The code in tini somehow makes use of gcc personality stuff, which requires unwinder library. I'll spawn creduce to figure the relevant code out soonish.
Ok, turns out it happens to all programs when using -static.
Does not impact >=sys-libs/compiler-rt-4.0.0, older removed from portage tree