diff --git a/danio_gcc.sh b/danio_gcc.sh index 4527283..0cfb4e8 100755 --- a/danio_gcc.sh +++ b/danio_gcc.sh @@ -34,8 +34,6 @@ runit() if [ "${buildnewlib}" -ne "0" ]; then export EXTRA_ARGS="--with-newlib" fi - #### TU NIE ZMIENIAJ ^^^ - case "${2}" in 64) export CC="cc -m64" @@ -45,6 +43,7 @@ runit() export CXX="c++ -m32" ;; esac mkdir -pv out + #### TU NIE ZMIENIAJ ^^^ download() { @@ -75,9 +74,9 @@ runit() (cd build-binutils; ../binutils-gdb-dl/configure --target="${TARGET}" --prefix="${PREFIX}" --disable-nls --enable-obsolete --disable-debug ${ARGS}) || return ${?} make -C build-binutils -j${nproc} || return ${?} make -C build-binutils -j${nproc} install || return ${?} - if [ ! -e .dl_ok ]; then + if [ ! -e gcc-dl/.dl_ok ]; then (cd gcc-dl; contrib/download_prerequisites) || return ${?} - touch .dl_ok || return ${?} + touch gcc-dl/.dl_ok || return ${?} fi mkdir -pv build-gcc || return ${?} (cd build-gcc; ../gcc-dl/configure --target="${TARGET}" --prefix="${PREFIX}" --enable-languages="c,c++" --with-pkgversion="*DANiO* GCC (`echo ${TARGET} | cut -f 1 -d '-'`)" ${ARGS} ${EXTRA_ARGS}) || return ${?} @@ -114,7 +113,7 @@ runit() } strip_n_pack() { - find ${PREFIX} -type f -path ${PREFIX}/${TARGET} -prune -o -print | xargs file | grep "ELF" | cut -f 1 -d ":" | xargs strip -S --strip-unneeded #for host + 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}/${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