From c5896601823556b14a3d311757ae81264366fd17 Mon Sep 17 00:00:00 2001
From: Oleg Girko
Date: Mon, 4 Mar 2019 01:24:10 +0000
Subject: [PATCH] Replace ENV make variable with MKENV.
ENV variable conflicts with Environment Modules.
Signed-off-by: Oleg Girko
Fixes #3535
---
repos/ports/mk/gnu_build.mk | 2 +-
repos/ports/src/noux-pkg/binutils/target.inc | 4 ++--
repos/ports/src/noux-pkg/gcc/target.inc | 8 ++++----
3 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/repos/ports/mk/gnu_build.mk b/repos/ports/mk/gnu_build.mk
index 947e087e6..40e93a57a 100644
--- a/repos/ports/mk/gnu_build.mk
+++ b/repos/ports/mk/gnu_build.mk
@@ -145,7 +145,7 @@ Makefile reconfigure: $(MAKEFILE_LIST)
#
Makefile reconfigure: env.sh $(SHARED_LIBS)
@$(MSG_CONFIG)$(TARGET)
- $(VERBOSE)source env.sh && $(CONFIGURE_SCRIPT) $(ENV) $(CONFIGURE_ARGS) $(CONFIGURE_OUTPUT_FILTER)
+ $(VERBOSE)source env.sh && $(CONFIGURE_SCRIPT) $(MKENV) $(CONFIGURE_ARGS) $(CONFIGURE_OUTPUT_FILTER)
env.sh:
$(VERBOSE)rm -f $@
diff --git a/repos/ports/src/noux-pkg/binutils/target.inc b/repos/ports/src/noux-pkg/binutils/target.inc
index 141cbbe92..57780ea5a 100644
--- a/repos/ports/src/noux-pkg/binutils/target.inc
+++ b/repos/ports/src/noux-pkg/binutils/target.inc
@@ -7,9 +7,9 @@ CONFIGURE_ARGS = --disable-werror \
#
# Pass CFLAGS and friends to the invokation of 'make' because
# binutils execute 2nd-level configure scripts, which need
-# the 'ENV' as well.
+# the 'MKENV' as well.
#
-MAKE_ENV = $(ENV)
+MAKE_ENV = $(MKENV)
PKG_DIR = $(call select_from_ports,binutils)/src/noux-pkg/binutils
diff --git a/repos/ports/src/noux-pkg/gcc/target.inc b/repos/ports/src/noux-pkg/gcc/target.inc
index 0d3726e18..1538ab375 100644
--- a/repos/ports/src/noux-pkg/gcc/target.inc
+++ b/repos/ports/src/noux-pkg/gcc/target.inc
@@ -22,17 +22,17 @@ CONFIGURE_ARGS = --program-prefix=$(PROGRAM_PREFIX) \
--disable-sjlj-exceptions \
--disable-nls
-ENV += host_configargs="$(HOST_CONFIG_ARGS)" \
+MKENV += host_configargs="$(HOST_CONFIG_ARGS)" \
target_configargs="$(TARGET_CONFIG_ARGS)"
-ENV += CC_FOR_TARGET=$(CC) CXX_FOR_TARGET=$(CXX) GCC_FOR_TARGET=$(CC) CPP_FOR_TARGET="$(CC) -E" \
+MKENV += CC_FOR_TARGET=$(CC) CXX_FOR_TARGET=$(CXX) GCC_FOR_TARGET=$(CC) CPP_FOR_TARGET="$(CC) -E" \
LD_FOR_TARGET=$(LD) AS_FOR_TARGET=$(AS) AR_FOR_TARGET=$(AR)
# libgcc does not evaluate CPPFLAGS_FOR_TARGET, so everything is put into CFLAGS_FOR_TARGET here
-ENV += CFLAGS_FOR_TARGET='-I$(BASE_DIR)/../../tool -DUSE_PT_GNU_EH_FRAME -Dinhibit_libc -fPIC'
+MKENV += CFLAGS_FOR_TARGET='-I$(BASE_DIR)/../../tool -DUSE_PT_GNU_EH_FRAME -Dinhibit_libc -fPIC'
# libsupc++
-ENV += CXXFLAGS_FOR_TARGET='-fPIC'
+MKENV += CXXFLAGS_FOR_TARGET='-fPIC'
MAKE_ENV += GENODE="yes"