[MacPorts] #55592: libunwind @5.0.1: unrecognized command line option '-stdlib=libstdc++' with clang-3.4
MacPorts
noreply at macports.org
Wed Dec 27 20:38:11 UTC 2017
#55592: libunwind @5.0.1: unrecognized command line option '-stdlib=libstdc++' with
clang-3.4
---------------------------+----------------------
Reporter: sideeffect42 | Owner: jeremyhu
Type: defect | Status: assigned
Priority: Normal | Milestone:
Component: ports | Version: 2.4.2
Resolution: | Keywords:
Port: libunwind |
---------------------------+----------------------
Comment (by sideeffect42):
I do agree that clang is a bad choice on PowerPC. So many ports that just
don't compile properly with clang.
Does anyone know more about how clang works internally?
I just set up this little test to figure out what's going on and it looks
like clang is just a wrapper for GCC:
hello.cxx:
{{{
#include <cstdio>
int main() {
printf("Hello World\n");
}
}}}
{{{
$ clang++-mp-3.4 -v -stdlib=libstdc++ hello.cxx
clang version 3.4.2 (tags/RELEASE_34/dot2-final)
Target: powerpc-apple-darwin9.8.0
Thread model: posix
Selected GCC installation:
"/opt/local/libexec/llvm-3.4/bin/clang" -cc1 -triple powerpc-apple-
darwin9.8.0 -S -disable-free -disable-llvm-verifier -main-file-name
hello.cxx -mrelocation-model static -mdisable-fp-elim -fmath-errno
-target-linker-version 127.2 -v -resource-dir
/opt/local/libexec/llvm-3.4/bin/../lib/clang/3.4.2 -stdlib=libstdc++
-fdeprecated-macro -fno-dwarf2-cfi-asm -fno-dwarf-directory-asm -fno-
autolink -fdebug-compilation-dir /tmp -ferror-limit 19 -fmessage-length
115 -mstackrealign -fobjc-runtime=gcc -fcxx-exceptions -fexceptions
-fdiagnostics-show-option -fcolor-diagnostics -vectorize-slp -o
/var/folders/+n/+nOIyIexGQyIeCv9kUV2mU+++TI/-Tmp-/hello-b09da6.s -x c++
hello.cxx
clang -cc1 version 3.4.2 based upon LLVM 3.4.2 default target powerpc-
apple-darwin9.8.0
ignoring nonexistent directory "/usr/include/c++/4.2.1"
ignoring nonexistent directory "/usr/include/c++/4.2.1/powerpc-apple-
darwin10/"
ignoring nonexistent directory "/usr/include/c++/4.2.1/backward"
#include "..." search starts here:
#include <...> search starts here:
/usr/include/c++/4.0.0
/usr/include/c++/4.0.0/powerpc-apple-darwin8
/usr/include/c++/4.0.0/backward
/usr/local/include
/opt/local/libexec/llvm-3.4/bin/../lib/clang/3.4.2/include
/usr/include
/System/Library/Frameworks (framework directory)
/Library/Frameworks (framework directory)
End of search list.
"/opt/local/bin/g++" -v -stdlib=libstdc++ -c -arch ppc -m32 -o
/var/folders/+n/+nOIyIexGQyIeCv9kUV2mU+++TI/-Tmp-/hello-6a3a66.o -x
assembler /var/folders/+n/+nOIyIexGQyIeCv9kUV2mU+++TI/-Tmp-/hello-b09da6.s
Using built-in specs.
COLLECT_GCC=/opt/local/bin/g++
g++: error: unrecognized command line option '-stdlib=libstdc++'; did you
mean '-static-libstdc++'?
Target: ppc-apple-darwin9
Configured with:
/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_lang_gcc7/gcc7/work/gcc-7.2.0/configure
--prefix=/opt/local --build=ppc-apple-darwin9 --enable-
languages=c,c++,objc,obj-c++,lto,fortran --libdir=/opt/local/lib/gcc7
--includedir=/opt/local/include/gcc7 --infodir=/opt/local/share/info
--mandir=/opt/local/share/man --datarootdir=/opt/local/share/gcc-7 --with-
local-prefix=/opt/local --with-system-zlib --disable-nls --program-
suffix=-mp-7 --with-gxx-include-dir=/opt/local/include/gcc7/c++/ --with-
gmp=/opt/local --with-mpfr=/opt/local --with-mpc=/opt/local --with-
isl=/opt/local --enable-stage1-checking --disable-multilib --enable-lto
--enable-libstdcxx-time --with-build-config=bootstrap-debug --with-
as=/opt/local/bin/as --with-ld=/opt/local/bin/ld --with-
ar=/opt/local/bin/ar --with-bugurl=https://trac.macports.org/newticket
--disable-tls --with-pkgversion='MacPorts gcc7 7.2.0_0'
Thread model: posix
gcc version 7.2.0 (MacPorts gcc7 7.2.0_0)
clang: error: assembler (via gcc) command failed with exit code 1 (use -v
to see invocation)
}}}
--
Ticket URL: <https://trac.macports.org/ticket/55592#comment:5>
MacPorts <https://www.macports.org/>
Ports system for macOS
More information about the macports-tickets
mailing list