48 lines
1.8 KiB
Diff
48 lines
1.8 KiB
Diff
From 9b84789c22bec237835cbee24a26e028730c4c0e Mon Sep 17 00:00:00 2001
|
|
From: Lucien Mueller <lucien.mueller@netmodule.com>
|
|
Date: Fri, 21 Feb 2020 17:48:24 +0100
|
|
Subject: [PATCH] Revert "Fix the handling of defaults from the environment."
|
|
|
|
This reverts commit d0e0864c2802860ff561fe0b39939b63d38b8c70.
|
|
---
|
|
SConstruct | 16 ++++++++--------
|
|
1 file changed, 8 insertions(+), 8 deletions(-)
|
|
|
|
diff --git a/SConstruct b/SConstruct
|
|
index 5169d8f64..46c78a959 100644
|
|
--- a/SConstruct
|
|
+++ b/SConstruct
|
|
@@ -383,21 +383,21 @@ env['SC_PYTHON'] = sys.executable # Path to SCons Python
|
|
# with multi-word CPPFLAGS/LDFLAGS/SHLINKFLAGS values; you'll have to
|
|
# explicitly quote them or (better yet) use the "=" form of GNU option
|
|
# settings.
|
|
-# Scons also uses different internal names than most other build-systems.
|
|
-# So we rely on MergeFlags/ParseFlags to do the right thing for us.
|
|
env['STRIP'] = "strip"
|
|
env['PKG_CONFIG'] = "pkg-config"
|
|
-for i in ["AR", "CC", "CXX", "LD",
|
|
- "PKG_CONFIG", "STRIP", "TAR"]:
|
|
+for i in ["AR", "ARFLAGS", "CC", "CCFLAGS", "CFLAGS", "CXX", "CXXFLAGS", "LD",
|
|
+ "LINKFLAGS", "PKG_CONFIG", "STRIP", "TAR"]:
|
|
if i in os.environ:
|
|
j = i
|
|
if i == "LD":
|
|
i = "SHLINK"
|
|
- env[i] = os.getenv(j)
|
|
-for i in ["ARFLAGS", "CFLAGS", "CXXFLAGS", "LDFLAGS", "SHLINKFLAGS",
|
|
- "CPPFLAGS", "CCFLAGS", "LINKFLAGS"]:
|
|
+ if i in ("CFLAGS", "CCFLAGS", "LINKFLAGS"):
|
|
+ env.Replace(**{j: Split(os.getenv(i))})
|
|
+ else:
|
|
+ env.Replace(**{j: os.getenv(i)})
|
|
+for flag in ["LDFLAGS", "SHLINKFLAGS", "CPPFLAGS"]:
|
|
if i in os.environ:
|
|
- env.MergeFlags(Split(os.getenv(i)))
|
|
+ env.MergeFlags({flag: Split(os.getenv(flag))})
|
|
|
|
|
|
# Keep scan-build options in the environment
|
|
--
|
|
2.24.0.rc1
|
|
|