2015-08-23 22:45:53 +02:00
|
|
|
### OSXCROSS BUGS ###
|
|
|
|
|
|
|
|
-------------
|
|
|
|
|
2015-08-23 22:58:10 +02:00
|
|
|
***ISSUE:***
|
2015-08-23 22:45:53 +02:00
|
|
|
|
|
|
|
GCH generation does not work with `gcc` or `clang++-gstdc++`/`-foc-use-gcc-libstdc++`
|
|
|
|
if `-c` or `-x<lang>-header` is **not** passed to the compiler.
|
|
|
|
|
|
|
|
Example:
|
|
|
|
|
|
|
|
$ o64-gcc test.h
|
|
|
|
Undefined symbols for architecture x86_64:
|
|
|
|
"_main", referenced from:
|
|
|
|
start in crt1.10.6.o
|
|
|
|
|
|
|
|
This is due to `-Wl,-no_compact_unwind` being passed to the compiler under the hood.
|
|
|
|
|
|
|
|
Example:
|
|
|
|
|
|
|
|
$ x86_64-apple-darwin14-base-gcc
|
|
|
|
x86_64-apple-darwin14-base-gcc: fatal error: no input files
|
|
|
|
|
|
|
|
$ x86_64-apple-darwin14-base-gcc -Wl,-no_compact_unwind
|
|
|
|
Undefined symbols for architecture x86_64:
|
|
|
|
"_main", referenced from:
|
|
|
|
start in crt1.10.6.o
|
|
|
|
ld: symbol(s) not found for architecture x86_64
|
|
|
|
|
2015-08-23 22:58:10 +02:00
|
|
|
***WORKAROUND:***
|
2015-08-23 22:45:53 +02:00
|
|
|
|
|
|
|
Add `-c` or `-x<lang>-header` to the compiler flags.
|
|
|
|
|
|
|
|
Example:
|
|
|
|
|
|
|
|
o64-clang++-gstdc++ test.hpp # BAD
|
|
|
|
o64-clang++-gstdc++ -xc++-header test.hpp # OK
|
|
|
|
o64-clang++-gstdc++ test.hpp -c # OK
|
|
|
|
o64-g++ test.hpp -c # OK
|
|
|
|
|
|
|
|
-------------
|