diff options
author | Marvin Borner | 2019-09-14 14:28:48 +0200 |
---|---|---|
committer | Marvin Borner | 2019-09-14 14:28:48 +0200 |
commit | 119d15393abe1bd0d31e7c9864799063b9b5dc28 (patch) | |
tree | 464e0de3e96ac079726d1ee7ba1e8385ede6e5b5 | |
parent | 6e9c535aedf6f707a65a5561922d62b120da3ef3 (diff) |
Fixed cross compiler sourcing
-rwxr-xr-x[-rw-r--r--] | cross.sh | 14 |
1 files changed, 10 insertions, 4 deletions
@@ -1,10 +1,10 @@ #!/usr/bin/env sh # Sets up a cross compiler -if [ ! -d "./cross/" ]; then +if [ ! -d "./cross64/" ]; then # Create directory - mkdir -p cross - cd cross || exit + mkdir -p cross64 + cd cross64 || exit DIR=$(pwd) # Get sources @@ -32,10 +32,16 @@ if [ ! -d "./cross/" ]; then make all-target-libgcc make install-gcc make install-target-libgcc + + # Source exported variables + cd "${DIR}/.." || exit + . cross.sh else - cd cross || exit + # Should be sourced to take effect + cd cross64 || exit DIR=$(pwd) export PREFIX="${DIR}/opt" export TARGET=x86_64-elf export PATH="$PREFIX/bin:$PATH" + cd .. fi |