dslm4515 / CMLFS

Clang-Built Musl Linux From Scratch
MIT License
99 stars 18 forks source link

LLVM 13.0 doesn't seem to work (cgnutools/7-clang) #53

Closed iamthenoname closed 1 year ago

iamthenoname commented 2 years ago

Every other instruction before this command runs without any errors.

$ cmake -B build -DCMAKE_EXE_LINKER_FLAGS="${LINKERFLAGS}" -DCMAKE_SHARED_LINKER_FLAGS="${LINKERFLAGS}" ${CONFIG_TOOLS} ${CONFIG_TRUPLES} ${CONFIG_CRT} ${CONFIG_CLANG} ${CONFIG_OPTIONS} ${CONFIG_LIBUNWIND} ${CONFIG_LIBCXXABI} ${CONFIG_LIBCXX} ${CONFIG_PATHS} ${BUILD_OFF}

CMake Warning at cmake/modules/HandleLLVMStdlib.cmake:28 (message):
  Can't specify libc++ with '-stdlib='
Call Stack (most recent call first):
  cmake/config-ix.cmake:15 (include)
  CMakeLists.txt:684 (include)

-- Native target architecture is X86
-- Threads enabled.
-- Doxygen disabled.
-- Go bindings enabled.
-- Could NOT find OCaml (missing: OCAMLFIND OCAML_VERSION OCAML_STDLIB_PATH) 
-- Could NOT find OCaml (missing: OCAMLFIND OCAML_VERSION OCAML_STDLIB_PATH) 
-- OCaml bindings disabled.
-- LLVM host triple: x86_64-pc-linux-musl
-- LLVM default target triple: x86_64-pc-linux-musl
-- Building with -fPIC
-- Targeting X86
-- Could not find ParallelSTL, libc++abi will not attempt to use it but the build may fail if the libc++ in use needs it to be available.
-- Looking for cxxabi.h in /mnt/cmlfs/sources/llvm/projects/libcxx/../libcxxabi/include
-- Looking for cxxabi.h in /mnt/cmlfs/sources/llvm/projects/libcxx/../libcxxabi/include - found
-- Looking for __cxxabi_config.h in /mnt/cmlfs/sources/llvm/projects/libcxx/../libcxxabi/include
-- Looking for __cxxabi_config.h in /mnt/cmlfs/sources/llvm/projects/libcxx/../libcxxabi/include - found
-- Compiler-RT supported architectures: x86_64
-- Builtin supported architectures: x86_64
-- For x86_64 builtins preferring i386/fp_mode.c to fp_mode.c
-- For x86_64 builtins preferring x86_64/floatdidf.c to floatdidf.c
-- For x86_64 builtins preferring x86_64/floatdisf.c to floatdisf.c
-- For x86_64 builtins preferring x86_64/floatundidf.S to floatundidf.c
-- For x86_64 builtins preferring x86_64/floatundisf.S to floatundisf.c
-- For x86_64 builtins preferring x86_64/floatdixf.c to floatdixf.c
-- For x86_64 builtins preferring x86_64/floatundixf.S to floatundixf.c
CMake Error at projects/compiler-rt/cmake/Modules/AddCompilerRT.cmake:259 (message):
  Cannot find builtins library for the target architecture
Call Stack (most recent call first):
  projects/compiler-rt/lib/orc/CMakeLists.txt:93 (add_compiler_rt_runtime)
dslm4515 commented 2 years ago

I have not tried building with LLVM 13.0 yet. So I'm not sure if there's any patching to be done.

dslm4515 commented 2 years ago

I just built LLVM-14.0.0 yesterday on my MLFS build.

I'll see if I can do another build of CMLFS with updated packages and LLVM-14

andzai1995 commented 2 years ago

I tried to build LLVM 14, too. Compiler-RT requires ORC library beginning from LLVM 13.0, if you disable it with -DCOMPILER_RT_BUILD_ORC=false, then LLVM builds fine

dslm4515 commented 2 years ago

Strange. I built LLVM yesterday with clang, LLD and compiler-rt.

https://github.com/dslm4515/BMLFS/blob/master/build-scripts/llvm14.build

No patches needed! Just a missing header from LLVM's libunwind-14.0.0

dslm4515 commented 1 year ago

I upgraded cgnutools with LLVM-15.0.5 via commit 71676d1336ff57f4c0982c8a28cdf77267c58bd0

Built on a glibc host