Skip to content

build: don't use undocumented -export-dynamic option

GNU libtool is documented to support -export-dynamic and GNU ld is documented to support --export-dynamic. However, GCC isn't documented to support them. While GCC does support -export-dynamic for backwards compatibility, Clang doesn't support it and interprets it wrongly. This causes warnings to be shown during linking because Clang splits it into '-e xport-dynamic' and the linker can't find 'xport-dynamic' symbol.

This fixes warnings when compiling with Clang.

[59/125] Linking target tests/testing-util/libtesting-util-1.0.so.
/usr/bin/ld: warning: cannot find entry symbol xport-dynamic; defaulting to 0x2000
[70/125] Linking target tests/libpeas/introspection/libintrospection-1.0.so.
/usr/bin/ld: warning: cannot find entry symbol xport-dynamic; defaulting to 0x2000
[75/125] Linking target tests/libpeas/testing/liblibpeas-testing-1.0.so.
/usr/bin/ld: warning: cannot find entry symbol xport-dynamic; defaulting to 0x3000
[110/125] Linking target tests/libpeas-gtk/testing/liblibpeas-gtk-testing-1.0.so.
/usr/bin/ld: warning: cannot find entry symbol xport-dynamic; defaulting to 0x6000

Merge request reports