diff options
author | Simon Eriksson | 2021-11-02 19:04:58 +0100 |
---|---|---|
committer | Simon Eriksson | 2021-11-02 19:04:58 +0100 |
commit | b60973c6eac5d17cf0c984ce628992652573c396 (patch) | |
tree | a4e549dbd4aa2f1a63324a55c60b09cc66a70524 | |
parent | b2f6d6a08b75d57e722e4d33790e3a747c445f21 (diff) | |
download | aur-b60973c6eac5d17cf0c984ce628992652573c396.tar.gz |
Simplify CFLAGS_FOR_TARGET
-rw-r--r-- | .SRCINFO | 2 | ||||
-rw-r--r-- | PKGBUILD | 14 |
2 files changed, 10 insertions, 6 deletions
@@ -1,7 +1,7 @@ pkgbase = mips64-elf-newlib pkgdesc = A C library intended for use on embedded systems (mips64-elf) pkgver = 4.1.0 - pkgrel = 2 + pkgrel = 3 url = http://sourceware.org/newlib/ arch = any license = BSD @@ -4,7 +4,7 @@ _target=mips64-elf pkgname=${_target}-newlib pkgver=4.1.0 -pkgrel=2 +pkgrel=3 pkgdesc="A C library intended for use on embedded systems (${_target})" arch=('any') url='http://sourceware.org/newlib/' @@ -14,12 +14,16 @@ options=( '!strip' '!emptydirs') source=("ftp://sourceware.org/pub/newlib/newlib-${pkgver}.tar.gz") sha256sums=('f296e372f51324224d387cc116dc37a6bd397198756746f93a2b02e9a5d40154') +prepare() { + rm -rf build + mkdir build +} + build() { - rm -rf build - mkdir build && cd build + cd build - export CFLAGS_FOR_TARGET='-G0 -O2 -fcommon -ffunction-sections -fdata-sections -fomit-frame-pointer -DHAVE_ASSERT_FUNC' + export CFLAGS_FOR_TARGET='-O2 -ffunction-sections -fdata-sections -fomit-frame-pointer -DHAVE_ASSERT_FUNC' ../newlib-${pkgver}/configure \ --prefix=/usr \ @@ -38,7 +42,7 @@ build() package() { cd build - make DESTDIR="${pkgdir}" install -j1 + make DESTDIR="${pkgdir}" install find "$pkgdir"/usr/$_target/lib \( -name "*.a" -or -name "*.o" \) -exec $_target-objcopy -R .comment -R .note -R .debug_info -R .debug_aranges -R .debug_pubnames -R .debug_pubtypes -R .debug_abbrev -R .debug_line -R .debug_str -R .debug_ranges -R .debug_loc '{}' \; |