[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [lmi] master a7d8198 2/2: Ascertain gcc version more relia
From: |
Greg Chicares |
Subject: |
[lmi-commits] [lmi] master a7d8198 2/2: Ascertain gcc version more reliably |
Date: |
Fri, 9 Oct 2020 18:35:16 -0400 (EDT) |
branch: master
commit a7d8198834c913e1da0f993eb46425bbe6712e42
Author: Gregory W. Chicares <gchicares@sbcglobal.net>
Commit: Gregory W. Chicares <gchicares@sbcglobal.net>
Ascertain gcc version more reliably
For x86_64-pc-linux-gnu, wx's build directory was:
/opt/lmi/local/gcc_x86_64-pc-linux-gnu/wx-ad_hoc/lmi-gcc-/
but now it is:
/opt/lmi/local/gcc_x86_64-pc-linux-gnu/wx-ad_hoc/lmi-gcc-10/
---
install_wx.sh | 2 +-
install_wxpdfdoc.sh | 2 +-
workhorse.make | 10 ++++++++++
3 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/install_wx.sh b/install_wx.sh
index ca99a5f..b668b5e 100755
--- a/install_wx.sh
+++ b/install_wx.sh
@@ -55,7 +55,7 @@ case "$build_type" in
esac
# Distinguish wx dll by host type, compiler version, and wx SHA1.
-gcc_version=$("${mingw_bin_dir}${LMI_TRIPLET}-$LMI_COMPILER" -dumpversion|tr
-d '\r')
+gcc_version=$(make show_gcc_version)
vendor=${LMI_TRIPLET}-$gcc_version-$(git rev-parse --short HEAD:third_party/wx)
# Configuration reference:
diff --git a/install_wxpdfdoc.sh b/install_wxpdfdoc.sh
index f2fd2cd..4dd778f 100755
--- a/install_wxpdfdoc.sh
+++ b/install_wxpdfdoc.sh
@@ -72,7 +72,7 @@ config_options="
cd "$wxpdfdoc_dir"
autoreconf --verbose
-gcc_version=$("${mingw_bin_dir}${LMI_TRIPLET}-$LMI_COMPILER" -dumpversion|tr
-d '\r')
+gcc_version=$(make show_gcc_version)
build_dir="$exec_prefix/wxpdfdoc-ad_hoc/lmi-$LMI_COMPILER-$gcc_version"
if [ "$wxpdfdoc_skip_clean" != 1 ]
diff --git a/workhorse.make b/workhorse.make
index 28da707..3656348 100644
--- a/workhorse.make
+++ b/workhorse.make
@@ -1571,6 +1571,16 @@ clean_edg:
################################################################################
+# Report gcc version.
+#
+# Intended for use in shell scripts thus:
+# gcc_version=$(make show_gcc_version)
+# so no newline is printed.
+
+.PHONY: show_flags
+show_gcc_version:
+ @printf "$(gcc_version)"
+
# Display selected variables.
.PHONY: show_flags