update
This commit is contained in:
+7
-25
@@ -30,17 +30,17 @@ runit()
|
||||
fi
|
||||
case "${2}" in
|
||||
64)
|
||||
export CC="cc -m64"
|
||||
export CXX="c++ -m64" ;;
|
||||
export CC="${CROSS_COMPILE}gcc -m64"
|
||||
export CXX="${CROSS_COMPILE}g++ -m64" ;;
|
||||
32)
|
||||
export CC="cc -m32"
|
||||
export CXX="c++ -m32" ;;
|
||||
export CC="${CROSS_COMPILE}gcc -m32"
|
||||
export CXX="${CROSS_COMPILE}g++ -m32" ;;
|
||||
esac
|
||||
mkdir -pv out logs
|
||||
if echo "${glibc_version}" | grep -q "/"; then
|
||||
export glibc_version_="`echo ${libc_version} | tr '/' '-'`"
|
||||
export glibc_version_="`echo ${glibc_version} | tr '/' '-'`"
|
||||
else
|
||||
export glibc_version_="${libc_version}"
|
||||
export glibc_version_="${glibc_version}"
|
||||
fi
|
||||
#### TU NIE ZMIENIAJ ^^^
|
||||
|
||||
@@ -109,7 +109,7 @@ runit()
|
||||
strip_n_pack()
|
||||
{
|
||||
#find ${PREFIX} -type f -not -path *${TARGET}/${TARGET}/* | xargs file | grep "ELF" | cut -f 1 -d ":" | xargs strip -S --strip-unneeded #for host
|
||||
find ${PREFIX} -type f | xargs file | grep "ELF" | cut -f 1 -d ":" | xargs strip -S --strip-unneeded #for host
|
||||
find ${PREFIX} -type f | xargs file | grep "ELF" | cut -f 1 -d ":" | xargs ${CROSS_COMPILE}strip -S --strip-unneeded #for host
|
||||
find ${PREFIX}/${TARGET} -type f -name "*.a" | xargs ${TARGET}-strip -S --strip-unneeded #for sysroot
|
||||
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
|
||||
@@ -127,19 +127,6 @@ runit()
|
||||
fi
|
||||
fi
|
||||
}
|
||||
test_gcc()
|
||||
{
|
||||
echo -n "int main(){return 0;}" >test.cpp
|
||||
if ${TARGET}-g++ test.cpp -o test; then
|
||||
echo "${TARGET}-g++ TEST PASSED"
|
||||
rm -rf test{.cpp,}
|
||||
return 0
|
||||
else
|
||||
echo "${TARGET}-g++ TEST FAILED"
|
||||
rm -rf test{.cpp,}
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
if [ "${clean}" -ne "0" ]; then
|
||||
rm -rf build-* logs
|
||||
@@ -154,11 +141,6 @@ runit()
|
||||
echo "Error at \"build\" section"
|
||||
return 1
|
||||
fi
|
||||
if ! test_gcc; then
|
||||
trap - EXIT
|
||||
echo "Error at \"test_gcc\" section"
|
||||
return 1
|
||||
fi
|
||||
if ! strip_n_pack ${2}; then
|
||||
trap - EXIT
|
||||
echo "Error at \"strip_n_pack ${2}\" section"
|
||||
|
||||
Reference in New Issue
Block a user