diff --git a/common.mk b/common.mk index f3c279aeccf7f3..4202dbddb2a124 100644 --- a/common.mk +++ b/common.mk @@ -226,7 +226,7 @@ $(PRISM_BUILD_DIR)/.time $(PRISM_BUILD_DIR)/util/.time: $(Q) $(MAKEDIRS) $(@D) @$(NULLCMD) > $@ -EXPORTOBJS = $(DLNOBJ) \ +EXPORTOBJS = $(DLNOBJS) \ localeinit.$(OBJEXT) \ loadpath.$(OBJEXT) \ $(COMMONOBJS) diff --git a/configure.ac b/configure.ac index a37bdce0749a09..1a63e1fbb2830c 100644 --- a/configure.ac +++ b/configure.ac @@ -4127,7 +4127,7 @@ AS_IF([test -n "$RUST_LIB"], [ ]) # absolute path to stop the "target" dir in src dir from interfering through VPATH - RUST_LIB="$(pwd)/${RUST_LIB}" + RUST_LIB='$(TOP_BUILD_DIR)'/"${RUST_LIB}" ]) dnl These variables end up in ::RbConfig::CONFIG @@ -4137,14 +4137,14 @@ AC_SUBST(RUSTC_FLAGS)dnl user-configurable rustc compiler flags AC_SUBST(CARGO)dnl Cargo command for Rust builds AC_SUBST(CARGO_BUILD_ARGS)dnl for selecting Rust build profiles AC_SUBST(YJIT_SUPPORT)dnl what flavor of YJIT the Ruby build includes -AC_SUBST(YJIT_LIBS)dnl the .a library of YJIT -AC_SUBST(YJIT_OBJ)dnl for optionally building the C parts of YJIT +AC_SUBST(X_YJIT_LIBS, [$YJIT_LIBS])dnl the .a library of YJIT +AC_SUBST(X_YJIT_OBJ, [$YJIT_OBJ])dnl for optionally building the C parts of YJIT AC_SUBST(ZJIT_SUPPORT)dnl what flavor of ZJIT the Ruby build includes -AC_SUBST(ZJIT_LIBS)dnl path to the .a library of ZJIT -AC_SUBST(ZJIT_OBJ)dnl for optionally building the C parts of ZJIT -AC_SUBST(JIT_OBJ)dnl for optionally building C glue code for Rust FFI -AC_SUBST(RUST_LIB)dnl path to the rust .a library that contains either or both JITs -AC_SUBST(RLIB_DIR)dnl subpath of build directory for .rlib files +AC_SUBST(X_ZJIT_LIBS, [$ZJIT_LIBS])dnl path to the .a library of ZJIT +AC_SUBST(X_ZJIT_OBJ, [$ZJIT_OBJ])dnl for optionally building the C parts of ZJIT +AC_SUBST(X_JIT_OBJ, [$JIT_OBJ])dnl for optionally building C glue code for Rust FFI +AC_SUBST(X_RUST_LIB, [$RUST_LIB])dnl path to the rust .a library that contains either or both JITs +AC_SUBST(X_RLIB_DIR, [$RLIB_DIR])dnl subpath of build directory for .rlib files AC_SUBST(JIT_CARGO_SUPPORT)dnl "no" or the cargo profile of the rust code } @@ -4178,11 +4178,11 @@ AS_IF([test x"$SOEXT" = xdll], [ ]) AC_SUBST(XSYMBOLS_IN_EMPTYLIB, "${rb_cv_symbols_in_emptylib}") -DLNOBJ=dln.o +DLNOBJS=dln.o AC_ARG_ENABLE(dln, AS_HELP_STRING([--disable-dln], [disable dynamic link feature]), - [test "$enableval" = yes || DLNOBJ=dmydln.o]) -AC_SUBST(DLNOBJ) + [test "$enableval" = yes || DLNOBJS=dmydln.o]) +AC_SUBST(DLNOBJS) MINIDLNOBJ=dmydln.o AS_CASE(["$target_os"], diff --git a/template/Makefile.in b/template/Makefile.in index e87f52589e285e..9f89b2eba3ce3e 100644 --- a/template/Makefile.in +++ b/template/Makefile.in @@ -105,21 +105,21 @@ USE_RUBYGEMS = @USE_RUBYGEMS@ USE_RUBYGEMS_ = $(USE_RUBYGEMS:yes=) CPPFLAGS = @CPPFLAGS@ $(USE_RUBYGEMS_:no=-DDISABLE_RUBYGEMS=1) TOP_BUILD_DIR=@abs_top_builddir@ -JIT_OBJ=@JIT_OBJ@ +JIT_OBJ=@X_JIT_OBJ@ YJIT_SUPPORT=@YJIT_SUPPORT@ -YJIT_LIBS=@YJIT_LIBS@ -YJIT_OBJ=@YJIT_OBJ@ +YJIT_LIBS=@X_YJIT_LIBS@ +YJIT_OBJ=@X_YJIT_OBJ@ ZJIT_SUPPORT=@ZJIT_SUPPORT@ -ZJIT_LIBS=@ZJIT_LIBS@ -ZJIT_OBJ=@ZJIT_OBJ@ +ZJIT_LIBS=@X_ZJIT_LIBS@ +ZJIT_OBJ=@X_ZJIT_OBJ@ JIT_CARGO_SUPPORT=@JIT_CARGO_SUPPORT@ CARGO_TARGET_DIR=@abs_top_builddir@/target CARGO_BUILD_ARGS=@CARGO_BUILD_ARGS@ ZJIT_TEST_FEATURES=@ZJIT_TEST_FEATURES@ JIT_RUST_FLAGS=@JIT_RUST_FLAGS@ RUSTC_FLAGS=@RUSTC_FLAGS@ -RLIB_DIR=@RLIB_DIR@ -RUST_LIB=@RUST_LIB@ +RLIB_DIR=@X_RLIB_DIR@ +RUST_LIB=@X_RUST_LIB@ RUST_LIBOBJ = $(RUST_LIB:.a=.@OBJEXT@) LDFLAGS = @STATIC@ $(CFLAGS) @LDFLAGS@ EXE_LDFLAGS = $(LDFLAGS) @@ -137,7 +137,7 @@ SOLIBS = @SOLIBS@ ENABLE_DEBUG_ENV = @ENABLE_DEBUG_ENV@ MAINLIBS = @MAINLIBS@ ARCHMINIOBJS = @MINIOBJS@ -DLNOBJ = @DLNOBJ@ +DLNOBJS = @DLNOBJS@ ENCOBJS = @ENCOBJS@ EXTOBJS = @EXTOBJS@ BUILTIN_ENCOBJS = @BUILTIN_ENCOBJS@ diff --git a/win32/Makefile.sub b/win32/Makefile.sub index e5c099972d2860..905ed3040effbb 100644 --- a/win32/Makefile.sub +++ b/win32/Makefile.sub @@ -322,7 +322,7 @@ LIBS = $(LIBS) imagehlp.lib shlwapi.lib bcrypt.lib $(EXTLIBS) MISSING = crypt.obj ffs.obj langinfo.obj lgamma_r.obj strlcat.obj strlcpy.obj win32/win32.obj win32/file.obj setproctitle.obj MISSING = $(MISSING) explicit_bzero.obj memrchr.obj !endif -DLNOBJ = dln.obj +DLNOBJS = dln.obj !if "$(ARCH)" == "x64" COROUTINE_OBJ = coroutine/win64/Context.obj