summaryrefslogtreecommitdiff
path: root/yjit
diff options
context:
space:
mode:
authorAlan Wu <XrXr@users.noreply.github.com>2023-10-05 17:31:54 -0400
committerAlan Wu <XrXr@users.noreply.github.com>2023-10-05 17:31:54 -0400
commit8cb906d7067d9b4cdf7971e49f185c737f3ee1f9 (patch)
tree4b91beb7d54cfac498b0441bdfbde2c33509c0cf /yjit
parent13bde94a9f017e04f01f090b27b98d0f4eb69b84 (diff)
YJIT: Simplify linker flavor check
By not allowlisting every OS that could have a GNU flavor linker, it's also a bigger tent
Diffstat (limited to 'yjit')
-rw-r--r--yjit/yjit.mk8
1 files changed, 3 insertions, 5 deletions
diff --git a/yjit/yjit.mk b/yjit/yjit.mk
index 6df588581a..1a8a3b8869 100644
--- a/yjit/yjit.mk
+++ b/yjit/yjit.mk
@@ -45,13 +45,11 @@ yjit-libobj: $(YJIT_LIBOBJ)
YJIT_LIB_SYMBOLS = $(YJIT_LIBS:.a=).symbols
$(YJIT_LIBOBJ): $(YJIT_LIBS)
$(ECHO) 'partial linking $(YJIT_LIBS) into $@'
-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)),)
+ifneq ($(findstring darwin,$(target_os)),)
$(Q) $(CC) -nodefaultlibs -r -o $@ -exported_symbols_list $(YJIT_LIB_SYMBOLS) $(YJIT_LIBS)
else
- false
+ $(Q) $(LD) -r -o $@ --whole-archive $(YJIT_LIBS)
+ -$(Q) $(OBJCOPY) --wildcard --keep-global-symbol='$(SYMBOL_PREFIX)rb_*' $(@)
endif
# For Darwin only: a list of symbols that we want the glommed Rust static lib to export.