Created
August 16, 2016 18:41
-
-
Save makiftasova/e493d1e80f99ecceb1ec1d1b65971f01 to your computer and use it in GitHub Desktop.
Simple bash script to set environment for building cross gcc
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# File : env-gcc-i686-elf | |
# Author: Mehmet Akif TAŞOVA | |
# Usage : To setup environment use "source env-gcc-i686-elf" | |
# To deactivate environemnt, give "deactivate" command | |
# set $TARGET to your target arch | |
export _OLD_BASH_PS1="$PS1" | |
export _ORIG_PATH="$PATH" | |
function deactivate(){ | |
PS1=$_OLD_BASH_PS1 | |
PATH="$_ORIG_PATH" | |
unset PREFIX | |
unset TARGET | |
unset _OLD_BASH_PS1 | |
unset _ORIG_PATH | |
} | |
export PREFIX="$HOME/GCC/cross-i686" | |
export TARGET=i686-elf | |
export PATH="$PREFIX/bin:$PATH" | |
PS1="($TARGET) $PS1" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment