Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 8b53b2ec2c7e
Choose a base ref
...
head repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 5efca65f24e7
Choose a head ref
  • 4 commits
  • 1 file changed
  • 2 contributors

Commits on Nov 28, 2017

  1. cc-wrapper: Don't leave CMD defined after setup hook

    Rename to `cmd` too, as uppercase typically means the variable is
    exported.
    Ericson2314 committed Nov 28, 2017

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    994cb76 View commit details
  2. cc-wrapper: Export env vars for objdump and readelf in setup-hook

    Also fix alphabetical order
    Ericson2314 committed Nov 28, 2017
    Copy the full SHA
    f4cb1e2 View commit details
  3. cc-wrapper: Define new- and old-style cross env vars

    For example, `BUILD_CC` and `CC_FOR_BUILD`
    Ericson2314 committed Nov 28, 2017
    Copy the full SHA
    43e1137 View commit details
  4. Merge pull request #28448 from obsidiansystems/cc-wrapper-setup-var

    cc-wrapper: Newstyle setup vars
    Ericson2314 authored Nov 28, 2017
    Copy the full SHA
    5efca65 View commit details
Showing with 16 additions and 10 deletions.
  1. +16 −10 pkgs/build-support/cc-wrapper/setup-hook.sh
26 changes: 16 additions & 10 deletions pkgs/build-support/cc-wrapper/setup-hook.sh
Original file line number Diff line number Diff line change
@@ -97,10 +97,12 @@ ccWrapper_addCVars () {
# setup-hook, which `role` tracks.
if [ -n "${crossConfig:-}" ]; then
export NIX_CC_WRAPPER_@infixSalt@_TARGET_BUILD=1
role="BUILD_"
role_pre='BUILD_'
role_post='_FOR_BUILD'
else
export NIX_CC_WRAPPER_@infixSalt@_TARGET_HOST=1
role=""
role_pre=''
role_post=''
fi

# Eventually the exact sort of env-hook we create will depend on the role. This
@@ -133,20 +135,24 @@ fi

# Export tool environment variables so various build systems use the right ones.

export NIX_${role}CC=@out@
export NIX_${role_pre}CC=@out@

export ${role}CC=@named_cc@
export ${role}CXX=@named_cxx@
export ${role_pre}CC=@named_cc@
export ${role_pre}CXX=@named_cxx@
export CC${role_post}=@named_cc@
export CXX${role_post}=@named_cxx@

for CMD in \
ar as nm objcopy ranlib strip strings size ld windres
for cmd in \
ar as ld nm objcopy objdump readelf ranlib strip strings size windres
do
if
PATH=$_PATH type -p "@targetPrefix@$CMD" > /dev/null
PATH=$_PATH type -p "@targetPrefix@${cmd}" > /dev/null
then
export "${role}$(echo "$CMD" | tr "[:lower:]" "[:upper:]")=@targetPrefix@${CMD}";
upper_case="$(echo "$cmd" | tr "[:lower:]" "[:upper:]")"
export "${role_pre}${upper_case}=@targetPrefix@${cmd}";
export "${upper_case}${role_post}=@targetPrefix@${cmd}";
fi
done

# No local scope in sourced file
unset role
unset -v role_pre role_post cmd upper_case