Skip to content

Commit

Permalink
Add support for OpenBSD to build with clang, basically link against -…
Browse files Browse the repository at this point in the history
…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.
  • Loading branch information
buzzdeee committed Nov 12, 2024
1 parent c6a561d commit 7cd2f05
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions target.make
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 7cd2f05

Please sign in to comment.