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 11, 2024
1 parent c6a561d commit a0ebb57
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion 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)
BUNDLE_LDFLAGS += -shared -fPIC
ifeq ($(CLANG_CC), yes)
BUNDLE_LDFLAGS += -shared -fPIC -lc++abi
ADDITIONAL_LDFLAGS += -Wl,-E -lc++abi
else
ADDITIONAL_LDFLAGS += -Wl,-E
BUNDLE_LDFLAGS += -shared -fPIC
endif
STATIC_LDFLAGS += -static

# nm on OpenBSD is rather like on Darwin
Expand Down

0 comments on commit a0ebb57

Please sign in to comment.