Open
Description
Bug report
How to trigger this bug: compile cpython on macOS which has binutil installed(mostly installed by brew)
./configure --prefix=$HOME/.mypy --with-openssl=$HOME/myopenssl
make -j8
and you will see the following error, which said: "ld: warning: ld: warning: ignoring file libpython3.10.a, building for macOS-x86_64 but attempting to link with file built for unknown-unsupported file format ( 0x21 0x3C 0x61 0x72 0x63 0x68 0x3E 0x0A 0x2F 0x20 0x20 0x20 0x20 0x20 0x20 0x20 )"
After some struggling work, I found that there is a bug in file configure:
this test now should fail to distinguish the real gcc and the llvm-gcc; you can test on your mac;
another thing should be noticed is that it's better to use libtool for archiving the object files rather than the ar( if brew install binutil ,the ar is prone to misuse) ; At least, use the xcrun -find ar
is another choice.
I will submit a PR soon. Please Review