From dc5e07e73de63369eb35c8c340fd7efbaa8723a8 Mon Sep 17 00:00:00 2001 From: Jessica Hamilton Date: Thu, 5 Jan 2017 19:32:05 +0000 Subject: [PATCH] binutils: also build PE targets for x86_64 --- .../binutils-2.26.1_2016_07_22.recipe | 22 ++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/sys-devel/binutils/binutils-2.26.1_2016_07_22.recipe b/sys-devel/binutils/binutils-2.26.1_2016_07_22.recipe index 160832b3c..fc5a3ee25 100644 --- a/sys-devel/binutils/binutils-2.26.1_2016_07_22.recipe +++ b/sys-devel/binutils/binutils-2.26.1_2016_07_22.recipe @@ -24,7 +24,7 @@ HOMEPAGE="http://www.gnu.org/software/binutils" COPYRIGHT="1988-2016 Free Software Foundation, Inc." LICENSE="GNU GPL v3 GNU LGPL v3" -REVISION="2" +REVISION="3" srcGitRev="68e96393c7be88bc0e577404869a07ad3c0b48b3" SOURCE_URI="https://github.com/haiku/buildtools/archive/$srcGitRev.tar.gz" CHECKSUM_SHA256="5f14f68a76035a04d15b1a3e9ba5bbd990b1b380b110b93cb33355142dca8f9c" @@ -67,6 +67,7 @@ BUILD_REQUIRES=" BUILD_PREREQUIRES=" cmd:autoconf cmd:awk + cmd:bison cmd:find cmd:flex cmd:gcc$secondaryArchSuffix @@ -94,17 +95,25 @@ BUILD() # Touch all *.info files, as newer texinfos don't like their format (cd $sourceDir; find . -name \*.info | xargs touch) - (cd $sourceDir; find . -name \*.y | sed 's/.y$/.c/g' | xargs touch) - (cd $sourceDir; find . -name \*.y | sed 's/.y$/.h/g' | xargs touch) + # Touch all *.y files, ensure they get generated; without this, the + # PE targets would fail to link + (cd $sourceDir; find . -name \*.y | xargs touch) mkdir -p $objectsDir cd $objectsDir + binUtilsTargets=$effectiveTargetMachineTriple + + if [ $effectiveTargetArchitecture == x86_64 ]; then + binUtilsTargets="$binUtilsTargets,i386-efi-pe,x86_64-efi-pe" + fi + CFLAGS=-O2 CXXFLAGS=-O2 runConfigure "$sourceDir/configure" \ --exec-prefix=$installDir \ --includedir=$includeDir/binutils \ --docdir=$docDir --enable-deterministic-archives \ --disable-nls --enable-shared=yes \ + --enable-targets=$binUtilsTargets \ --with-sysroot=/ # Note: The sysroot option is normally superfluous. We have to specify # it, however, since these binutils may be used by the bootstrap-gcc, @@ -165,6 +174,13 @@ INSTALL() echo "Cleanup" + # delete commands we aren't including + cd $binDir + for cmd in dlltool dllwrap windmc windres; do + rm $cmd + rm -f $installDir/$effectiveTargetMachineTriple/bin/$cmd + done + # delete man pages for commands that we aren't including cd $manDir for cmd in dlltool nlmconv windmc windres; do