YJIT: Build on BSD platforms with GNU make (#8591)

This commit is contained in:
Thomas Hurst 2023-10-05 18:23:51 +01:00 committed by GitHub
parent 8d8fe54355
commit fd22d5debb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -42,11 +42,10 @@ endif
yjit-libobj: $(YJIT_LIBOBJ)
# Note, BSD handling is in yjit/not_gmake.mk
YJIT_LIB_SYMBOLS = $(YJIT_LIBS:.a=).symbols
$(YJIT_LIBOBJ): $(YJIT_LIBS)
$(ECHO) 'partial linking $(YJIT_LIBS) into $@'
ifneq ($(findstring linux,$(target_os)),)
ifneq ($(or $(findstring linux,$(target_os)),$(findstring bsd,$(target_os))),$(findstring dragonfly,$(target_os))),)
$(Q) $(LD) -r -o $@ --whole-archive $(YJIT_LIBS)
-$(Q) $(OBJCOPY) --wildcard --keep-global-symbol='$(SYMBOL_PREFIX)rb_*' $(@)
else ifneq ($(findstring darwin,$(target_os)),)