<?xml version="1.0"?>
<package name="binutils">
	<description>GNU binary utilities</description>
	<releases>
		<release version="2.46.0" revision="1" tag="stage1">
			<build>
				<script>
					<archive name="binutils-$VERSION" builddir="binutils-build">
						<cmd>../binutils-$VERSION/configure --build=$HOST --host=$HOST --target=$TARGET --with-sysroot=/upkg --with-lib-path=/stage2/lib --enable-shared --enable-64-bit-bfd --enable-deterministic-archives --disable-werror --disable-nls --without-zstd</cmd>
						<cmd>make configure-host</cmd>
						<cmd>make</cmd>
						<cmd>make install -j 1</cmd>
					</archive>
				</script>
			</build>
		</release>
		<release version="2.46.0" revision="1" tag="stage2">
			<build>
				<script>
					<archive name="binutils-$VERSION" builddir="binutils-build">
						<cmd>../binutils-$VERSION/configure --build=$HOST --host=$TARGET --target=$TARGET --enable-shared --enable-64-bit-bfd --enable-deterministic-archives --disable-werror --disable-nls --without-zstd</cmd>
						<cmd>make configure-host</cmd>
						<cmd>make</cmd>
						<cmd>make install -j 1</cmd>
					</archive>
				</script>
			</build>
		</release>
		<release version="2.46.0" revision="1">
			<settings>
				<!-- strip rewrites files in-place, so it can't strip itself or any of its libraries -->
				<variable name="STRIP">/stage2/bin/strip</variable>
			</settings>
			<build>
				<script>
					<archive name="binutils-$VERSION" builddir="binutils-build">
						<!-- don't install standards.info
						     more up-to-date version in autoconf package -->
						<cmd>sed -i -e 's/standards.info//g' ../binutils-$VERSION/etc/Makefile.in</cmd>
					
						<!-- there seems to be a bug in binutils with unsupported languages -->
						<cmd>unset LINGUAS</cmd>
						<cmd>../binutils-$VERSION/configure --enable-shared --enable-64-bit-bfd --enable-plugins --enable-deterministic-archives --disable-werror --without-zstd</cmd>
						<cmd>make tooldir=/usr infodir=/usr/share/info mandir=/usr/share/man</cmd>
						
						<cmd>make tooldir=/usr infodir=/usr/share/info mandir=/usr/share/man install -j 1</cmd>
						<cmd>install -m 644 ../binutils-$VERSION/include/libiberty.h /usr/include/libiberty.h</cmd>
					</archive>
				</script>
			</build>
		</release>
	</releases>
</package>
