Skip to content

Compiling libc with SCUDO using gcc fails #60467

@liam-clink

Description

@liam-clink

cmake invocation:

cmake -S ../llvm/ -B . -G Ninja -DCMAKE_BUILD_TYPE=Release -DLLVM_TARGETS_TO_BUILD=X86 -DLLVM_ENABLE_PROJECTS="clang;libc;lld;compiler-rt" -DLLVM_ENABLE_RUNTIMES="" -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -DLIBCXX_USE_COMPILER_RT=YES -DLIBCXXABI_USE_COMPILER_RT=YES -DLLVM_USE_LINKER=lld -DLIBCXXABI_USE_LLVM_UNWINDER=YES -DLLVM_INSTALL_UTILS=On -DLLVM_LIBC_FULL_BUILD=ON -DLLVM_LIBC_INCLUDE_SCUDO=ON -DCOMPILER_RT_BUILD_SCUDO_STANDALONE_WITH_LLVM_LIBC=ON -DCOMPILER_RT_BUILD_GWP_ASAN=OFF -DCOMPILER_RT_SCUDO_STANDALONE_BUILD_SHARED=OFF -DCMAKE_INSTALL_PREFIX=$HOME/llvm15_temp
[1/881] Linking CXX executable bin/libc-scudo-integration-test
FAILED: bin/libc-scudo-integration-test 
: && /home/liam/gcc-12.2.0/bin/g++ -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wno-maybe-uninitialized -Wno-class-memaccess -Wno-redundant-move -Wno-pessimizing-move -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment -Wno-misleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -O3 -DNDEBUG -fuse-ld=lld -Wl,--color-diagnostics    -pthreads projects/libc/test/integration/scudo/CMakeFiles/libc-scudo-integration-test.dir/integration_test.cpp.o -o bin/libc-scudo-integration-test  projects/libc/test/integration/scudo/liblibc_for_scudo_integration_test.a && cd /home/liam/Documents/GitHub/llvm-project/build/projects/libc/test/integration/scudo && /home/liam/Documents/GitHub/llvm-project/build/bin/libc-scudo-integration-test
g++: error: unrecognized command-line option '-pthreads'; did you mean '-pthread'?
[2/881] Linking CXX executable bin/libc-gwp-asan-uaf-should-crash
FAILED: bin/libc-gwp-asan-uaf-should-crash 
: && /home/liam/gcc-12.2.0/bin/g++ -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wno-maybe-uninitialized -Wno-class-memaccess -Wno-redundant-move -Wno-pessimizing-move -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment -Wno-misleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -O3 -DNDEBUG -fuse-ld=lld -Wl,--color-diagnostics    -pthreads projects/libc/test/integration/scudo/CMakeFiles/libc-gwp-asan-uaf-should-crash.dir/gwp_asan_should_crash.cpp.o -o bin/libc-gwp-asan-uaf-should-crash  projects/libc/test/integration/scudo/liblibc_for_scudo_integration_test.a && :
g++: error: unrecognized command-line option '-pthreads'; did you mean '-pthread'?

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions