-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixing arm-none-eabi alternatives (#52)
I flubbed setting up the arm-none-eabi alternatives. this fixes that.
- Loading branch information
1 parent
a7164e8
commit 7cf6779
Showing
4 changed files
with
36 additions
and
19 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,55 @@ | ||
#!/bin/bash | ||
|
||
GCC_VERSION=${1} | ||
|
||
setup_gcc_alternatives() | ||
{ | ||
local version=${1} | ||
local priority=${2} | ||
local group=${3} | ||
local members=${4} | ||
local path=${5} | ||
local priority=${1} | ||
local group=${2} | ||
local members=${3} | ||
local path=${4} | ||
local cmdln | ||
|
||
cmdln="--verbose --install /usr/bin/${group} ${group} ${path}${group}-${version} ${priority}" | ||
cmdln="--verbose --install /usr/bin/${group} ${group} ${path}${group} ${priority}" | ||
for member in ${members}; do | ||
cmdln="${cmdln} --slave ${path}${member} ${member} ${path}${member}-${version}" | ||
cmdln="${cmdln} --slave /usr/bin/${member} ${member} ${path}${member}" | ||
done | ||
update-alternatives ${cmdln} | ||
} | ||
|
||
GCC_ALTERNATIVES_PRI=${2} | ||
GCC_ALTERNATIVES_PATH=${3} | ||
GCC_ALTERNATIVES_PRI=${1} | ||
GCC_ALTERNATIVES_PATH=${2} | ||
|
||
# setup gcc group | ||
GCC_ALTERNATIVES_GROUP_GCC_CONFIG="" | ||
GCC_ALTERNATIVES_GROUP_GCC_CONFIG="${GCC_ALTERNATIVES_GROUP_GCC_CONFIG} arm-none-eabi-addr2line" | ||
GCC_ALTERNATIVES_GROUP_GCC_CONFIG="${GCC_ALTERNATIVES_GROUP_GCC_CONFIG} arm-none-eabi-ar" | ||
GCC_ALTERNATIVES_GROUP_GCC_CONFIG="${GCC_ALTERNATIVES_GROUP_GCC_CONFIG} arm-none-eabi-as" | ||
GCC_ALTERNATIVES_GROUP_GCC_CONFIG="${GCC_ALTERNATIVES_GROUP_GCC_CONFIG} arm-none-eabi-c++" | ||
GCC_ALTERNATIVES_GROUP_GCC_CONFIG="${GCC_ALTERNATIVES_GROUP_GCC_CONFIG} arm-none-eabi-c++filt" | ||
GCC_ALTERNATIVES_GROUP_GCC_CONFIG="${GCC_ALTERNATIVES_GROUP_GCC_CONFIG} arm-none-eabi-cpp" | ||
GCC_ALTERNATIVES_GROUP_GCC_CONFIG="${GCC_ALTERNATIVES_GROUP_GCC_CONFIG} arm-none-eabi-elfedit" | ||
GCC_ALTERNATIVES_GROUP_GCC_CONFIG="${GCC_ALTERNATIVES_GROUP_GCC_CONFIG} arm-none-eabi-g++" | ||
GCC_ALTERNATIVES_GROUP_GCC_CONFIG="${GCC_ALTERNATIVES_GROUP_GCC_CONFIG} arm-none-eabi-gcc-ar" | ||
GCC_ALTERNATIVES_GROUP_GCC_CONFIG="${GCC_ALTERNATIVES_GROUP_GCC_CONFIG} arm-none-eabi-gcc-nm" | ||
GCC_ALTERNATIVES_GROUP_GCC_CONFIG="${GCC_ALTERNATIVES_GROUP_GCC_CONFIG} arm-none-eabi-gcc-ranlib" | ||
GCC_ALTERNATIVES_GROUP_GCC_CONFIG="${GCC_ALTERNATIVES_GROUP_GCC_CONFIG} arm-none-eabi-gcov" | ||
GCC_ALTERNATIVES_GROUP_GCC_CONFIG="${GCC_ALTERNATIVES_GROUP_GCC_CONFIG} arm-none-eabi-gcov-dump" | ||
GCC_ALTERNATIVES_GROUP_GCC_CONFIG="${GCC_ALTERNATIVES_GROUP_GCC_CONFIG} arm-none-eabi-gcov-tool" | ||
GCC_ALTERNATIVES_GROUP_GCC_CONFIG="${GCC_ALTERNATIVES_GROUP_GCC_CONFIG} arm-none-eabi-gdb" | ||
GCC_ALTERNATIVES_GROUP_GCC_CONFIG="${GCC_ALTERNATIVES_GROUP_GCC_CONFIG} arm-none-eabi-gdb-add-index" | ||
GCC_ALTERNATIVES_GROUP_GCC_CONFIG="${GCC_ALTERNATIVES_GROUP_GCC_CONFIG} arm-none-eabi-gdb-add-index-py" | ||
GCC_ALTERNATIVES_GROUP_GCC_CONFIG="${GCC_ALTERNATIVES_GROUP_GCC_CONFIG} arm-none-eabi-gdb-py" | ||
GCC_ALTERNATIVES_GROUP_GCC_CONFIG="${GCC_ALTERNATIVES_GROUP_GCC_CONFIG} arm-none-eabi-gfortran" | ||
GCC_ALTERNATIVES_GROUP_GCC_CONFIG="${GCC_ALTERNATIVES_GROUP_GCC_CONFIG} arm-none-eabi-gprof" | ||
GCC_ALTERNATIVES_GROUP_GCC_CONFIG="${GCC_ALTERNATIVES_GROUP_GCC_CONFIG} arm-none-eabi-ld" | ||
GCC_ALTERNATIVES_GROUP_GCC_CONFIG="${GCC_ALTERNATIVES_GROUP_GCC_CONFIG} arm-none-eabi-ld.bfd" | ||
GCC_ALTERNATIVES_GROUP_GCC_CONFIG="${GCC_ALTERNATIVES_GROUP_GCC_CONFIG} arm-none-eabi-lto-dump" | ||
GCC_ALTERNATIVES_GROUP_GCC_CONFIG="${GCC_ALTERNATIVES_GROUP_GCC_CONFIG} arm-none-eabi-nm" | ||
GCC_ALTERNATIVES_GROUP_GCC_CONFIG="${GCC_ALTERNATIVES_GROUP_GCC_CONFIG} arm-none-eabi-objcopy" | ||
GCC_ALTERNATIVES_GROUP_GCC_CONFIG="${GCC_ALTERNATIVES_GROUP_GCC_CONFIG} arm-none-eabi-objdump" | ||
GCC_ALTERNATIVES_GROUP_GCC_CONFIG="${GCC_ALTERNATIVES_GROUP_GCC_CONFIG} arm-none-eabi-ranlib" | ||
GCC_ALTERNATIVES_GROUP_GCC_CONFIG="${GCC_ALTERNATIVES_GROUP_GCC_CONFIG} arm-none-eabi-readelf" | ||
GCC_ALTERNATIVES_GROUP_GCC_CONFIG="${GCC_ALTERNATIVES_GROUP_GCC_CONFIG} arm-none-eabi-size" | ||
GCC_ALTERNATIVES_GROUP_GCC_CONFIG="${GCC_ALTERNATIVES_GROUP_GCC_CONFIG} arm-none-eabi-strings" | ||
GCC_ALTERNATIVES_GROUP_GCC_CONFIG="${GCC_ALTERNATIVES_GROUP_GCC_CONFIG} arm-none-eabi-strip" | ||
|
||
setup_gcc_alternatives "${GCC_VERSION}" "${GCC_ALTERNATIVES_PRI}" "arm-none-eabi-gcc" "${GCC_ALTERNATIVES_GROUP_GCC_CONFIG}" "${GCC_ALTERNATIVES_PATH}" | ||
setup_gcc_alternatives "${GCC_ALTERNATIVES_PRI}" "arm-none-eabi-gcc" "${GCC_ALTERNATIVES_GROUP_GCC_CONFIG}" "${GCC_ALTERNATIVES_PATH}" |
This file contains 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