This commit is contained in:
Daniel
2018-10-11 21:17:11 +00:00
parent e605d91c5f
commit 743222b175
3 changed files with 75 additions and 30 deletions
+6 -6
View File
@@ -17,10 +17,6 @@ if ! command -v lftp >/dev/null; then
exit 1
fi
if [ "${REMOVE}" == "1" ]; then
rm -rf binutils-* build-* ${gcc_version} gcc-* */* newlib-*
fi
(
if [ ! -e binutils-${binutils_version}${binutils_ext} ]; then
wget -c "http://ftp.gnu.org/gnu/binutils/binutils-${binutils_version}.${binutils_ext}"
@@ -87,12 +83,16 @@ if (
mkdir -pv build-newlib
(cd build-newlib; ../newlib-*/configure --target="${TARGET}" --prefix="${PREFIX}")
make -C build-newlib -j${nproc}
make -C build-newlib -j${nproc} install
make -C build-newlib install
)
then
find ${PREFIX} | xargs file | grep "ELF" | grep "executable" | cut -f 1 -d ":" | xargs strip -S 2>/dev/null
mkdir -pv out
(cd ${PREFIX}; tar -cJf "${OUT}/${TARGET}-`date +"%d-%m-%Y"`.txz" .)
if [ "${CC}" == "cc -m64" ]; then
(cd ${PREFIX}; tar -cJf "${OUT}/${TARGET}-`date +"%d-%m-%Y"`_x86-64.txz" .)
else
(cd ${PREFIX}; tar -cJf "${OUT}/${TARGET}-`date +"%d-%m-%Y"`_x86-32.txz" .)
fi
rm -rf build-*
#printf "\n POPRAWNIE ZBUDOWANO GCC DLA ${TARGET}!\n\n"
else