commit: e0be9a5d6224b63adc12bc112657a14d35d3638d
Author: James Le Cuirot <chewi <AT> gentoo <DOT> org>
AuthorDate: Thu Jan 9 16:35:45 2025 +0000
Commit: James Le Cuirot <chewi <AT> gentoo <DOT> org>
CommitDate: Thu Jan 9 16:44:46 2025 +0000
URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=e0be9a5d
ebuild.sh: Allow CC and CXX to be changed in profile.bashrc
Code added in 2003 previously reset these to their original values after
sourcing all the bashrc files. It isn't clear, but this was possibly
done to allow the user's values to take precedence over the old
profile.env. Today, only the llvm profiles set CC/CXX and this is done
in make.defaults, which doesn't override the user's values. That makes
this code redundant, but it would be useful to conditionally adjust
CC/CXX in llvm's profile.bashrc when cross-compiling.
Signed-off-by: James Le Cuirot <chewi <AT> gentoo.org>
NEWS | 2 ++
bin/ebuild.sh | 5 -----
2 files changed, 2 insertions(+), 5 deletions(-)
diff --git a/NEWS b/NEWS
index 83aa4d898c..01d93b7ce8 100644
--- a/NEWS
+++ b/NEWS
@@ -33,6 +33,8 @@ Bug fixes:
* binarytree.move_ent: Allocate path with binpkg_format (bug #923530).
+* ebuild.sh: Allow CC and CXX to be changed in profile.bashrc.
+
portage-3.0.66.1 (2024-09-18)
--------------
diff --git a/bin/ebuild.sh b/bin/ebuild.sh
index 002dcf783d..f2cc685b57 100755
--- a/bin/ebuild.sh
+++ b/bin/ebuild.sh
@@ -416,8 +416,6 @@ __source_all_bashrcs() {
PORTAGE_BASHRCS_SOURCED=1
local x
- local OCC="${CC}" OCXX="${CXX}"
-
if [[ ${EBUILD_PHASE} != depend ]] ; then
# Source the existing profile.bashrcs.
while read -r x; do
@@ -432,9 +430,6 @@ __source_all_bashrcs() {
if [[ ${EBUILD_PHASE} != depend ]] ; then
__source_env_files --no-qa "${PM_EBUILD_HOOK_DIR}"
fi
-
- [[ ! -z "${OCC}" ]] && export CC="${OCC}"
- [[ ! -z "${OCXX}" ]] && export CXX="${OCXX}"
}
# @FUNCTION: __source_env_files