-
-
Save jck/5504309 to your computer and use it in GitHub Desktop.
binutils-msp430
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Contributor: Rick W. Chen <stuffcorpse at archlinux dot us> | |
pkgname=binutils-msp430 | |
pkgver=20120406 | |
pkgrel=1 | |
pkgdesc="A set of programs to assemble and manipulate binary and object files for the MSP430 architecture" | |
arch=('i686' 'x86_64') | |
url="http://sourceforge.net/projects/mspgcc/" | |
license=('GPL') | |
depends=('zlib') | |
options=('!libtool' '!distcc' '!ccache') | |
_binutils_ver=2.21.1a | |
_gnu_mirror="http://ftpmirror.gnu.org" | |
_sf_base="http://sourceforge.net/projects/mspgcc/files" | |
_patches_base="${_sf_base}/Patches/LTS/${_mspgcc_ver}" | |
_patches=() | |
source=("${_sf_base}/mspgcc/mspgcc-${pkgver}.tar.bz2" | |
"${_gnu_mirror}/binutils/binutils-${_binutils_ver}.tar.bz2" | |
"0001_ld_makefile_libdir.patch" | |
"0002_binutils-texinfo-5.0-gas-doc.patch" | |
"0003-binutils-texinfo-5.0.patch") | |
sha1sums=('cc96a7233f0b1d2c106eff7db6fc00e4ed9039a8' | |
'525255ca6874b872540c9967a1d26acfbc7c8230' | |
'7a5d78fd94fd99dd544816db75a14c326c494e68' | |
'b92aba28a090f214a650102ad0f0862c37b45e58' | |
'417b1cdb35c41a08d3ca967c165c0d79588986e9') | |
# the folder name does not have the 'a' in the end | |
prepare() { | |
cd ${srcdir}/binutils-${_binutils_ver%a} | |
_patch_name="msp430-binutils-${_binutils_ver}-${pkgver}.patch" | |
patch -p1 -i "${srcdir}/mspgcc-${pkgver}/${_patch_name}" | |
patch -p0 -i "${srcdir}/0001_ld_makefile_libdir.patch" | |
patch -p1 -i "${srcdir}/0002_binutils-texinfo-5.0-gas-doc.patch" | |
patch -p1 -i "${srcdir}/0003-binutils-texinfo-5.0.patch" | |
# hack! - libiberty configure tests for header files using "$CPP $CPPFLAGS" | |
sed -i "/ac_cpp=/s/\$CPPFLAGS/\$CPPFLAGS -O2/" libiberty/configure | |
mkdir ${srcdir}/binutils-build | |
} | |
build() { | |
cd ${srcdir}/binutils-build | |
"${srcdir}/binutils-${_binutils_ver%a}/configure" \ | |
--prefix=/usr \ | |
--program-prefix="msp430-" \ | |
--disable-multilib \ | |
--disable-nls \ | |
--enable-install-libbfd \ | |
--infodir=/usr/share/info \ | |
--libdir=/usr/msp430/lib \ | |
--mandir=/usr/share/man \ | |
--target=msp430 | |
# This checks the host environment and makes sure all the necessary | |
# tools are available to compile Binutils. | |
make configure-host | |
make tooldir=/usr | |
} | |
check() { | |
cd ${srcdir}/binutils-build | |
# do not abort on errors - manually check log files | |
make LDFLAGS="" -k check || true | |
} | |
package() { | |
cd ${srcdir}/binutils-build | |
make DESTDIR=${pkgdir} tooldir=/usr install | |
rm -f ${pkgdir}/usr/lib/libiberty.a | |
rm -f ${pkgdir}/usr/man/man1/{dlltool,nlmconv,windres}* | |
rm -f ${pkgdir}/usr/share/info/dir | |
cd ${pkgdir}/usr/share/info | |
for file in as bfd binutils configure gprof ld standards ; do | |
mv ${file}.info "msp430-${file}.info" | |
done | |
for bin in addr2line ar as c++filt gprof ld nm objcopy \ | |
objdump ranlib readelf size strings strip | |
do | |
rm -f ${pkgdir}/usr/bin/${bin} | |
done | |
install -Dm644 "${srcdir}/binutils-2.21.1/COPYING" \ | |
"${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" | |
} | |
# vim:set sts=2 ts=2 sw=2 et: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Getting error: 0001_ld_makefile_libdir.patch was not found in the build directory and is not a URL. i have the same problem,and how to solve it?