Skip to content

Commit

Permalink
ebuild.sh: Allow CC and CXX to be changed in profile.bashrc
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
chewi committed Jan 9, 2025
1 parent c52e71b commit e0be9a5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
2 changes: 2 additions & 0 deletions NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -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)
--------------

Expand Down
5 changes: 0 additions & 5 deletions bin/ebuild.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit e0be9a5

Please sign in to comment.