wok rev 12716

cross-arm-gcc: improve receipt, --enable-threads for final build
author Christophe Lincoln <pankso@slitaz.org>
date Sat May 05 04:34:07 2012 +0200 (2012-05-05)
parents ce3e7500d1b6
children 99e4f3b92105
files cross-arm-gcc/receipt
line diff
     1.1 --- a/cross-arm-gcc/receipt	Sat May 05 04:00:34 2012 +0200
     1.2 +++ b/cross-arm-gcc/receipt	Sat May 05 04:34:07 2012 +0200
     1.3 @@ -35,6 +35,9 @@
     1.4  	[ "$2" == "--first-pass" ] && opt=$2
     1.5  	[ "$3" == "--first-pass" ] && opt=$3
     1.6  
     1.7 +	# Use libiberty.a from binutils.
     1.8 +	sed -i 's/install_to_$(INSTALL_DEST) //' libiberty/Makefile.in || return 1
     1.9 +
    1.10  	mkdir -p ../build && cd ../build
    1.11  
    1.12  	case $opt in
    1.13 @@ -45,38 +48,29 @@
    1.14  				--prefix=$CROSS_PREFIX \
    1.15  				--libexec=$CROSS_PREFIX/lib \
    1.16  				--disable-shared \
    1.17 +				--enable-languages=c \
    1.18  				--disable-threads \
    1.19 +				--disable-multilib \
    1.20 +				--disable-nls \
    1.21  				--without-headers \
    1.22 -				--with-newlib \
    1.23 -				--enable-languages=c \
    1.24 +				--disable-libgomp \
    1.25 +				--disable-libmudflap \
    1.26 +				--disable-libssp \
    1.27  				$CROSS_TRIPLET &&
    1.28  			make all-gcc all-target-libgcc &&
    1.29  			make install-gcc install-target-libgcc &&
    1.30  			cd ${install}${CROSS_PREFIX}/lib/gcc/$CROSS_TARGET/$VERSION &&
    1.31 -			#ln -s libgcc.a libgcc_sh.a
    1.32  			ln -s libgcc.a libgcc_eh.a ;;
    1.33  		*)
    1.34  			# Used to produce a full featured ARM GCC cross compiler.
    1.35  			echo "cook: configure GCC for: final/full cross compiler"
    1.36  
    1.37 -			# The cross-arm-toolchain package will install glibc. We can't
    1.38 -			# have it in DEPENDS since glibc is not build when we compile
    1.39 -			# GCC --first-pass
    1.40 +			# We cant't have cross-arm-glibc it in DEPENDS since it not build
    1.41 +			# when we compile GCC --first-pass
    1.42  			if [ ! "/var/lib/tazpkg/installed/cross-arm-glibc" ]; then
    1.43  				tazpkg -i /home/slitaz/packages/cross-arm-glibc-2.14.1.tazpkg
    1.44  			fi
    1.45  
    1.46 -			# This will fix GCC final build since we dont use --with-sysroot=.
    1.47 -			# Without that we go errors such as: cannot find crtn.o
    1.48 -			echo "cook: moving ldscripts to: ${CROSS_PREFIX}/lib"
    1.49 -			cd ${CROSS_PREFIX}/$CROSS_TARGET
    1.50 -			mv lib/ldscripts ../lib
    1.51 -			rm -rf lib
    1.52 -			echo "cook: creating symlinks in: ${CROSS_PREFIX}/$CROSS_TARGET"
    1.53 -			ln -s ../lib lib
    1.54 -			ln -s ../include include
    1.55 -
    1.56 -			cd $WOK/$PACKAGE/source/build
    1.57  			$src/configure \
    1.58  				--prefix=$CROSS_PREFIX \
    1.59  				--libexec=$CROSS_PREFIX/lib \
    1.60 @@ -85,26 +79,18 @@
    1.61  				--enable-c99 \
    1.62  				--enable-long-long \
    1.63  				--enable-__cxa_atexit \
    1.64 -				--disable-threads \
    1.65 +				--enable-threads=posix \
    1.66 +				--with-pkgversion="SliTaz" \
    1.67  				$CROSS_TRIPLET &&
    1.68 -			make && make install ;;
    1.69 +			make && make install &&
    1.70 +			make all-target-libgcc &&
    1.71 +			make install-target-libgcc ;;
    1.72  	esac
    1.73  
    1.74 -	# Some configure options I have tested (pankso)
    1.75 -	#--libexec=$CROSS_PREFIX/lib
    1.76 -	#--disable-threads
    1.77 -	#--disable-checking
    1.78 -	#--disable-shared
    1.79 -	#--disable-nls
    1.80 +	# Some configure options we could use
    1.81  	#--enable-multilib
    1.82  	#--enable-addons
    1.83 -	#--enable-softfloat
    1.84 -	#--with-float=soft
    1.85 -	#--disable-decimal-float
    1.86 -	#--enable-interwork
    1.87 -	#--disable-libgomp
    1.88 -	#--disable-libmudflap
    1.89 -	#--disable-libssp
    1.90 +	#--with-newlib
    1.91  }
    1.92  
    1.93  # Rules to gen a SliTaz package suitable for Tazpkg.
    1.94 @@ -113,4 +99,13 @@
    1.95  	mkdir -p $fs/usr
    1.96  	cp -a $install/usr/cross $fs/usr
    1.97  	rm -rf ${fs}${CROSS_PREFIX}/share
    1.98 +
    1.99 +	# This will fix GCC final build since we dont use --with-sysroot=
   1.100 +	# Without that we go errors such as: cannot find crtn.o
   1.101 +	cd ${fs}${CROSS_PREFIX}/$CROSS_TARGET
   1.102 +	for dir in lib include; do
   1.103 +		mv -f $dir/* ../$dir 2>/dev/null
   1.104 +		rmdir $dir 2>/dev/null
   1.105 +		ln -s ../$dir .
   1.106 +	done
   1.107  }