From 75d48a533d01eeb1bb5e6761484a4dece9408fc1 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Sun, 22 Nov 2020 19:09:58 +0900 Subject: [PATCH] rubyspec-capiext: Use plain DLDFLAGS without flags for libruby --- defs/gmake.mk | 5 +++-- template/Makefile.in | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/defs/gmake.mk b/defs/gmake.mk index ec9575a4dc..a6d56175c2 100644 --- a/defs/gmake.mk +++ b/defs/gmake.mk @@ -386,10 +386,11 @@ update-deps: # order-only-prerequisites doesn't work for $(RUBYSPEC_CAPIEXT) # because the same named directory exists in the source tree. -$(RUBYSPEC_CAPIEXT)/%.$(DLEXT): $(srcdir)/$(RUBYSPEC_CAPIEXT)/%.c $(srcdir)/$(RUBYSPEC_CAPIEXT)/rubyspec.h $(RUBY_H_INCLUDES) +$(RUBYSPEC_CAPIEXT)/%.$(DLEXT): $(srcdir)/$(RUBYSPEC_CAPIEXT)/%.c $(srcdir)/$(RUBYSPEC_CAPIEXT)/rubyspec.h $(RUBY_H_INCLUDES) $(LIBRUBY_SO) $(ECHO) building $@ $(Q) $(MAKEDIRS) $(@D) - $(Q) $(DLDSHARED) $(DLDFLAGS) $(ARCH_FLAG) $(CFLAGS) $(INCFLAGS) $(CPPFLAGS) $(OUTFLAG)$@ $< + $(Q) $(DLDSHARED) $(XDLDFLAGS) $(XLDFLAGS) $(ARCH_FLAG) $(ARCH_FLAG) $(CFLAGS) $(INCFLAGS) $(CPPFLAGS) $(OUTFLAG)$@ $< $(LIBRUBY_SO) $(Q) $(RMALL) $@.* + rubyspec-capiext: $(patsubst %.c,$(RUBYSPEC_CAPIEXT)/%.$(DLEXT),$(notdir $(wildcard $(srcdir)/$(RUBYSPEC_CAPIEXT)/*.c))) @ $(NULLCMD) diff --git a/template/Makefile.in b/template/Makefile.in index 08e47e7744..f5a31499b3 100644 --- a/template/Makefile.in +++ b/template/Makefile.in @@ -98,7 +98,7 @@ MJIT_CFLAGS = @MJIT_CFLAGS@ MJIT_OPTFLAGS = @MJIT_OPTFLAGS@ MJIT_DEBUGFLAGS = @MJIT_DEBUGFLAGS@ MJIT_LDSHARED = @MJIT_LDSHARED@ -MJIT_DLDFLAGS = @DLDFLAGS@ +MJIT_DLDFLAGS = $(XDLDFLAGS) MJIT_HEADER = rb_mjit_header.h MJIT_MIN_HEADER_NAME = rb_mjit_min_header-$(RUBY_PROGRAM_VERSION).h MJIT_MIN_HEADER = $(MJIT_HEADER_BUILD_DIR)/$(MJIT_MIN_HEADER_NAME) @@ -113,6 +113,7 @@ MISSING = @LIBOBJS@ @ALLOCA@ ENABLE_SHARED = @ENABLE_SHARED@ LDSHARED = @LIBRUBY_LDSHARED@ DLDSHARED = @DLDSHARED@ +XDLDFLAGS = @DLDFLAGS@ DLDFLAGS = @LIBRUBY_DLDFLAGS@ $(XLDFLAGS) $(ARCH_FLAG) SOLIBS = @SOLIBS@ ENABLE_DEBUG_ENV = @ENABLE_DEBUG_ENV@