# HG changeset patch # User Stanislas Leduc # Date 1684495037 0 # Node ID 7303172dab0d3388179cf2c269e802dae36e5262 # Parent 9d807f162a2298a63a097e9e8b7a30450e800dbb Fix grub4dos build (use gcc49 / binutils223) diff -r 9d807f162a22 -r 7303172dab0d binutils223/receipt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/binutils223/receipt Fri May 19 11:17:17 2023 +0000 @@ -0,0 +1,91 @@ +# SliTaz package receipt. + +PACKAGE="binutils223" +SOURCE="binutils" +VERSION="2.23.1" +CATEGORY="development" +TAGS="assembler linker" +SHORT_DESC="GNU assembler, linker and binary utilities." +MAINTAINER="pankso@slitaz.org" +LICENSE="GPL2" +WEB_SITE="https://www.gnu.org/software/binutils/" + +TARBALL="$SOURCE-$VERSION.tar.bz2" +#WGET_URL="https://www.kernel.org/pub/linux/devel/binutils/$TARBALL" +WGET_URL="http://ftp.gnu.org/gnu/$SOURCE/$TARBALL" + +PROVIDE="libbfd" +DEPENDS="flex glibc zlib" +BUILD_DEPENDS="glibc-dev texinfo zlib-dev" + +HOST_ARCH="i486 arm" + +# Handle cross compilation. +case "$ARCH" in + arm) BUILD_DEPENDS="" ;; +esac + +# @maintainer: Please update also: libbfd + +# What is the latest version available today? +current_version() +{ + wget -O - ${WGET_URL%/*} 2>/dev/null | \ + sed "/latest/d;/$PACKAGE-/!d;/tar/!d;s|.*$PACKAGE-\\(.*\\).tar.*\".*|\\1|" | sort -Vr | sed q +} + +# Rules to configure and make the package. +compile_rules() +{ + case "$ARCH" in + i?86) ARCH_ARGS="--disable-werror --enable-64-bit-bfd" ;; + esac + + mkdir ../binutils-build && + cd ../binutils-build && + $src/configure \ + --program-prefix=$TOOLPREFIX \ + --program-suffix=-2.23 \ + --enable-shared \ + --disable-initfini-array \ + --with-bugurl="http://bugs.slitaz.org/" \ + $CONFIGURE_ARGS \ + $ARCH_ARGS && + make tooldir=/usr && + make install tooldir=/usr && + # This is the default binutils, so create symlinks to the target platform + # binutil binaries. Delete duplicate binaries to save space. + for binutil in $(ls -1 $DESTDIR/usr/bin | grep "${TOOLPREFIX}") + do + path="$DESTDIR/usr/bin/$(echo "$binutil" | sed "s:$TOOLPREFIX::g")" + if [ -e $path ] + then + rm -f $path + fi + ln -s $binutil $path + done +} + +# Rules to gen a SliTaz package suitable for Tazpkg. +genpkg_rules() +{ + cook_copy_folders bin + cook_copy_folders include + cook_copy_files *.a + cook_copy_files *.so* + + # libiberty.h + cp -a $src/include/libiberty.h $fs/usr/include + + # Remove 'strings' (Busybox). + #rm $fs/usr/lib/libiberty.a + rm $fs/usr/bin/strings* + rm $fs/usr/bin/*-strings* + + # Remove build directory (cookutils and tazwok path). + rm -rf $WOK/$PACKAGE/source/$PACKAGE-build + rm -rf $WOK/$PACKAGE/$PACKAGE-build + + chown -R root:root $fs/usr/include/libiberty.h + chmod 644 $fs/usr/include/libiberty.h +} diff -r 9d807f162a22 -r 7303172dab0d grub4dos/receipt --- a/grub4dos/receipt Sun May 14 19:10:16 2023 +0000 +++ b/grub4dos/receipt Fri May 19 11:17:17 2023 +0000 @@ -10,7 +10,7 @@ WEB_SITE="https://grub4dos.sourceforge.net/" WGET_URL="$SF_MIRROR/$PACKAGE/$TARBALL" -BUILD_DEPENDS="lzma gcc3 binutils" +BUILD_DEPENDS="lzma gcc49 binutils223" # What is the latest version available today? current_version() @@ -33,7 +33,9 @@ sed -i 's|-O binary conftest|--only-section=.text &|' acinclude.m4 configure sed -i 's|-O binary |&-R .note -R .comment -R .note.gnu.build-id |' stage?/Makefile* sed -i 's|-Wl,-Ttext|-Wl,--section-start=.note.gnu.property=1000 &|' stage2/Makefile* - sh ./configure CC=gcc-3 \ + # Use -fno-reorder-functions to avoid Segment fault with gcc >= 4.6 + sh ./configure CC=gcc-49 \ + CFLAGS="-march=i486 -Os -pipe -fno-reorder-functions" \ --enable-preset-menu=$stuff/menu.lst \ --without-curses \ $CONFIGURE_ARGS &&