From a3cdf21fdde9a126565c16ed68566dbdfdda83ef Mon Sep 17 00:00:00 2001 From: Fabien Chouteau Date: Thu, 17 Dec 2020 08:50:20 -0800 Subject: [PATCH 1/2] mingw-w64-arm-none-eabi-gcc: update gcc version and enable Ada support --- mingw-w64-arm-none-eabi-gcc/PKGBUILD | 31 ++++++++++++++++++++++------ 1 file changed, 25 insertions(+), 6 deletions(-) diff --git a/mingw-w64-arm-none-eabi-gcc/PKGBUILD b/mingw-w64-arm-none-eabi-gcc/PKGBUILD index 004ea204e0..77ce8692eb 100644 --- a/mingw-w64-arm-none-eabi-gcc/PKGBUILD +++ b/mingw-w64-arm-none-eabi-gcc/PKGBUILD @@ -5,15 +5,18 @@ _realname=gcc _target=arm-none-eabi +_enable_ada=yes + pkgbase=mingw-w64-${_target}-${_realname} pkgname=("${MINGW_PACKAGE_PREFIX}-${_target}-${_realname}") -pkgver=8.4.0 -pkgrel=3 +pkgver=10.1.0 +pkgrel=1 pkgdesc='GNU Tools for ARM Embedded Processors - GCC (mingw-w64)' arch=('any') license=('GPL') url='https://www.gnu.org/software/gcc/gcc.html' groups=("${MINGW_PACKAGE_PREFIX}-${_target}-toolchain") +provides==("${MINGW_PACKAGE_PREFIX}-${_target}-gcc-ada") depends=( "${MINGW_PACKAGE_PREFIX}-${_target}-binutils" "${MINGW_PACKAGE_PREFIX}-${_target}-newlib" @@ -24,10 +27,11 @@ depends=( makedepends=( "${MINGW_PACKAGE_PREFIX}-gmp" "${MINGW_PACKAGE_PREFIX}-mpfr" + $([[ "$_enable_ada" == "yes" ]] && echo "${MINGW_PACKAGE_PREFIX}-gcc-ada") ) options=('!emptydirs' '!strip') source=("https://ftp.gnu.org/gnu/gcc/gcc-${pkgver}/gcc-${pkgver}.tar.xz") -sha256sums=('e30a6e52d10e1f27ed55104ad233c30bd1e99cfb5ff98ab022dc941edd1b2dd4') +sha256sums=('b6898a23844b656f1b68691c5c012036c2e694ac4b53a8918d4712ad876e7ea2') prepare() { cd ${srcdir}/gcc-${pkgver} @@ -37,6 +41,8 @@ prepare() { } _build_gcc() { + local _languages=$1 # Comma separated list of languages support to build + local _GCC_LDFLAGS="${LDFLAGS} -Wl,--disable-dynamicbase" ../configure \ --build=${MINGW_CHOST} \ @@ -45,7 +51,7 @@ _build_gcc() { --target=${_target} \ --with-native-system-header-dir=${MINGW_PREFIX}/${MINGW_CHOST}/include \ --libexecdir=${MINGW_PREFIX}/lib \ - --enable-languages=c,c++ \ + --enable-languages=${_languages} \ --enable-plugins \ --disable-decimal-float \ --disable-libffi \ @@ -58,6 +64,7 @@ _build_gcc() { --disable-shared \ --disable-threads \ --disable-tls \ + --disable-libada \ --with-gnu-as \ --with-gnu-ld \ --with-system-zlib \ @@ -76,21 +83,33 @@ _build_gcc() { LDFLAGS="${_GCC_LDFLAGS}" make INHIBIT_LIBC_CFLAGS='-DUSE_TM_CLONE_REGISTRY=0' + + if [[ "${_languages}" == *ada* ]]; then + make -C gcc cross-gnattools + make -C gcc ada.all.cross + fi + } build() { + local _languages="c,c++" + if [ "$_enable_ada" == "yes" ]; then + _languages+=",ada" + fi + cd ${srcdir}/gcc-${pkgver}/gcc-build-${MINGW_CHOST} export CFLAGS_FOR_TARGET='-g -Os -ffunction-sections -fdata-sections' export CXXFLAGS_FOR_TARGET='-g -Os -ffunction-sections -fdata-sections' - _build_gcc + _build_gcc ${_languages} # Build libstdc++ without exceptions support (the 'nano' variant) cd ${srcdir}/gcc-${pkgver}/gcc-build-nano-${MINGW_CHOST} export CFLAGS_FOR_TARGET='-g -Os -ffunction-sections -fdata-sections -fno-exceptions' export CXXFLAGS_FOR_TARGET='-g -Os -ffunction-sections -fdata-sections -fno-exceptions' - _build_gcc + # Only C and C++ are required for the nano build + _build_gcc "c,c++" } package() { From a01b57ef70397ff0e91f20aa64ae11a8a04e6879 Mon Sep 17 00:00:00 2001 From: Christoph Reiter Date: Sun, 21 Feb 2021 17:06:09 +0100 Subject: [PATCH 2/2] syntax fixes --- mingw-w64-arm-none-eabi-gcc/PKGBUILD | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mingw-w64-arm-none-eabi-gcc/PKGBUILD b/mingw-w64-arm-none-eabi-gcc/PKGBUILD index 77ce8692eb..8b20132830 100644 --- a/mingw-w64-arm-none-eabi-gcc/PKGBUILD +++ b/mingw-w64-arm-none-eabi-gcc/PKGBUILD @@ -16,7 +16,7 @@ arch=('any') license=('GPL') url='https://www.gnu.org/software/gcc/gcc.html' groups=("${MINGW_PACKAGE_PREFIX}-${_target}-toolchain") -provides==("${MINGW_PACKAGE_PREFIX}-${_target}-gcc-ada") +provides=("${MINGW_PACKAGE_PREFIX}-${_target}-gcc-ada") depends=( "${MINGW_PACKAGE_PREFIX}-${_target}-binutils" "${MINGW_PACKAGE_PREFIX}-${_target}-newlib"