aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfanquake <fanquake@gmail.com>2022-06-17 09:33:45 +0100
committerfanquake <fanquake@gmail.com>2022-06-17 14:44:49 +0100
commitf862f4a74ec6d95a40bb86c5e6597739b23db932 (patch)
tree0715f85873808b7e9ccc3e1bdafc977a98b131ac
parent874529665c1c326fc86fc0d0d6c3512fab087ab8 (diff)
build: add *_STANDARD vars to depends gen_id
Followup to #22380. We need to have these in the id so that we rebuild if we change / unset a *_STANDARD.
-rw-r--r--depends/Makefile4
-rwxr-xr-xdepends/gen_id7
2 files changed, 7 insertions, 4 deletions
diff --git a/depends/Makefile b/depends/Makefile
index 5a1c472a15..11fdd6dd53 100644
--- a/depends/Makefile
+++ b/depends/Makefile
@@ -144,8 +144,8 @@ include packages/packages.mk
# 2. Before including packages/*.mk (excluding packages/packages.mk), since
# they rely on the build_id variables
#
-build_id:=$(shell env CC='$(build_CC)' CXX='$(build_CXX)' AR='$(build_AR)' RANLIB='$(build_RANLIB)' STRIP='$(build_STRIP)' SHA256SUM='$(build_SHA256SUM)' DEBUG='$(DEBUG)' LTO='$(LTO)' ./gen_id '$(BUILD_ID_SALT)' 'GUIX_ENVIRONMENT=$(realpath $(GUIX_ENVIRONMENT))')
-$(host_arch)_$(host_os)_id:=$(shell env CC='$(host_CC)' CXX='$(host_CXX)' AR='$(host_AR)' RANLIB='$(host_RANLIB)' STRIP='$(host_STRIP)' SHA256SUM='$(build_SHA256SUM)' DEBUG='$(DEBUG)' LTO='$(LTO)' ./gen_id '$(HOST_ID_SALT)' 'GUIX_ENVIRONMENT=$(realpath $(GUIX_ENVIRONMENT))')
+build_id:=$(shell env CC='$(build_CC)' C_STANDARD='$(C_STANDARD)' CXX='$(build_CXX)' CXX_STANDARD='$(CXX_STANDARD)' AR='$(build_AR)' RANLIB='$(build_RANLIB)' STRIP='$(build_STRIP)' SHA256SUM='$(build_SHA256SUM)' DEBUG='$(DEBUG)' LTO='$(LTO)' ./gen_id '$(BUILD_ID_SALT)' 'GUIX_ENVIRONMENT=$(realpath $(GUIX_ENVIRONMENT))')
+$(host_arch)_$(host_os)_id:=$(shell env CC='$(host_CC)' C_STANDARD='$(C_STANDARD)' CXX='$(host_CXX)' CXX_STANDARD='$(CXX_STANDARD)' AR='$(host_AR)' RANLIB='$(host_RANLIB)' STRIP='$(host_STRIP)' SHA256SUM='$(build_SHA256SUM)' DEBUG='$(DEBUG)' LTO='$(LTO)' ./gen_id '$(HOST_ID_SALT)' 'GUIX_ENVIRONMENT=$(realpath $(GUIX_ENVIRONMENT))')
qrencode_packages_$(NO_QR) = $(qrencode_$(host_os)_packages)
diff --git a/depends/gen_id b/depends/gen_id
index a0cd586461..7caf8d764d 100755
--- a/depends/gen_id
+++ b/depends/gen_id
@@ -1,7 +1,8 @@
#!/usr/bin/env bash
-# Usage: env [ CC=... ] [ CXX=... ] [ AR=... ] [ RANLIB=... ] [ STRIP=... ] \
-# [ DEBUG=... ] [ LTO=... ] ./build-id [ID_SALT]...
+# Usage: env [ CC=... ] [ C_STANDARD=...] [ CXX=... ] [CXX_STANDARD=...] \
+# [ AR=... ] [ RANLIB=... ] [ STRIP=... ] [ DEBUG=... ] \
+# [ LTO=... ] ./build-id [ID_SALT]...
#
# Prints to stdout a SHA256 hash representing the current toolset, used by
# depends/Makefile as a build id for caching purposes (detecting when the
@@ -39,12 +40,14 @@
bash -c "${CC} -v"
bash -c "${CC} -v -E -xc -o /dev/null - < /dev/null"
bash -c "${CC} -v -E -xobjective-c -o /dev/null - < /dev/null"
+ echo "C_STANDARD=${C_STANDARD}"
echo "END CC"
echo "BEGIN CXX"
bash -c "${CXX} -v"
bash -c "${CXX} -v -E -xc++ -o /dev/null - < /dev/null"
bash -c "${CXX} -v -E -xobjective-c++ -o /dev/null - < /dev/null"
+ echo "CXX_STANDARD=${CXX_STANDARD}"
echo "END CXX"
echo "BEGIN AR"