When I try to build app-office/libreoffice-7.1.4.2 it fails during the configure step with: checking whether x86_64-pc-linux-gnu-clang++ supports C++17... configure: error: no $ clang++ --version clang version 12.0.0 Target: x86_64-pc-linux-gnu Thread model: posix InstalledDir: /usr/lib/llvm/12/bin I also have no problems using clang++ as my day-to-day compiler for C++17 stuff. Reproducible: Always Steps to Reproduce: 1. Install sys-devel/clang-12.0.0-r1 2. Try to emerge app-office/libreoffice-7.1.4.2 with the [clang] USE-flag Actual Results: Compilation fails at the configure phase Expected Results: Make is capable of noticing that clang++ is, in fact, capable of supporting C++17 and proceeds with compilation
Created attachment 721294 [details] config.log
Created attachment 721297 [details] full build log
From the build log; > configure:18961: checking whether x86_64-pc-linux-gnu-clang++ supports C++17 > configure:19023: x86_64-pc-linux-gnu-clang++ -c -march=native -pipe -Wl,-O1 -Wl,--as-needed -O2 -std=c++17 -Werror -DSYSTEM_LIBCMIS -I/usr/include/libcmis-0.5 -I/usr/include/libxml2 conftest.cpp >&5 > clang-12: error: -Wl,-O1: 'linker' input unused [-Werror,-Wunused-command-line-argument] > clang-12: error: -Wl,--as-needed: 'linker' input unused [-Werror,-Wunused-command-line-argument] You should remove "-Wl,-O1 -Wl,--as-needed" from your CFLAGS and CXXFLAGS; these options only belong in LDFLAGS.