Merge pull request #7465 from Fabien-Chouteau/arm-none-eabi-gcc-ada
mingw-w64-arm-none-eabi-gcc: update gcc version and enable Ada support
This commit is contained in:
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user