initial commit

This commit is contained in:
BigfootACA 2024-09-20 18:19:35 +08:00
commit 6af2cb601d
3 changed files with 139 additions and 0 deletions

20
.SRCINFO Normal file
View File

@ -0,0 +1,20 @@
pkgbase = mingw-w64-binutils
pkgdesc = Cross binutils for the MinGW-w64 cross-compiler
pkgver = 2.43.1
pkgrel = 1
url = http://www.gnu.org/software/binutils
arch = x86_64
arch = aarch64
groups = mingw-w64-toolchain
groups = mingw-w64
license = GPL
makedepends = git
depends = zlib
provides = mingw-w64-gdb
conflicts = mingw-w64-gdb
options = !libtool
options = !emptydirs
source = git+https://gitea.classfun.cn:4443/mirrors/binutils-gdb.git
sha512sums = SKIP
pkgname = mingw-w64-binutils

53
.gitignore vendored Normal file
View File

@ -0,0 +1,53 @@
*.rej
*.orig
*.swp
*.save*
*.o
*.a
*.out
*.lib
*.obj
*.dll
*.so
*.exe
*.gch
*.plist
*.mo
*.gmo
*.fd
*.iso
*.img
*.img.*
*.qcow2
*.vhd
*.vdi
*.vmdk
*.cpio
*.cpio.*
*.ttf
*.ttc
*.pcf
*.pcf.*
*.efi
*.pkg.tar.*
vgcore.*
/build*
initramfs*.*
initrd*.*
System.map*
/cmake-build-*
/.idea
/.vscode
/.cache
CMakeCache.txt
CMakeFiles
Makefile
cmake_install.cmake
node_modules
package.json
package-lock.json
fonts.scale
fonts.dir
/src
/pkg
/binutils-gdb

66
PKGBUILD Normal file
View File

@ -0,0 +1,66 @@
# Maintainer: Felix Yan <felixonmars@archlinux.org>
pkgname=mingw-w64-binutils
pkgver=2.43.1
pkgrel=1
pkgdesc="Cross binutils for the MinGW-w64 cross-compiler"
arch=('x86_64' 'aarch64')
url="http://www.gnu.org/software/binutils"
license=('GPL')
groups=('mingw-w64-toolchain' 'mingw-w64')
makedepends=('git')
depends=('zlib')
options=('!libtool' '!emptydirs')
provides=('mingw-w64-gdb')
conflicts=('mingw-w64-gdb')
source=(git+https://gitea.classfun.cn:4443/mirrors/binutils-gdb.git)
sha512sums=('SKIP')
_targets="i686-w64-mingw32 x86_64-w64-mingw32 aarch64-w64-mingw32"
get_latest() {
cd "$srcdir/binutils-gdb"
git tag | grep -E '^binutils-[0-9]+_[0-9]+(_[0-9]+)*$' | sort --version-sort | tail -n1
}
pkgver() {
get_latest | sed 's,^binutils-,,;s,_,.,g'
}
prepare() {
cd "$srcdir/binutils-gdb"
git checkout "$(get_latest)"
}
prepare() {
cd "$srcdir/binutils-gdb"
#do not install libiberty
sed -i 's/install_to_$(INSTALL_DEST) //' libiberty/Makefile.in
}
build() {
for _target in $_targets; do
echo "Building ${_target} cross binutils"
mkdir -p "$srcdir"/binutils-${_target} && cd "${srcdir}/binutils-${_target}"
"$srcdir"/binutils-gdb/configure --prefix=/usr \
--target=${_target} \
--infodir=/usr/share/info/${_target} \
--enable-lto \
--enable-plugins \
--enable-deterministic-archives \
--disable-multilib \
--disable-nls \
--disable-werror
make -O
done
}
package() {
for _target in ${_targets}; do
echo "Installing ${_target} cross binutils"
cd "$srcdir"/binutils-${_target}
make DESTDIR="$pkgdir" install
rm "$pkgdir"/usr/lib/bfd-plugins/libdep.so
done
}