profile: Remove CC environment variable, use local/bin/cc instead

master
Pierre Neidhardt 2018-11-17 13:30:31 +01:00
parent 1689f27d61
commit baea094673
2 changed files with 8 additions and 9 deletions

8
.local/bin/cc Executable file
View File

@ -0,0 +1,8 @@
#!/bin/sh
## Setting the CC environment variable may break some Makefiles or other
## languages like Go (with cgo).
for i in /usr/local/bin/cc /usr/bin/cc /bin/cc clang gcc; do
command -v $i >/dev/null 2>&1 && exec $i "$@"
done

View File

@ -40,15 +40,6 @@ prependpath () {
## Use this to override system executables.
prependpath "${HOME}/personal/hackpool"
## C Compiler
if ! command -v cc >/dev/null 2>&1; then
if command -v clang >/dev/null 2>&1; then
export CC=clang
else
export CC=gcc
fi
fi
## TeXlive -- TODO: Remove once guix has packaged it all properly.
TEXDIR="${TEXDIR:-/usr/local/texlive}"
if [ -d "${TEXDIR}" ]; then