controllab / fmi-export-20sim

FMI export code generation template for 20-sim
GNU General Public License v3.0
3 stars 4 forks source link

Strip needs -x option with XCode #36

Closed tomlankhorst closed 7 years ago

tomlankhorst commented 7 years ago

When building an FMU on Mac OS, strip is not able to remove some symbols resulting in an error:

/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/strip: symbols referenced by indirect symbol table entries that can't be stripped in: /Users/tomlankhorst/20sim/pid/fmu/project/gcc/controller.so
_malloc
_strcpy
_strlen
_strncpy
_strtol
dyld_stub_binder
__DefaultRuneLocale
make: *** [dll] Error 1

This is fixed by adding the -x option to strip in the Makefile to only remove local symbols.

Alternatively, using GCC's gstrip works as well.