Skip to content

Commit a0ebb57

Browse files
committed
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.
1 parent c6a561d commit a0ebb57

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

target.make

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -724,8 +724,13 @@ SHARED_LIBEXT = .so
724724

725725
HAVE_BUNDLES = yes
726726
BUNDLE_LD = $(LD)
727-
BUNDLE_LDFLAGS += -shared -fPIC
727+
ifeq ($(CLANG_CC), yes)
728+
BUNDLE_LDFLAGS += -shared -fPIC -lc++abi
729+
ADDITIONAL_LDFLAGS += -Wl,-E -lc++abi
730+
else
728731
ADDITIONAL_LDFLAGS += -Wl,-E
732+
BUNDLE_LDFLAGS += -shared -fPIC
733+
endif
729734
STATIC_LDFLAGS += -static
730735

731736
# nm on OpenBSD is rather like on Darwin

0 commit comments

Comments
 (0)