https://sourceware.org/bugzilla/show_bug.cgi?id=33503

            Bug ID: 33503
           Summary: Compiling binutils with Clang failing
           Product: binutils
           Version: 2.46 (HEAD)
            Status: UNCONFIRMED
          Severity: minor
          Priority: P2
         Component: binutils
          Assignee: unassigned at sourceware dot org
          Reporter: kartatz at amanoteam dot com
  Target Milestone: ---

Created attachment 16394
  --> https://sourceware.org/bugzilla/attachment.cgi?id=16394&action=edit
config.log

I have a daily workflow where I cross-compile the latest binutils trunk to
macOS using Clang. It was working fine in the past few days, but after
77c74294bfc5005204a2de3cc64bbdb2f877be29, it started failing with the following
error:

$ ../configure \
        --host=aarch64-unknown-apple-darwin \
        --target=x86_64-unknown-linux-gnu \
        --prefix=/tmp/obggcc \
        --enable-ld \
        --enable-lto \
        --enable-separate-code \
        --enable-rosegment \
        --enable-relro \
        --enable-compressed-debug-sections=all \
        --enable-default-compressed-debug-sections-algorithm=zstd \
        --disable-gprofng \
        --disable-gold \
        --disable-default-execstack \
        --with-sysroot=/tmp/obggcc/x86_64-unknown-linux-gnu \
        --without-static-standard-libraries \
        --with-zstd=/tmp/obggcc \
        --with-system-zlib \
        CFLAGS="-I/tmp/obggcc/include -w -O2" \
        CXXFLAGS="-I/tmp/obggcc/include -w -O2" \
        LDFLAGS="-L/tmp/obggcc/lib -Xlinker -s"
checking build system type... x86_64-pc-linux-gnu
checking host system type... aarch64-apple-darwin
checking target system type... x86_64-unknown-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether ln works... yes
checking whether ln -s works... yes
checking for a sed that does not truncate output... /usr/bin/sed
checking for gawk... gawk
checking for aarch64-apple-darwin-gcc...
/tmp/darwin/bin/aarch64-apple-darwin20.4-clang
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... yes
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether /tmp/darwin/bin/aarch64-apple-darwin20.4-clang accepts -g...
yes
checking for /tmp/darwin/bin/aarch64-apple-darwin20.4-clang option to accept
ISO C89... none needed
checking for /tmp/darwin/bin/aarch64-apple-darwin20.4-clang option to accept
ISO C99... none needed
checking whether we are using the GNU C++ compiler... yes
checking whether /tmp/darwin/bin/aarch64-apple-darwin20.4-clang++ accepts -g...
yes
checking whether g++ accepts -static-libstdc++ -static-libgcc... no
checking for aarch64-apple-darwin-gnatbind... no
checking for gnatbind... no
checking for aarch64-apple-darwin-gnatmake... no
checking for gnatmake... no
checking whether compiler driver understands Ada and is recent enough... no
checking for aarch64-apple-darwin-gdc... no
checking for gdc... no
checking whether the D compiler works... no
checking for cargo... no
checking how to compare bootstrapped objects... cmp --ignore-initial=16 $$f1
$$f2
checking for objdir... .libs
checking for isl 0.15 or later... yes
checking whether to enable libdiagnostics... no
checking for library containing dlopen... none required
checking for library containing pthread_create... none required
*** This configuration is not supported in the following subdirectories:
     zlib
    (Any other directories should still work fine.)
checking for default BUILD_CONFIG... 
checking for --enable-vtable-verify... no
checking for bison... bison -y
checking for bison... bison
checking for gm4... no
checking for gnum4... no
checking for m4... m4
checking for flex... flex
checking for flex... flex
checking for makeinfo... makeinfo
checking for expect... no
checking for runtest... no
checking for ar... (cached) /usr/bin/llvm-ar
checking for aarch64-apple-darwin-ar... (cached) /usr/bin/llvm-ar
checking for as... (cached) /usr/bin/llvm-as
checking for aarch64-apple-darwin-as... (cached) /usr/bin/llvm-as
checking for aarch64-apple-darwin-dlltool... no
checking for aarch64-apple-darwin-dsymutil... no
checking for ld... (cached) /tmp/darwin/bin/aarch64-apple-darwin20.4-ld
checking for aarch64-apple-darwin-ld... (cached)
/tmp/darwin/bin/aarch64-apple-darwin20.4-ld
checking for aarch64-apple-darwin-lipo... no
checking for nm... (cached) /usr/bin/llvm-nm
checking for aarch64-apple-darwin-nm... (cached) /usr/bin/llvm-nm
checking for ranlib... (cached) /usr/bin/llvm-ranlib
checking for aarch64-apple-darwin-ranlib... (cached) /usr/bin/llvm-ranlib
checking for strip... (cached) /usr/bin/llvm-strip
checking for aarch64-apple-darwin-strip... (cached) /usr/bin/llvm-strip
checking for aarch64-apple-darwin-windres... no
checking for aarch64-apple-darwin-windmc... no
checking for objcopy... (cached) /usr/bin/llvm-objcopy
checking for aarch64-apple-darwin-objcopy... (cached) /usr/bin/llvm-objcopy
checking for aarch64-apple-darwin-objdump... no
checking for aarch64-apple-darwin-otool... no
checking for readelf... (cached) /usr/bin/llvm-readelf
checking for aarch64-apple-darwin-readelf... (cached) /usr/bin/llvm-readelf
checking how to run the C preprocessor...
/tmp/darwin/bin/aarch64-apple-darwin20.4-clang -E
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for clang... yes
checking for clang plugin file... checking for aarch64-apple-darwin-ar...
(cached) /usr/bin/llvm-ar
/usr/lib/llvm-22/lib/clang/22/../../LLVMgold.so
checking for x86_64-unknown-linux-gnu-cc... no
checking for x86_64-unknown-linux-gnu-gcc... x86_64-unknown-linux-gnu-gcc
checking for x86_64-unknown-linux-gnu-c++... x86_64-unknown-linux-gnu-c++
checking for x86_64-unknown-linux-gnu-gcc... x86_64-unknown-linux-gnu-gcc
checking for x86_64-unknown-linux-gnu-gfortran... no
checking for x86_64-unknown-linux-gnu-gccgo... no
checking for x86_64-unknown-linux-gnu-gdc... no
checking for x86_64-unknown-linux-gnu-gm2... no
checking for x86_64-unknown-linux-gnu-dlltool... no
checking for x86_64-unknown-linux-gnu-dsymutil... no
checking for x86_64-unknown-linux-gnu-lipo... no
checking for x86_64-unknown-linux-gnu-otool... no
checking for x86_64-unknown-linux-gnu-windres... no
checking for x86_64-unknown-linux-gnu-windmc... no
checking where to find the target ar... pre-installed in
/tmp/obggcc-toolchain/bin/../lib/gcc/x86_64-unknown-linux-gnu/15/../../../../x86_64-unknown-linux-gnu/bin
checking where to find the target as... pre-installed in
/tmp/obggcc-toolchain/bin/../lib/gcc/x86_64-unknown-linux-gnu/15/../../../../x86_64-unknown-linux-gnu/bin
checking where to find the target cc... pre-installed
checking where to find the target c++... pre-installed
checking where to find the target c++ for libstdc++... pre-installed
checking where to find the target dlltool... pre-installed
checking where to find the target dsymutil... pre-installed
checking where to find the target gcc... pre-installed
checking where to find the target gfortran... pre-installed
checking where to find the target gccgo... pre-installed
checking where to find the target gdc... pre-installed
checking where to find the target gm2... pre-installed
checking where to find the target ld... pre-installed in
/tmp/obggcc-toolchain/bin/../lib/gcc/x86_64-unknown-linux-gnu/15/../../../../x86_64-unknown-linux-gnu/bin
checking where to find the target lipo... pre-installed
checking where to find the target nm... pre-installed in
/tmp/obggcc-toolchain/bin/../lib/gcc/x86_64-unknown-linux-gnu/15/../../../../x86_64-unknown-linux-gnu/bin
checking where to find the target objcopy... pre-installed in
/tmp/obggcc-toolchain/bin/../lib/gcc/x86_64-unknown-linux-gnu/15/../../../../x86_64-unknown-linux-gnu/bin
checking where to find the target objdump... pre-installed in
/tmp/obggcc-toolchain/bin/../lib/gcc/x86_64-unknown-linux-gnu/15/../../../../x86_64-unknown-linux-gnu/bin
checking where to find the target otool... pre-installed
checking where to find the target ranlib... pre-installed in
/tmp/obggcc-toolchain/bin/../lib/gcc/x86_64-unknown-linux-gnu/15/../../../../x86_64-unknown-linux-gnu/bin
checking where to find the target readelf... pre-installed in
/tmp/obggcc-toolchain/bin/../lib/gcc/x86_64-unknown-linux-gnu/15/../../../../x86_64-unknown-linux-gnu/bin
checking where to find the target strip... pre-installed in
/tmp/obggcc-toolchain/bin/../lib/gcc/x86_64-unknown-linux-gnu/15/../../../../x86_64-unknown-linux-gnu/bin
checking where to find the target windres... pre-installed
checking where to find the target windmc... pre-installed
checking for clang for target... (cached) yes
checking for clang plugin file for target... checking where to find the target
llvm-config... pre-installed
../configure: line 20463: --libdir: command not found
configure: error: Couldn't find clang plugin file for
x86_64-unknown-linux-gnu-gcc.

My cross-compilation environment is as follows:

$ env
...
CC=/tmp/darwin/bin/aarch64-apple-darwin20.4-clang
CXX=/tmp/darwin/bin/aarch64-apple-darwin20.4-clang++
AR=/usr/bin/llvm-ar
AS=/usr/bin/llvm-as
LD=/tmp/darwin/bin/aarch64-apple-darwin20.4-ld
NM=/usr/bin/llvm-nm
RANLIB=/usr/bin/llvm-ranlib
STRIP=/usr/bin/llvm-strip
OBJCOPY=/usr/bin/llvm-objcopy
READELF=/usr/bin/llvm-readelf
...

I attached the config.log.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Reply via email to