From f702b900d8b59122ea52ce5791af8085d4ce88bb Mon Sep 17 00:00:00 2001 From: Brian Anderson Date: Thu, 6 Jun 2013 17:27:22 -0700 Subject: [PATCH] mk: Fix _RUST_STAGEX variables under cross compile. Fix incoming --- mk/rt.mk | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/mk/rt.mk b/mk/rt.mk index d8d74d0d0e3..d61f84cc946 100644 --- a/mk/rt.mk +++ b/mk/rt.mk @@ -53,6 +53,15 @@ define DEF_RUNTIME_TARGETS RUNTIME_CFLAGS_$(1)_$(2) = -D_RUST_STAGE$(2) RUNTIME_CXXFLAGS_$(1)_$(2) = -D_RUST_STAGE$(2) +# XXX: Like with --cfg stage0, pass the defines for stage1 to the stage0 +# build of non-build-triple host compilers +ifeq ($(2),0) +ifneq ($(strip $(CFG_BUILD_TRIPLE)),$(strip $(1))) +RUNTIME_CFLAGS_$(1)_$(2) = -D_RUST_STAGE1 +RUNTIME_CXXFLAGS_$(1)_$(2) = -D_RUST_STAGE1 +endif +endif + RUNTIME_CXXS_$(1)_$(2) := \ rt/sync/timer.cpp \ rt/sync/lock_and_signal.cpp \