wok rev 25579

Fix grub4dos build (use gcc49 / binutils223)
author Stanislas Leduc <shann@slitaz.org>
date Fri May 19 11:17:17 2023 +0000 (18 months ago)
parents 9d807f162a22
children 2b069c72d47e
files binutils223/receipt grub4dos/receipt
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/binutils223/receipt	Fri May 19 11:17:17 2023 +0000
     1.3 @@ -0,0 +1,91 @@
     1.4 +# SliTaz package receipt.
     1.5 +
     1.6 +PACKAGE="binutils223"
     1.7 +SOURCE="binutils"
     1.8 +VERSION="2.23.1"
     1.9 +CATEGORY="development"
    1.10 +TAGS="assembler linker"
    1.11 +SHORT_DESC="GNU assembler, linker and binary utilities."
    1.12 +MAINTAINER="pankso@slitaz.org"
    1.13 +LICENSE="GPL2"
    1.14 +WEB_SITE="https://www.gnu.org/software/binutils/"
    1.15 +
    1.16 +TARBALL="$SOURCE-$VERSION.tar.bz2"
    1.17 +#WGET_URL="https://www.kernel.org/pub/linux/devel/binutils/$TARBALL"
    1.18 +WGET_URL="http://ftp.gnu.org/gnu/$SOURCE/$TARBALL"
    1.19 +
    1.20 +PROVIDE="libbfd"
    1.21 +DEPENDS="flex glibc zlib"
    1.22 +BUILD_DEPENDS="glibc-dev texinfo zlib-dev"
    1.23 +
    1.24 +HOST_ARCH="i486 arm"
    1.25 +
    1.26 +# Handle cross compilation.
    1.27 +case "$ARCH" in
    1.28 +	arm) BUILD_DEPENDS="" ;;
    1.29 +esac
    1.30 +
    1.31 +# @maintainer: Please update also: libbfd
    1.32 +
    1.33 +# What is the latest version available today?
    1.34 +current_version()
    1.35 +{
    1.36 +	wget -O - ${WGET_URL%/*} 2>/dev/null | \
    1.37 +	sed "/latest/d;/$PACKAGE-/!d;/tar/!d;s|.*$PACKAGE-\\(.*\\).tar.*\".*|\\1|" | sort -Vr | sed q
    1.38 +}
    1.39 +
    1.40 +# Rules to configure and make the package.
    1.41 +compile_rules()
    1.42 +{
    1.43 +	case "$ARCH" in
    1.44 +		i?86) ARCH_ARGS="--disable-werror --enable-64-bit-bfd" ;;
    1.45 +	esac
    1.46 +
    1.47 +	mkdir	../binutils-build &&
    1.48 +	cd	../binutils-build &&
    1.49 +	$src/configure					\
    1.50 +		--program-prefix=$TOOLPREFIX		\
    1.51 +		--program-suffix=-2.23			\
    1.52 +		--enable-shared				\
    1.53 +		--disable-initfini-array		\
    1.54 +		--with-bugurl="http://bugs.slitaz.org/"	\
    1.55 +		$CONFIGURE_ARGS				\
    1.56 +		$ARCH_ARGS &&
    1.57 +	make tooldir=/usr &&
    1.58 +	make install tooldir=/usr &&
    1.59 +	# This is the default binutils, so create symlinks to the target platform
    1.60 +	# binutil binaries. Delete duplicate binaries to save space.
    1.61 +	for binutil in $(ls -1 $DESTDIR/usr/bin | grep "${TOOLPREFIX}")
    1.62 +	  do
    1.63 +		path="$DESTDIR/usr/bin/$(echo "$binutil" | sed "s:$TOOLPREFIX::g")"
    1.64 +		if [ -e $path ]
    1.65 +		  then
    1.66 +			rm -f $path
    1.67 +		fi
    1.68 +		ln -s $binutil $path
    1.69 +	  done
    1.70 +}
    1.71 +
    1.72 +# Rules to gen a SliTaz package suitable for Tazpkg.
    1.73 +genpkg_rules()
    1.74 +{
    1.75 +	cook_copy_folders	bin
    1.76 +	cook_copy_folders	include
    1.77 +	cook_copy_files		*.a
    1.78 +	cook_copy_files		*.so*
    1.79 +
    1.80 +	# libiberty.h
    1.81 +	cp -a $src/include/libiberty.h	$fs/usr/include
    1.82 +
    1.83 +	# Remove 'strings' (Busybox).
    1.84 +	#rm $fs/usr/lib/libiberty.a
    1.85 +	rm				$fs/usr/bin/strings*
    1.86 +	rm				$fs/usr/bin/*-strings*
    1.87 +
    1.88 +	# Remove build directory (cookutils and tazwok path).
    1.89 +	rm -rf $WOK/$PACKAGE/source/$PACKAGE-build
    1.90 +	rm -rf $WOK/$PACKAGE/$PACKAGE-build
    1.91 +
    1.92 +	chown -R root:root		$fs/usr/include/libiberty.h
    1.93 +	chmod 644			$fs/usr/include/libiberty.h
    1.94 +}
     2.1 --- a/grub4dos/receipt	Sun May 14 19:10:16 2023 +0000
     2.2 +++ b/grub4dos/receipt	Fri May 19 11:17:17 2023 +0000
     2.3 @@ -10,7 +10,7 @@
     2.4  WEB_SITE="https://grub4dos.sourceforge.net/"
     2.5  WGET_URL="$SF_MIRROR/$PACKAGE/$TARBALL"
     2.6  
     2.7 -BUILD_DEPENDS="lzma gcc3 binutils"
     2.8 +BUILD_DEPENDS="lzma gcc49 binutils223"
     2.9  
    2.10  # What is the latest version available today?
    2.11  current_version()
    2.12 @@ -33,7 +33,9 @@
    2.13  	sed -i 's|-O binary conftest|--only-section=.text &|' acinclude.m4 configure
    2.14  	sed -i 's|-O binary |&-R .note -R .comment -R .note.gnu.build-id |' stage?/Makefile*
    2.15  	sed -i 's|-Wl,-Ttext|-Wl,--section-start=.note.gnu.property=1000 &|' stage2/Makefile*
    2.16 -	sh ./configure CC=gcc-3 \
    2.17 +	# Use -fno-reorder-functions to avoid Segment fault with gcc >= 4.6
    2.18 +	sh ./configure CC=gcc-49 \
    2.19 +		CFLAGS="-march=i486 -Os -pipe -fno-reorder-functions" \
    2.20  		--enable-preset-menu=$stuff/menu.lst \
    2.21  		--without-curses \
    2.22  	$CONFIGURE_ARGS &&