Skip to content

Commit

Permalink
Add GNU binutils for Z80
Browse files Browse the repository at this point in the history
  • Loading branch information
atirut-w committed Jun 20, 2024
1 parent 1df27aa commit 8dc6610
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions binutils-z80/lure.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name='binutils-z80'
version='2.42'
release='1'
desc='Cross-build binary utilities for z80'
homepage='https://www.gnu.org/software/binutils/'
maintainer='Atirut Wattanamongkol <[email protected]>'
architectures=('amd64')
license=('GPL-2.0-only')

build_deps_fedora=('gmp-devel' 'mpfr-devel' 'texinfo')

sources=('https://ftp.gnu.org/gnu/binutils/binutils-2.42.tar.xz')
checksums=('SKIP')

prepare() {
cd "$srcdir/binutils-2.42"
# Turn off dev mode (very strict compiler flags)
sed -i '/^development=/s/true/false/' bfd/development.sh
}

build() {
cd "$srcdir/binutils-2.42"
./configure --target=z80-elf --prefix=/usr
make -j$(NCPU)
}

package() {
cd "$srcdir/binutils-2.42"
make DESTDIR="$pkgdir" install

# Clean up conflicting files
rm -r "$pkgdir/usr/lib/"
rm -r "$pkgdir/usr/share/info/"
rm -r "$pkgdir/usr/share/locale/"
}

0 comments on commit 8dc6610

Please sign in to comment.