diff options
author | John Wiegley <johnw@newartisans.com> | 2014-12-17 12:11:30 -0600 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2014-12-26 11:06:21 -0600 |
commit | 28b6fb61e651a3e2cca57d087781e7ba6ab45e7c (patch) | |
tree | 1931763370f483739474ebe0ab219eb0d7256c13 /pkgs/build-support/gcc-wrapper | |
parent | ce100a5d58799e65684ad948db70638c311369b3 (diff) |
Change occurrences of gcc to the more general cc
This is done for the sake of Yosemite, which does not have gcc, and yet
this change is also compatible with Linux.
Diffstat (limited to 'pkgs/build-support/gcc-wrapper')
-rw-r--r-- | pkgs/build-support/gcc-wrapper/add-flags | 2 | ||||
-rw-r--r-- | pkgs/build-support/gcc-wrapper/default.nix | 2 | ||||
-rw-r--r-- | pkgs/build-support/gcc-wrapper/gcc-wrapper.sh | 10 | ||||
-rw-r--r-- | pkgs/build-support/gcc-wrapper/ld-wrapper.sh | 2 | ||||
-rw-r--r-- | pkgs/build-support/gcc-wrapper/setup-hook.sh | 5 |
5 files changed, 12 insertions, 9 deletions
diff --git a/pkgs/build-support/gcc-wrapper/add-flags b/pkgs/build-support/gcc-wrapper/add-flags index d75f378e2c97..be79fc370ec9 100644 --- a/pkgs/build-support/gcc-wrapper/add-flags +++ b/pkgs/build-support/gcc-wrapper/add-flags @@ -25,4 +25,4 @@ if [ -e @out@/nix-support/libc-ldflags-before ]; then export NIX_LDFLAGS_BEFORE="$(cat @out@/nix-support/libc-ldflags-before) $NIX_LDFLAGS_BEFORE" fi -export NIX_GCC_WRAPPER_FLAGS_SET=1 +export NIX_CC_WRAPPER_FLAGS_SET=1 diff --git a/pkgs/build-support/gcc-wrapper/default.nix b/pkgs/build-support/gcc-wrapper/default.nix index b2f7d07560d3..aed1ab817aad 100644 --- a/pkgs/build-support/gcc-wrapper/default.nix +++ b/pkgs/build-support/gcc-wrapper/default.nix @@ -226,7 +226,7 @@ stdenv.mkDerivation { crossAttrs = { shell = shell.crossDrv + shell.crossDrv.shellPath; - libc = stdenv.gccCross.libc; + libc = stdenv.ccCross.libc; coreutils = coreutils.crossDrv; binutils = binutils.crossDrv; gcc = gcc.crossDrv; diff --git a/pkgs/build-support/gcc-wrapper/gcc-wrapper.sh b/pkgs/build-support/gcc-wrapper/gcc-wrapper.sh index d0c82c82dc1c..c918cc30d9ab 100644 --- a/pkgs/build-support/gcc-wrapper/gcc-wrapper.sh +++ b/pkgs/build-support/gcc-wrapper/gcc-wrapper.sh @@ -1,10 +1,10 @@ #! @shell@ -e -if [ -n "$NIX_GCC_WRAPPER_START_HOOK" ]; then - source "$NIX_GCC_WRAPPER_START_HOOK" +if [ -n "$NIX_CC_WRAPPER_START_HOOK" ]; then + source "$NIX_CC_WRAPPER_START_HOOK" fi -if [ -z "$NIX_GCC_WRAPPER_FLAGS_SET" ]; then +if [ -z "$NIX_CC_WRAPPER_FLAGS_SET" ]; then source @out@/nix-support/add-flags.sh fi @@ -139,8 +139,8 @@ if [ -n "$NIX_DEBUG" ]; then done fi -if [ -n "$NIX_GCC_WRAPPER_EXEC_HOOK" ]; then - source "$NIX_GCC_WRAPPER_EXEC_HOOK" +if [ -n "$NIX_CC_WRAPPER_EXEC_HOOK" ]; then + source "$NIX_CC_WRAPPER_EXEC_HOOK" fi exec @prog@ ${extraBefore[@]} "${params[@]}" "${extraAfter[@]}" diff --git a/pkgs/build-support/gcc-wrapper/ld-wrapper.sh b/pkgs/build-support/gcc-wrapper/ld-wrapper.sh index 894dbf9a352c..30c531b76479 100644 --- a/pkgs/build-support/gcc-wrapper/ld-wrapper.sh +++ b/pkgs/build-support/gcc-wrapper/ld-wrapper.sh @@ -4,7 +4,7 @@ if [ -n "$NIX_LD_WRAPPER_START_HOOK" ]; then source "$NIX_LD_WRAPPER_START_HOOK" fi -if [ -z "$NIX_GCC_WRAPPER_FLAGS_SET" ]; then +if [ -z "$NIX_CC_WRAPPER_FLAGS_SET" ]; then source @out@/nix-support/add-flags.sh fi diff --git a/pkgs/build-support/gcc-wrapper/setup-hook.sh b/pkgs/build-support/gcc-wrapper/setup-hook.sh index a6b7edbcb694..fc10e8fb2c31 100644 --- a/pkgs/build-support/gcc-wrapper/setup-hook.sh +++ b/pkgs/build-support/gcc-wrapper/setup-hook.sh @@ -1,4 +1,4 @@ -export NIX_GCC=@out@ +export NIX_CC=@out@ addCVars () { if [ -d $1/include ]; then @@ -33,3 +33,6 @@ fi if [ -n "@coreutils@" ]; then addToSearchPath PATH @coreutils@/bin fi + +export CC=gcc +export CXX=g++ |