| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206 | #!/bin/shrm -rf host_x86_64-linux-gnu target_sparc_glibcrm -rf gcc-*mkdir host_x86_64-linux-gnumkdir target_sparc_glibctar xvf binutils-2.24.tar.bz2cd binutils-2.24./configure \		--prefix=/home/wbx/smoke/host_x86_64-linux-gnu \		--target=sparc-openadk-linux-gnu \		--with-sysroot=/home/wbx/smoke/target_sparc_glibc \		--disable-dependency-tracking \		--disable-libtool-lock \		--disable-nls \		--disable-werror \		--disable-plugins \		--disable-libssp --disable-multilibmake -j4 allmake installcd ..tar xvf gmp-5.1.3.tar.xzcd gmp-5.1.3cp configfsf.guess config.guessPATH="/home/wbx/smoke/host_x86_64-linux-gnu/usr/bin:$PATH" \		./configure \		--prefix=/home/wbx/smoke/host_x86_64-linux-gnu \		--with-pic \		--disable-shared \		--enable-staticmake -j4 allmake installcd ..tar xvf mpfr-3.1.2.tar.xzcd mpfr-3.1.2./configure \		--prefix=/home/wbx/smoke/host_x86_64-linux-gnu \		--with-gmp-build=/home/wbx/smoke/gmp-5.1.3 \		--disable-shared \		--enable-staticmake -j4 allmake installcd ..tar xvf mpc-0.8.2.tar.gzcd mpc-0.8.2./configure \		--prefix=/home/wbx/smoke/host_x86_64-linux-gnu \		--with-gmp=/home/wbx/smoke/host_x86_64-linux-gnu \		--disable-shared \		--enable-staticmake -j4 allmake installmake installcd ..tar xvf libelf-0.8.13.tar.gzcd libelf-0.8.13./configure \		--prefix=/home/wbx/smoke/host_x86_64-linux-gnu \		--disable-nls \		--disable-shared \		--enable-staticmake -j4 allmake installcd ..rm -rf host_x86_64-linux-gnu/sparc-openadk-linux-gnu/{lib,sys-include}cd host_x86_64-linux-gnu/sparc-openadk-linux-gnu/ln -sf ../../target_sparc_glibc/usr/include sys-includeln -sf ../../target_sparc_glibc/lib libcd -mkdir gcc-minimalcd gcc-minimalCFLAGS="-O0 -g0" \CXXFLAGS="-O0 -g0" \PATH="/home/wbx/smoke/host_x86_64-linux-gnu/bin:$PATH" \../gcc/configure \	--prefix=/home/wbx/smoke/host_x86_64-linux-gnu --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=sparc-openadk-linux-gnu --with-gmp=/home/wbx/smoke/host_x86_64-linux-gnu --with-mpfr=/home/wbx/smoke/host_x86_64-linux-gnu --with-libelf=/home/wbx/smoke/host_x86_64-linux-gnu --disable-__cxa_atexit --with-gnu-ld --with-gnu-as --enable-tls --disable-libsanitizer --disable-libitm --disable-libmudflap --disable-libgomp --disable-decimal-float --disable-libstdcxx-pch --disable-ppl-version-check --disable-cloog-version-check --without-system-zlib --without-ppl --without-cloog --without-isl --disable-nls --enable-target-optspace \			--enable-languages=c \			--disable-multilib \			--disable-lto \			--disable-libssp \			--disable-shared \			--without-headersPATH="/home/wbx/smoke/host_x86_64-linux-gnu/bin:$PATH" make -j4 all-gccif [ $? -ne 0 ];then	echo failed	exitfiPATH="/home/wbx/smoke/host_x86_64-linux-gnu/bin:$PATH" make install-gccif [ $? -ne 0 ];then	echo failed	exitficd ..cd linux-3.13.6make V=1 ARCH=sparc CROSS_COMPILE="/home/wbx/smoke/host_x86_64-linux-gnu/bin/sparc-openadk-linux-gnu-" CC="/home/wbx/smoke/host_x86_64-linux-gnu/bin/sparc-openadk-linux-gnu-gcc" HOSTCC="cc" CONFIG_SHELL='/bin/bash' HOSTCFLAGS='-O2 -Wall' INSTALL_HDR_PATH=/home/wbx/smoke/target_sparc_glibc/usr headers_installcd ..cd glibc-2.19-headerlibc_cv_forced_unwind=yes \libc_cv_cc_with_libunwind=yes \libc_cv_c_cleanup=yes \libc_cv_gnu99_inline=yes \libc_cv_initfini_array=yes \PATH="/home/wbx/smoke/host_x86_64-linux-gnu/bin:$PATH" ../glibc-2.19/configure \	--prefix=/home/wbx/smoke/target_sparc_glibc/usr \	--with-sysroot=/home/wbx/smoke/target_sparc_glibc \	--build=x86_64-linux-gnu --host=sparc-openadk-linux-gnu --with-headers=/home/wbx/smoke/target_sparc_glibc/usr/include --disable-sanity-checks --disable-nls --without-cvs --disable-profile --disable-debug --without-gd --disable-nscd --with-__thread --with-tls --enable-kernel="2.6.32" --enable-add-onsPATH="/home/wbx/smoke/host_x86_64-linux-gnu/bin:$PATH" make cross-compiling=yes PARALLELMFLAGS="-j1" install-headersif [ $? -ne 0 ];then	echo failed	exitficd ..touch target_sparc_glibc/usr/include/gnu/stubs.hmkdir gcc-initialcd gcc-initialCFLAGS="-O0 -g0" \CXXFLAGS="-O0 -g0" \PATH="/home/wbx/smoke/host_x86_64-linux-gnu/bin:$PATH" ../gcc/configure \	--prefix=/home/wbx/smoke/host_x86_64-linux-gnu --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=sparc-openadk-linux-gnu --with-gmp=/home/wbx/smoke/host_x86_64-linux-gnu --with-mpfr=/home/wbx/smoke/host_x86_64-linux-gnu --with-libelf=/home/wbx/smoke/host_x86_64-linux-gnu --disable-__cxa_atexit --with-gnu-ld --with-gnu-as --enable-tls --disable-libsanitizer --disable-libitm --disable-libmudflap --disable-libgomp --disable-decimal-float --disable-libstdcxx-pch --disable-ppl-version-check --disable-cloog-version-check --without-system-zlib --without-ppl --without-cloog --without-isl --disable-nls --enable-target-optspace \			 --disable-biarch --disable-multilib --enable-libssp --enable-lto \			--enable-languages=c \			--disable-shared \			--disable-threads \			--with-sysroot=/home/wbx/smoke/target_sparc_glibcPATH="/home/wbx/smoke/host_x86_64-linux-gnu/bin:$PATH" make all-gccif [ $? -ne 0 ];then	echo failed	exitfiPATH="/home/wbx/smoke/host_x86_64-linux-gnu/bin:$PATH" make all-target-libgccif [ $? -ne 0 ];then	echo failed	exitfiPATH="/home/wbx/smoke/host_x86_64-linux-gnu/bin:$PATH" make install-gcc install-target-libgccif [ $? -ne 0 ];then	echo failed	exitficd ..cd glibc-2.19-finalPATH="/home/wbx/smoke/host_x86_64-linux-gnu/bin:$PATH" SHELL='/bin/bash' BUILD_CC=cc CFLAGS="-mcpu=v8 -fwrapv -fno-ident -fomit-frame-pointer -O2 -pipe -fno-unwind-tables -fno-asynchronous-unwind-tables -g3" CC="/home/wbx/smoke/host_x86_64-linux-gnu/bin/sparc-openadk-linux-gnu-gcc" CXX="/home/wbx/smoke/host_x86_64-linux-gnu/bin/sparc-openadk-linux-gnu-g++" AR="/home/wbx/smoke/host_x86_64-linux-gnu/bin/sparc-openadk-linux-gnu-ar" RANLIB="/home/wbx/smoke/host_x86_64-linux-gnu/bin/sparc-openadk-linux-gnu-ranlib" libc_cv_forced_unwind=yes libc_cv_cc_with_libunwind=yes libc_cv_c_cleanup=yes libc_cv_gnu99_inline=yes libc_cv_initfini_array=yes  \../glibc-2.19/configure \	--prefix=/usr \	--enable-shared \	--enable-stackguard-randomization \	--build=x86_64-linux-gnu --host=sparc-openadk-linux-gnu --with-headers=/home/wbx/smoke/target_sparc_glibc/usr/include --disable-sanity-checks --disable-nls --without-cvs --disable-profile --disable-debug --without-gd --disable-nscd --with-__thread --with-tls --enable-kernel="2.6.32" --enable-add-ons PATH="/home/wbx/smoke/host_x86_64-linux-gnu/bin:$PATH" make allPATH="/home/wbx/smoke/host_x86_64-linux-gnu/bin:$PATH" make install_root=/home/wbx/smoke/target_sparc_glibc installif [ $? -ne 0 ];then	echo failed	exitficd ..mkdir gcc-finalcd gcc-final../gcc/configure \	--prefix=/home/wbx/smoke/host_x86_64-linux-gnu --with-bugurl="http://www.openadk.org/" --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=sparc-openadk-linux-gnu --with-gmp=/home/wbx/smoke/host_x86_64-linux-gnu --with-mpfr=/home/wbx/smoke/host_x86_64-linux-gnu --with-libelf=/home/wbx/smoke/host_x86_64-linux-gnu --disable-__cxa_atexit --with-gnu-ld --with-gnu-as --enable-tls --disable-libsanitizer --disable-libitm --disable-libmudflap --disable-libgomp --disable-decimal-float --disable-libstdcxx-pch --disable-ppl-version-check --disable-cloog-version-check --without-system-zlib --without-ppl --without-cloog --without-isl --disable-nls --enable-target-optspace \			 --disable-biarch --disable-multilib --enable-libssp --enable-lto \			--enable-languages=c,c++ \			--with-build-sysroot='${prefix}/../target_sparc_glibc' \			--with-sysroot='${prefix}/../target_sparc_glibc' \			--enable-sharedmake -j4 allif [ $? -ne 0 ];then	echo failed	exitfimake installif [ $? -ne 0 ];then	echo failed	exitficd ..cd linux-3.13.6/cat > mini.config <<EOFCONFIG_SPARC=yCONFIG_SPARC32=yCONFIG_SBUS=yCONFIG_SBUSCHAR=yCONFIG_PCI=yCONFIG_PCI_SYSCALL=yCONFIG_PCIC_PCI=yCONFIG_OF=yCONFIG_NET_VENDOR_AMD=yCONFIG_SUNLANCE=yCONFIG_SERIAL_CONSOLE=yCONFIG_SERIAL_SUNCORE=yCONFIG_SERIAL_SUNZILOG=yCONFIG_SERIAL_SUNZILOG_CONSOLE=yEOFPATH="/home/wbx/smoke/host_x86_64-linux-gnu/bin:$PATH" make V=1 ARCH=sparc CROSS_COMPILE="/home/wbx/smoke/host_x86_64-linux-gnu/bin/sparc-openadk-linux-gnu-" CC="/home/wbx/smoke/host_x86_64-linux-gnu/bin/sparc-openadk-linux-gnu-gcc" HOSTCC="cc" CONFIG_SHELL='/bin/bash' HOSTCFLAGS='-O2 -Wall' KCONFIG_ALLCONFIG=mini.config allnoconfig PATH="/home/wbx/smoke/host_x86_64-linux-gnu/bin:$PATH" make V=1 ARCH=sparc CROSS_COMPILE="/home/wbx/smoke/host_x86_64-linux-gnu/bin/sparc-openadk-linux-gnu-" CC="/home/wbx/smoke/host_x86_64-linux-gnu/bin/sparc-openadk-linux-gnu-gcc" HOSTCC="cc" CONFIG_SHELL='/bin/bash' HOSTCFLAGS='-O2 -Wall' -j4 zImage
 |