diff options
-rw-r--r-- | .SRCINFO | 36 | ||||
-rwxr-xr-x | PKGBUILD | 88 | ||||
-rwxr-xr-x | gcc-4.9-multilib2.patch | 101 | ||||
-rwxr-xr-x | gcc-4.9-no-exceptions.patch | 20 |
4 files changed, 245 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..266e7e8d3c19 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,36 @@ +pkgbase = arm-none-eabi-gcc49-linaro + pkgdesc = The GNU Compiler Collection - cross compiler for ARM EABI (bare-metal) target. + pkgver = 4.9_2014.09 + pkgrel = 1 + url = https://releases.linaro.org/ + arch = i686 + arch = x86_64 + groups = arm-none-eabi-toolchain + license = GPL + license = LGPL + makedepends = flex + makedepends = bison + depends = arm-none-eabi-binutils>=2.23.2 + depends = gmp + depends = mpfr + depends = libmpc + provides = arm-none-eabi-gcc + conflicts = arm-none-eabi-gcc + conflicts = cross-arm-none-eabi-gcc + options = staticlibs + options = !libtool + options = !emptydirs + options = !strip + options = zipman + options = docs + source = http://releases.linaro.org/14.09/components/toolchain/gcc-linaro/4.9/gcc-linaro-4.9-2014.09.tar.xz + source = http://releases.linaro.org/14.09/components/toolchain/newlib-linaro/newlib-linaro-2.1.0-2014.09.tar.bz2 + source = gcc-4.9-multilib2.patch + source = gcc-4.9-no-exceptions.patch + sha256sums = c708c486f62f0d283f8615d7bc05d9830d50e15c52cfe213ec3992f6c190c222 + sha256sums = ed92e8547246834725a3c5743fa41d3f573e3e5d2e5066d433ac3c29e6676fc8 + sha256sums = 104b9aa652804a56338470983e6975af1d1e5440eb8bddae3a01a966d2b332cf + sha256sums = 3a1d6a17aba8a578ade3552a6d1beb66a129fb4f3268539596d39cbbef88ac6c + +pkgname = arm-none-eabi-gcc49-linaro + diff --git a/PKGBUILD b/PKGBUILD new file mode 100755 index 000000000000..2279763986a1 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,88 @@ +# Maintainer: Johnny Halfmoon <jhalfmoon@milksnot.com> + +pkgname=arm-none-eabi-gcc49-linaro +_relver=4.9 +_relshortdate=14.09 +_reldate=20${_relshortdate} +_relverdate=${_relver}-${_reldate} +# This is how I want to define the pkgver, but the AUR doesn't understand it, because multiple _ characters are not allowed +#pkgver=${_relver}_${_reldate//-/_} +pkgver=4.9_2014.09 +pkgrel=1 +_newlibver=linaro-2.1.0-2014.09 +#_newlibver=2.0.0 +pkgdesc="The GNU Compiler Collection - cross compiler for ARM EABI (bare-metal) target." +arch=(i686 x86_64) +url="https://releases.linaro.org/" +license=('GPL' 'LGPL') +groups=('arm-none-eabi-toolchain') +depends=('arm-none-eabi-binutils>=2.23.2' 'gmp' 'mpfr' 'libmpc') +makedepends=('flex' 'bison') +provides=('arm-none-eabi-gcc') +conflicts=('arm-none-eabi-gcc' 'cross-arm-none-eabi-gcc') +options=(staticlibs !libtool !emptydirs !strip zipman docs) +source=(http://releases.linaro.org/${_relshortdate}/components/toolchain/gcc-linaro/${_relver}/gcc-linaro-${_relverdate}.tar.xz + http://releases.linaro.org/14.09/components/toolchain/newlib-linaro/newlib-${_newlibver}.tar.bz2 + gcc-${_relver}-multilib2.patch + gcc-${_relver}-no-exceptions.patch) +_basedir=gcc-linaro-${_relverdate} + +build() { + cd ${srcdir} + mv ${srcdir}/newlib-${_newlibver}/newlib ${_basedir} + mv ${srcdir}/newlib-${_newlibver}/libgloss ${_basedir} + +hortdate=14.09 +_reldate=20${_relshortdate} + +cd ${srcdir}/${_basedir} + patch -Np0 -i "${srcdir}/gcc-${_relver}-multilib2.patch" + patch -Np0 -i "${srcdir}/gcc-${_relver}-no-exceptions.patch" + + mkdir build + cd build + + export CFLAGS="-O2" + export CXXFLAGS="-O2" + unset CPPFLAGS + ../configure --with-pkgversion="Arch User Repository" \ + --with-bugurl="https://aur.archlinux.org/packages/arm-none-eabi-gcc-linaro" \ + --target=arm-none-eabi\ + --prefix=/usr \ + --libexecdir=/usr/lib \ + --datarootdir=/usr/share/arm-none-eabi-gcc \ + --enable-multilib \ + --enable-languages=c,c++ \ + --enable-interwork \ + --with-newlib \ + --with-gnu-as \ + --with-gnu-ld \ + --with-system-zlib \ + --disable-nls \ + --disable-shared \ + --disable-threads \ + --disable-libssp \ + --disable-libstdcxx-pch \ + --disable-libmudflap \ + --disable-libgomp \ + --enable-silent-rules \ + --with-headers=newlib/libc/include \ + --disable-newlib-supplied-syscalls + make +} + +package() { + cd ${srcdir}/${_basedir}/build + make -j1 DESTDIR=${pkgdir} install + + # libiberty.a conflicts with host version + rm -f $pkgdir/usr/lib/libiberty.a +} + +# vim: set ts=2 sw=2 ft=sh et: + +sha256sums=('c708c486f62f0d283f8615d7bc05d9830d50e15c52cfe213ec3992f6c190c222' + 'ed92e8547246834725a3c5743fa41d3f573e3e5d2e5066d433ac3c29e6676fc8' + '104b9aa652804a56338470983e6975af1d1e5440eb8bddae3a01a966d2b332cf' + '3a1d6a17aba8a578ade3552a6d1beb66a129fb4f3268539596d39cbbef88ac6c') + diff --git a/gcc-4.9-multilib2.patch b/gcc-4.9-multilib2.patch new file mode 100755 index 000000000000..2ee91fcf3e24 --- /dev/null +++ b/gcc-4.9-multilib2.patch @@ -0,0 +1,101 @@ +--- gcc/config/arm/t-arm-elf.orig 2013-01-10 21:38:27.000000000 +0100 ++++ gcc/config/arm/t-arm-elf 2013-06-02 00:02:10.473472897 +0200 +@@ -18,73 +18,29 @@ + + MULTILIB_OPTIONS = marm/mthumb + MULTILIB_DIRNAMES = arm thumb +-MULTILIB_EXCEPTIONS = +-MULTILIB_MATCHES = + +-#MULTILIB_OPTIONS += mcpu=fa526/mcpu=fa626/mcpu=fa606te/mcpu=fa626te/mcpu=fmp626/mcpu=fa726te +-#MULTILIB_DIRNAMES += fa526 fa626 fa606te fa626te fmp626 fa726te +-#MULTILIB_EXCEPTIONS += *mthumb*/*mcpu=fa526 *mthumb*/*mcpu=fa626 +- +-#MULTILIB_OPTIONS += march=armv7 +-#MULTILIB_DIRNAMES += thumb2 +-#MULTILIB_EXCEPTIONS += march=armv7* marm/*march=armv7* +-#MULTILIB_MATCHES += march?armv7=march?armv7-a +-#MULTILIB_MATCHES += march?armv7=march?armv7-r +-#MULTILIB_MATCHES += march?armv7=march?armv7-m +-#MULTILIB_MATCHES += march?armv7=mcpu?cortex-a8 +-#MULTILIB_MATCHES += march?armv7=mcpu?cortex-r4 +-#MULTILIB_MATCHES += march?armv7=mcpu?cortex-m3 +- +-# Not quite true. We can support hard-vfp calling in Thumb2, but how do we +-# express that here? Also, we really need architecture v5e or later +-# (mcrr etc). +-MULTILIB_OPTIONS += mfloat-abi=hard +-MULTILIB_DIRNAMES += fpu +-MULTILIB_EXCEPTIONS += *mthumb/*mfloat-abi=hard* +-#MULTILIB_EXCEPTIONS += *mcpu=fa526/*mfloat-abi=hard* +-#MULTILIB_EXCEPTIONS += *mcpu=fa626/*mfloat-abi=hard* +- +-# MULTILIB_OPTIONS += mcpu=ep9312 +-# MULTILIB_DIRNAMES += ep9312 +-# MULTILIB_EXCEPTIONS += *mthumb/*mcpu=ep9312* +-# +-# MULTILIB_OPTIONS += mlittle-endian/mbig-endian +-# MULTILIB_DIRNAMES += le be +-# MULTILIB_MATCHES += mbig-endian=mbe mlittle-endian=mle +-# +-# MULTILIB_OPTIONS += mfloat-abi=hard/mfloat-abi=soft +-# MULTILIB_DIRNAMES += fpu soft +-# MULTILIB_EXCEPTIONS += *mthumb/*mfloat-abi=hard* +-# +-# MULTILIB_OPTIONS += mno-thumb-interwork/mthumb-interwork +-# MULTILIB_DIRNAMES += normal interwork +-# +-# MULTILIB_OPTIONS += fno-leading-underscore/fleading-underscore +-# MULTILIB_DIRNAMES += elf under +-# +-# MULTILIB_OPTIONS += mcpu=arm7 +-# MULTILIB_DIRNAMES += nofmult +-# MULTILIB_EXCEPTIONS += *mthumb*/*mcpu=arm7* +-# # Note: the multilib_exceptions matches both -mthumb and +-# # -mthumb-interwork +-# # +-# # We have to match all the arm cpu variants which do not have the +-# # multiply instruction and treat them as if the user had specified +-# # -mcpu=arm7. Note that in the following the ? is interpreted as +-# # an = for the purposes of matching command line options. +-# # FIXME: There ought to be a better way to do this. +-# MULTILIB_MATCHES += mcpu?arm7=mcpu?arm7d +-# MULTILIB_MATCHES += mcpu?arm7=mcpu?arm7di +-# MULTILIB_MATCHES += mcpu?arm7=mcpu?arm70 +-# MULTILIB_MATCHES += mcpu?arm7=mcpu?arm700 +-# MULTILIB_MATCHES += mcpu?arm7=mcpu?arm700i +-# MULTILIB_MATCHES += mcpu?arm7=mcpu?arm710 +-# MULTILIB_MATCHES += mcpu?arm7=mcpu?arm710c +-# MULTILIB_MATCHES += mcpu?arm7=mcpu?arm7100 +-# MULTILIB_MATCHES += mcpu?arm7=mcpu?arm7500 +-# MULTILIB_MATCHES += mcpu?arm7=mcpu?arm7500fe +-# MULTILIB_MATCHES += mcpu?arm7=mcpu?arm6 +-# MULTILIB_MATCHES += mcpu?arm7=mcpu?arm60 +-# MULTILIB_MATCHES += mcpu?arm7=mcpu?arm600 +-# MULTILIB_MATCHES += mcpu?arm7=mcpu?arm610 +-# MULTILIB_MATCHES += mcpu?arm7=mcpu?arm620 ++# Only we don't actually want any ARM libraries. Or vanilla thumb libraries. ++MULTILIB_EXCEPTIONS = marm* mthumb ++ ++# Build with any one of arm7tdmi, M0, M3 or M4 support. ++MULTILIB_OPTIONS += mcpu=arm7tdmi-s/mcpu=cortex-m0/mcpu=cortex-m3/mcpu=cortex-m4 ++MULTILIB_DIRNAMES += arm7tdmi-s cortex-m0 cortex-m3 cortex-m4 ++ ++# These don't make any sense without thumb, because GCC likes to ++# tell you that you have to supply another commandline argument ++# rather than just setting it itself. ++MULTILIB_EXCEPTIONS += mcpu=arm7tdmi-s* mcpu=cortex-m0* mcpu=cortex-m3* mcpu=cortex-m4* ++ ++# All this just to get mfloat-abi=hard mfpu=fpv4-sp-d16 only specified for the M4 ++MULTILIB_OPTIONS += mfloat-abi=hard mfpu=fpv4-sp-d16 ++MULTILIB_DIRNAMES += float-abi-hard fpuv4-sp-d16 ++MULTILIB_EXCEPTIONS += mfloat* mthumb/mfloat* ++MULTILIB_EXCEPTIONS += mfpu* mthumb/mfpu* ++MULTILIB_EXCEPTIONS += mthumb/mcpu=cortex-m4/mfloat-abi=hard ++MULTILIB_EXCEPTIONS += mthumb/mcpu=cortex-m4/mfpu=fpv4-sp-d16 ++MULTILIB_EXCEPTIONS += *arm7tdmi-s*mfloat-abi* *arm7tdmi-s*mfpu* ++MULTILIB_EXCEPTIONS += *cortex-m3*mfloat-abi* *cortex-m3*mfpu* ++MULTILIB_EXCEPTIONS += *cortex-m0*mfloat-abi* *cortex-m0*mfpu* ++ ++EXTRA_MULTILIB_PARTS = crtbegin.o crtend.o crti.o crtn.o ++ diff --git a/gcc-4.9-no-exceptions.patch b/gcc-4.9-no-exceptions.patch new file mode 100755 index 000000000000..8cf36f718133 --- /dev/null +++ b/gcc-4.9-no-exceptions.patch @@ -0,0 +1,20 @@ +--- libgcc/Makefile.in.orig 2013-06-01 23:57:51.711127513 +0200 ++++ libgcc/Makefile.in 2013-06-01 23:59:13.940660435 +0200 +@@ -492,7 +492,7 @@ + ifeq ($(LIB2_DIVMOD_EXCEPTION_FLAGS),) + # Provide default flags for compiling divmod functions, if they haven't been + # set already by a target-specific Makefile fragment. +-LIB2_DIVMOD_EXCEPTION_FLAGS := -fexceptions -fnon-call-exceptions ++LIB2_DIVMOD_EXCEPTION_FLAGS := -fno-exceptions -fnon-call-exceptions + endif + + # Build LIB2_DIVMOD_FUNCS. +@@ -813,7 +813,7 @@ + # libgcc_eh.a, only LIB2ADDEH matters. If we do, only LIB2ADDEHSTATIC and + # LIB2ADDEHSHARED matter. (Usually all three are identical.) + +-c_flags := -fexceptions ++c_flags := -fno-exceptions + + ifeq ($(enable_shared),yes) + |