Add support for OpenBSD to build with clang, basically link against -lc++abi

since when using clang, the GCC internals aren't around.

I had it in a ugly way hardcoded in the GNUstep ports tree for years.

Tested on amd64, with gcc 11 from packages, and linking against gcc libobjc,
as well as using base clang, and building against libobjc2 from packages.
This commit is contained in:
Sebastian Reitenbach 2024-11-11 22:18:15 +01:00
parent c6a561d713
commit 7cd2f05644

View file

@ -724,8 +724,13 @@ SHARED_LIBEXT = .so
HAVE_BUNDLES = yes
BUNDLE_LD = $(LD)
ifeq ($(CLANG_CC), yes)
BUNDLE_LDFLAGS += -shared -fPIC -lc++abi
ADDITIONAL_LDFLAGS += -Wl,-E -lc++abi
else
BUNDLE_LDFLAGS += -shared -fPIC
ADDITIONAL_LDFLAGS += -Wl,-E
endif
STATIC_LDFLAGS += -static
# nm on OpenBSD is rather like on Darwin