qemu, and using gcc45+ compilers on systems set up with LibCxxOnOlderSystems and libc++
Ken Cunningham
ken.cunningham.webuse at gmail.com
Sun Sep 11 20:25:55 PDT 2016
I would like to try building qemu, but it doesn't seem to be able to build with clang-3.7 or clang-3.8 (on 10.68 with LibCxxOnOlderSystems and libc++)
the error for both
:info:configure ERROR: Your compiler does not support the __thread specifier for
:info:configure Thread-Local Storage (TLS). Please upgrade to a version that does.
this error is out on the net, as far as I can see doesn't have any present fixes; the recommended next step is to try with a newer version of gcc, like 4.9
but
I am not totally sure how to use gcc* versions, building cxx code, when my system has been set up for LibCxxOnOlderSystems, and all the installed ports to date link against libc++.
I _think_ I can just
sudo port install gcc49
for example. This would build gcc49 using clang, and I believe that command would link gcc itself against libc++, which I guess is no big deal and maybe a fine thing.
gcc49 has lots of dependents, including most of the same ones as clang-3.7, which I certainly don't want to mess with. Hopefully they would be untouched.
Then - assuming that goes OK - when I try to build something with gcc49, according to this page:
<http://libcxx.llvm.org/docs/UsingLibcxx.html#using-libc-with-gcc>
I would do something like this with the flags to keep gcc on trac with libc++.
g++ -nostdinc++ -I<libcxx-install-prefix>/include/c++/v1 \
test.cpp -nodefaultlibs -lc++ -lc++abi -lm -lc -lgcc_s -lgcc
Have to set that collection into the CXX flags and LDFLAGS, I would think.
Just a bit nervous about blowing things up...
Any thoughts, comments, or experience much appreciated....
Ken
More information about the macports-users
mailing list