Restore buildability on rosa2016.1

Commit 6aceefa0 lost using CXXFLAGS / LDFLAGS when building gn.
Fix incorrect position of unset() (noted by alzim@, thanks to him)
This commit is contained in:
Mikhail Novosyolov 2021-03-13 14:56:24 +03:00
parent 7a5cc46d93
commit ba619fbf46
2 changed files with 8 additions and 2 deletions

View file

@ -3,6 +3,7 @@ From: Alexey Gladkov <legion@altlinux.org>
Date: Mon, 27 Aug 2018 14:59:55 +0300 Date: Mon, 27 Aug 2018 14:59:55 +0300
Subject: [PATCH] ALT: allow to override clang through env variables Subject: [PATCH] ALT: allow to override clang through env variables
[ mikhailnov@ROSA: added *FLAGS envs. ]
--- ---
build/toolchain/gcc_toolchain.gni | 7 +++++++ build/toolchain/gcc_toolchain.gni | 7 +++++++
1 file changed, 7 insertions(+) 1 file changed, 7 insertions(+)
@ -11,7 +12,7 @@ diff --git a/build/toolchain/gcc_toolchain.gni b/build/toolchain/gcc_toolchain.g
index 6e3c02444d0..bc6c6d705d3 100644 index 6e3c02444d0..bc6c6d705d3 100644
--- a/build/toolchain/gcc_toolchain.gni --- a/build/toolchain/gcc_toolchain.gni
+++ b/build/toolchain/gcc_toolchain.gni +++ b/build/toolchain/gcc_toolchain.gni
@@ -627,20 +627,27 @@ template("clang_toolchain") { @@ -627,20 +627,32 @@ template("clang_toolchain") {
gcc_toolchain(target_name) { gcc_toolchain(target_name) {
prefix = rebase_path("$clang_base_path/bin", root_build_dir) prefix = rebase_path("$clang_base_path/bin", root_build_dir)
@ -28,6 +29,11 @@ index 6e3c02444d0..bc6c6d705d3 100644
+ readelf = getenv("READELF") + readelf = getenv("READELF")
+ ar = getenv("AR") + ar = getenv("AR")
+ nm = getenv("NM") + nm = getenv("NM")
+
+ extra_cflags = getenv("CFLAGS")
+ extra_cppflags = getenv("CPPFLAGS")
+ extra_cxxflags = getenv("CXXFLAGS")
+ extra_ldflags = getenv("LDFLAGS")
+ +
forward_variables_from(invoker, forward_variables_from(invoker,
[ [

View file

@ -548,8 +548,8 @@ CXXFLAGS="-nostdinc++ \
-I%{_includedir}/libstdc++-gcc10 \ -I%{_includedir}/libstdc++-gcc10 \
-I%{_includedir}/libstdc++-gcc10/%{_host} \ -I%{_includedir}/libstdc++-gcc10/%{_host} \
" \ " \
unset LDFLAGS CXXFLAGS
%{__python} tools/gn/bootstrap/bootstrap.py --gn-gen-args='%{gn_config}' %{__python} tools/gn/bootstrap/bootstrap.py --gn-gen-args='%{gn_config}'
unset LDFLAGS CXXFLAGS
out/Release/gn gen --script-executable=%{__python} --args='%{gn_config}' out/Release out/Release/gn gen --script-executable=%{__python} --args='%{gn_config}' out/Release
pushd out/Release pushd out/Release