summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorBaltazár Radics2021-11-03 16:28:41 +0100
committerBaltazár Radics2021-11-03 16:28:41 +0100
commit11fd5f103e626c4b38ae91f140e2976e97f08779 (patch)
tree6064da06e2d82bc4c1ef59d0fbdcbedb808625ac
parent69e8c804a8a5e9c7fe6a5649ffc1f39f6777b862 (diff)
downloadaur-11fd5f103e626c4b38ae91f140e2976e97f08779.tar.gz
update to espressif's new branch based on 3.3.0
-rw-r--r--.SRCINFO9
-rw-r--r--PKGBUILD164
2 files changed, 111 insertions, 62 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 5272c66c3dfe..f4ed308432c5 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,15 +1,14 @@
pkgbase = xtensa-esp32-elf-newlib
pkgdesc = A C standard library implementation intended for use on embedded systems (xtensa esp32 bare metal)
- pkgver = 3.0.0
- pkgrel = 2
+ pkgver = 3.3.0.2021r2
+ pkgrel = 1
url = https://github.com/espressif/newlib-esp32
arch = x86_64
license = GPL
makedepends = xtensa-esp32-elf-gcc
options = !emptydirs
options = !strip
- source = newlib-esp32-esp-2020r1.tar.gz::https://codeload.github.com/espressif/newlib-esp32/tar.gz/esp-2020r1
- sha256sums = c11651496bafd9394cb4b4658f455493c7da7cf128e84595b272a4072a64a5a9
+ source = newlib-esp32-esp-2021r2.tar.gz::https://codeload.github.com/espressif/newlib-esp32/tar.gz/esp-2021r2
+ sha256sums = dae87a0dd10cd4f107980a93cd458940ae02d3e03efdb4d3489b9fbaca9f478e
pkgname = xtensa-esp32-elf-newlib
-
diff --git a/PKGBUILD b/PKGBUILD
index df0991b09f7a..1363d8f4f60f 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,11 +1,11 @@
# Maintainer: Baltazár Radics <baltazar.radics@gmail.com>
_target=xtensa-esp32-elf
-pkgname=$_target-newlib
-pkgver=3.0.0
-pkgrel=2
+_upstream_ver=esp-2021r2
_upstream_name=newlib-esp32
-_upstream_ver=esp-2020r1
+pkgname=$_target-newlib
+pkgver=3.3.0.${_upstream_ver#esp-}
+pkgrel=1
pkgdesc='A C standard library implementation intended for use on embedded systems (xtensa esp32 bare metal)'
arch=(x86_64)
url='https://github.com/espressif/newlib-esp32'
@@ -13,68 +13,118 @@ license=(GPL)
makedepends=($_target-gcc)
options=(!emptydirs !strip)
source=("$_upstream_name-$_upstream_ver.tar.gz::https://codeload.github.com/espressif/$_upstream_name/tar.gz/$_upstream_ver")
-sha256sums=('c11651496bafd9394cb4b4658f455493c7da7cf128e84595b272a4072a64a5a9')
+sha256sums=('dae87a0dd10cd4f107980a93cd458940ae02d3e03efdb4d3489b9fbaca9f478e')
build() {
- rm -rf build-{newlib,nano}
- mkdir build-{newlib,nano}
+ rm -rf build-{newlib,nano}
+ mkdir build-{newlib,nano}
+
+ # espressif's crosstool-ng:
+ # CC_FOR_BUILD='x86_64-build_pc-linux-gnu-gcc'
+ # CFLAGS_FOR_TARGET=' -mlongcalls '
+ # AR_FOR_TARGET='./.build/xtensa-esp32-elf/buildtools/bin/xtensa-esp32-elf-gcc-ar'
+ # RANLIB_FOR_TARGET='./.build/xtensa-esp32-elf/buildtools/bin/xtensa-esp32-elf-gcc-ranlib'
+ # '/usr/bin/bash'
+ # './.build/xtensa-esp32-elf/src/newlib/configure'
+ # '--host=x86_64-build_pc-linux-gnu'
+ # '--target=xtensa-esp32-elf'
+ # '--prefix=./builds/xtensa-esp32-elf'
+ # '--enable-newlib-io-float'
+ # '--disable-newlib-io-long-double'
+ # '--disable-newlib-supplied-syscalls'
+ # '--enable-newlib-io-pos-args'
+ # '--enable-newlib-io-c99-formats'
+ # '--enable-newlib-io-long-long'
+ # '--disable-newlib-register-fini'
+ # '--disable-newlib-nano-malloc'
+ # '--disable-newlib-nano-formatted-io'
+ # '--enable-newlib-atexit-dynamic-alloc'
+ # '--disable-newlib-global-atexit'
+ # '--disable-lite-exit'
+ # '--enable-newlib-reent-small'
+ # '--enable-newlib-multithread'
+ # '--enable-newlib-wide-orient'
+ # '--enable-newlib-unbuf-stream-opt'
+ # '--enable-target-optspace'
+ # '--enable-newlib-long-time_t'
+ # '--enable-newlib-nano-malloc'
+
+ export CFLAGS_FOR_TARGET='-g -O2 -ffunction-sections -fdata-sections -mlongcalls'
+ cd "$srcdir"/build-newlib
+ ../$_upstream_name-$_upstream_ver/configure \
+ --target=$_target \
+ --prefix=/usr \
+ --enable-newlib-io-float \
+ --disable-newlib-io-long-double \
+ --disable-newlib-supplied-syscalls \
+ --enable-newlib-io-pos-args \
+ --enable-newlib-io-c99-formats \
+ --enable-newlib-io-long-long \
+ --disable-newlib-register-fini \
+ --disable-newlib-nano-malloc \
+ --disable-newlib-nano-formatted-io \
+ --enable-newlib-atexit-dynamic-alloc \
+ --disable-newlib-global-atexit \
+ --disable-lite-exit \
+ --enable-newlib-reent-small \
+ --enable-newlib-multithread \
+ --enable-newlib-wide-orient \
+ --enable-newlib-unbuf-stream-opt \
+ --enable-target-optspace \
+ --enable-newlib-long-time_t \
+ --enable-newlib-nano-malloc
+ make
- # flags: https://github.com/espressif/crosstool-NG
- export CFLAGS_FOR_TARGET='-g -O2 -ffunction-sections -fdata-sections -mlongcalls'
- cd "$srcdir"/build-newlib
- ../$_upstream_name-$_upstream_ver/configure \
- --prefix=/usr \
- --target=$_target \
- --enable-newlib-atexit-dynamic-alloc \
- --enable-newlib-io-c99-formats \
- --enable-newlib-io-float \
- --enable-newlib-io-long-long \
- --enable-newlib-io-pos-args \
- --enable-newlib-long-time_t \
- --enable-newlib-multithread \
- --enable-newlib-nano-malloc \
- --enable-newlib-reent-small \
- --enable-newlib-unbuf-stream-opt \
- --enable-newlib-wide-orient \
- --enable-target-optspace \
- --disable-lite-exit \
- --disable-newlib-global-atexit \
- --disable-newlib-io-long-double \
- --disable-newlib-nano-formatted-io \
- --disable-newlib-register-fini \
- --disable-newlib-supplied-syscalls
- make
+ # espressif's crosstool-ng:
+ # CC_FOR_BUILD='x86_64-build_pc-linux-gnu-gcc'
+ # CFLAGS_FOR_TARGET=' -mlongcalls '
+ # AR_FOR_TARGET='./.build/xtensa-esp32-elf/buildtools/bin/xtensa-esp32-elf-gcc-ar'
+ # RANLIB_FOR_TARGET='./.build/xtensa-esp32-elf/buildtools/bin/xtensa-esp32-elf-gcc-ranlib'
+ # '/usr/bin/bash'
+ # './.build/xtensa-esp32-elf/src/newlib/configure'
+ # '--host=x86_64-build_pc-linux-gnu'
+ # '--target=xtensa-esp32-elf'
+ # '--prefix=./builds/xtensa-esp32-elf'
+ # '--with-newlib'
+ # '--enable-multilib'
+ # '--disable-newlib-io-c99-formats'
+ # '--disable-newlib-supplied-syscalls'
+ # '--enable-newlib-nano-formatted-io'
+ # '--enable-newlib-reent-small'
+ # '--enable-target-optspace'
+ # '--enable-newlib-long-time_t'
+ # '--enable-newlib-nano-malloc'
- export CFLAGS_FOR_TARGET='-g -Os -ffunction-sections -fdata-sections -mlongcalls'
- cd "$srcdir"/build-nano
- ../$_upstream_name-$_upstream_ver/configure \
- --prefix=/usr \
- --target=$_target \
- --with-newlib \
- --enable-multilib \
- --enable-newlib-long-time_t \
- --enable-newlib-nano-formatted-io \
- --enable-newlib-nano-malloc \
- --enable-newlib-reent-small \
- --enable-target-optspace \
- --disable-newlib-io-c99-formats \
- --disable-newlib-supplied-syscalls
- make
+ export CFLAGS_FOR_TARGET='-g -Os -ffunction-sections -fdata-sections -mlongcalls'
+ cd "$srcdir"/build-nano
+ ../$_upstream_name-$_upstream_ver/configure \
+ --target=$_target \
+ --prefix=/usr \
+ --with-newlib \
+ --enable-multilib \
+ --disable-newlib-io-c99-formats \
+ --disable-newlib-supplied-syscalls \
+ --enable-newlib-nano-formatted-io \
+ --enable-newlib-reent-small \
+ --enable-target-optspace \
+ --enable-newlib-long-time_t \
+ --enable-newlib-nano-malloc
+ make
}
package() {
- cd "$srcdir"/build-nano
- make DESTDIR="$pkgdir" install -j1
- find "$pkgdir" -regex ".*/lib\(c\|g\|rdimon\)\.a" -exec rename .a _nano.a '{}' \;
- install -d "$pkgdir"/usr/$_target/include/newlib-nano
- install -m644 -t "$pkgdir"/usr/$_target/include/newlib-nano "$pkgdir"/usr/$_target/include/newlib.h
+ cd "$srcdir"/build-nano
+ make DESTDIR="$pkgdir" install -j1
+ find "$pkgdir" -regex ".*/lib\(c\|g\|rdimon\)\.a" -exec rename .a _nano.a '{}' \;
+ install -d "$pkgdir"/usr/$_target/include/newlib-nano
+ install -m644 -t "$pkgdir"/usr/$_target/include/newlib-nano "$pkgdir"/usr/$_target/include/newlib.h
- cd "$srcdir"/build-newlib
- make DESTDIR="$pkgdir" install -j1
+ cd "$srcdir"/build-newlib
+ make DESTDIR="$pkgdir" install -j1
- 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 '{}' \;
+ 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 '{}' \;
- install -d "$pkgdir"/usr/share/licenses/$pkgname/
- install -m644 -t "$pkgdir"/usr/share/licenses/$pkgname/ "$srcdir"/$_upstream_name-$_upstream_ver/COPYING*
+ install -d "$pkgdir"/usr/share/licenses/$pkgname/
+ install -m644 -t "$pkgdir"/usr/share/licenses/$pkgname/ "$srcdir"/$_upstream_name-$_upstream_ver/COPYING*
}