diff --git a/common.mk b/common.mk index 6183af9be2..17116c4c47 100644 --- a/common.mk +++ b/common.mk @@ -180,7 +180,7 @@ EXTMK_ARGS = $(SCRIPT_ARGS) --extension $(EXTS) --extstatic $(EXTSTATIC) \ --make-flags="V=$(V) MINIRUBY='$(MINIRUBY)'" \ --gnumake=$(gnumake) --extflags="$(EXTLDFLAGS)" \ -- -INSTRUBY = $(SUDO) $(RUNRUBY) -r./$(arch)-fake $(tooldir)/rbinstall.rb +INSTRUBY = $(SUDO) $(INSTRUBY_ENV) $(RUNRUBY) -r./$(arch)-fake $(tooldir)/rbinstall.rb INSTRUBY_ARGS = $(SCRIPT_ARGS) \ --data-mode=$(INSTALL_DATA_MODE) \ --prog-mode=$(INSTALL_PROG_MODE) \ diff --git a/defs/gmake.mk b/defs/gmake.mk index f093fd4e26..316ff18c20 100644 --- a/defs/gmake.mk +++ b/defs/gmake.mk @@ -6,6 +6,10 @@ override mflags := $(filter-out -j%,$(MFLAGS)) MSPECOPT += $(if $(filter -j%,$(MFLAGS)),-j) nproc = $(subst -j,,$(filter -j%,$(MFLAGS))) +ifneq ($(filter %darwin%,$(arch)),) +INSTRUBY_ENV += SDKROOT=/ +endif + CHECK_TARGETS := great exam love check test check% test% btest% # expand test targets, and those dependents TEST_TARGETS := $(filter $(CHECK_TARGETS),$(MAKECMDGOALS))