remove duplications
This commit is contained in:
+12
-12
@@ -6,10 +6,6 @@ trap 'echo FAILED COMMAND: $previous_command' EXIT
|
||||
|
||||
runit()
|
||||
{
|
||||
export TARGET="${1}"
|
||||
export PREFIX="`pwd`/rel-bin/${TARGET}"
|
||||
export PATH="${PREFIX}/bin:${PATH}"
|
||||
export OUT="`pwd`/out"
|
||||
|
||||
#### ZMIEŃ, JEŻELI CHCESZ INNE WERSJE, DOMYŚLNE "master", CZYLI "BLEEDING EDGE"
|
||||
export binutils_version="master"
|
||||
@@ -17,8 +13,13 @@ runit()
|
||||
export linux_version="master"
|
||||
export gcc_version="master"
|
||||
export newlib_version="master"
|
||||
|
||||
|
||||
#### TU NIE ZMIENIAJ vvv
|
||||
export TARGET="${1}"
|
||||
export PREFIX="`pwd`/rel-bin/${TARGET}"
|
||||
export PATH="${PREFIX}/bin:${PATH}"
|
||||
export OUT="`pwd`/out"
|
||||
if uname -s | grep -q -i "linux"; then
|
||||
export nproc="$(( `nproc --all` * 2 ))"
|
||||
elif uname -s | grep -q -i "darwin"; then
|
||||
@@ -34,7 +35,6 @@ runit()
|
||||
export ARGS="--enable-multilib --enable-multiarch --enable-targets=all --disable-werror"
|
||||
if [ "${buildnewlib}" -ne "0" ]; then
|
||||
export EXTRA_ARGS="--with-newlib"
|
||||
#--with-headers=\"`readlink -f newlib-dl/newlib/libc/include`\"
|
||||
fi
|
||||
#### TU NIE ZMIENIAJ ^^^
|
||||
|
||||
@@ -121,13 +121,13 @@ runit()
|
||||
find ${PREFIX}/${TARGET} -type f -name "*.a" | xargs ${TARGET}-ranlib #for sysroot
|
||||
find ${PREFIX}/${TARGET} -type f | xargs file | grep "ELF" | cut -f 1 -d ":" | xargs ${TARGET}-strip -S --strip-unneeded #for sysroot
|
||||
if [ "${buildnewlib}" -ne "0" ]; then
|
||||
if [ "${1}" == "64" ]; then
|
||||
if [ "${1}" = "64" ]; then
|
||||
(cd rel-bin; tar -cJvf "${OUT}/${TARGET}-GCC_${gcc_version}-newlib-`date +"%d-%m-%Y"`-`uname -s`_x86-64.txz" ${TARGET}) #|| return ${?}
|
||||
else
|
||||
(cd rel-bin; tar -cJvf "${OUT}/${TARGET}-GCC_${gcc_version}-newlib-`date +"%d-%m-%Y"`-`uname -s`_x86-32.txz" ${TARGET}) #|| return ${?}
|
||||
fi
|
||||
else
|
||||
if [ "${1}" == "64" ]; then
|
||||
if [ "${1}" = "64" ]; then
|
||||
(cd rel-bin; tar -cJvf "${OUT}/${TARGET}-GCC_${gcc_version}-glibc-`date +"%d-%m-%Y"`-`uname -s`_x86-64.txz" ${TARGET}) #|| return ${?}
|
||||
else
|
||||
(cd rel-bin; tar -cJvf "${OUT}/${TARGET}-GCC_${gcc_version}-glibc-`date +"%d-%m-%Y"`-`uname -s`_x86-32.txz" ${TARGET}) #|| return ${?}
|
||||
@@ -169,20 +169,20 @@ runit()
|
||||
fi
|
||||
}
|
||||
|
||||
targets="`grep ' - t=' .travis.yml | cut -f 2 -d =`"
|
||||
targets="`grep ' - t=' .travis.yml | cut -f 2 -d = | cut -f 1 -d ' ' | sort -u`"
|
||||
if [ "${AUTOBUILD}" -ne "0" ]; then
|
||||
export clean="1"
|
||||
if [ "${METHOD}" == "newlib" ]; then
|
||||
if [ "${METHOD}" = "newlib" ]; then
|
||||
export buildnewlib="1"
|
||||
for i in ${targets}; do
|
||||
runit ${i} 32
|
||||
runit ${i} 64
|
||||
done
|
||||
elif [ "${METHOD}" == "glibc" ]; then
|
||||
elif [ "${METHOD}" = "glibc" ]; then
|
||||
export buildnewlib="0"
|
||||
for i in ${targets}; do
|
||||
if [ "`echo ${i} | cut -f 3 -d -`" == "eabi" ]; then continue; fi
|
||||
if [ "`echo ${i} | cut -f 3 -d -`" == "elf" ]; then continue; fi
|
||||
if [ "`echo ${i} | cut -f 3 -d -`" = "eabi" ]; then continue; fi
|
||||
if [ "`echo ${i} | cut -f 3 -d -`" = "elf" ]; then continue; fi
|
||||
runit ${i} 32
|
||||
runit ${i} 64
|
||||
done
|
||||
|
||||
Reference in New Issue
Block a user