diff options
author | wtx | 2016-09-09 08:31:48 +0200 |
---|---|---|
committer | wtx | 2016-09-09 08:31:48 +0200 |
commit | bcb1e60843896902150afcfeb46c3b9e9bf7dcc7 (patch) | |
tree | 6f7e6242176e25179dbaa0d1266f1c89e3ff0446 | |
download | aur-bcb1e60843896902150afcfeb46c3b9e9bf7dcc7.tar.gz |
Initial commit
-rw-r--r-- | .SRCINFO | 35 | ||||
-rw-r--r-- | PKGBUILD | 93 | ||||
-rw-r--r-- | gcc-4.9-fix-build-with-gcc-6.patch | 126 | ||||
-rw-r--r-- | gcc-4.9-multilib2.patch | 101 | ||||
-rw-r--r-- | gcc-4.9-no-exceptions.patch | 20 |
5 files changed, 375 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..cb20c8e9cfae --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,35 @@ +pkgbase = arm-none-eabi-gcc49-linaro-alternative + pkgdesc = The GNU Compiler Collection - cross compiler for ARM EABI (bare-metal) target. + pkgver = 4.9_2016.02 + 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.26-1 + depends = gmp + depends = mpfr + depends = libmpc + options = staticlibs + options = !libtool + options = !emptydirs + options = !strip + options = zipman + options = docs + source = http://releases.linaro.org/components/toolchain/gcc-linaro/4.9-2016.02/gcc-linaro-4.9-2016.02.tar.xz + source = http://releases.linaro.org/15.01/components/toolchain/newlib-linaro/newlib-linaro-2.2.0-2015.01.tar.xz + source = gcc-4.9-fix-build-with-gcc-6.patch + source = gcc-4.9-multilib2.patch + source = gcc-4.9-no-exceptions.patch + sha256sums = 63bd38c028fec87a85eff1f3728b9e8f9a7070346ab337a57963c413da4859a2 + sha256sums = d29fe53d70f545c2fb080b9686e05d0f8af5088fec9b7dc78bc788a98765ef99 + sha256sums = b328e9cdca4e2869490d932191b78ef1a61c60382cea3a23d1ef86e7c1fb86a7 + sha256sums = 104b9aa652804a56338470983e6975af1d1e5440eb8bddae3a01a966d2b332cf + sha256sums = 3a1d6a17aba8a578ade3552a6d1beb66a129fb4f3268539596d39cbbef88ac6c + +pkgname = arm-none-eabi-gcc49-linaro-alternative + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..6464be46782c --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,93 @@ +# Maintainer: Johnny Halfmoon <jhalfmoon@milksnot.com> + +pkgname=arm-none-eabi-gcc49-linaro-alternative +_relver=4.9 +_relshortdate=16.02 +_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_2016.02 +pkgrel=1 +_newlibver=linaro-2.2.0-2015.01 +_newlibvershort=15.01 +#_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.26-1' '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/components/toolchain/gcc-linaro/${_relverdate}/gcc-linaro-${_relverdate}.tar.xz + http://releases.linaro.org/${_newlibvershort}/components/toolchain/newlib-linaro/newlib-${_newlibver}.tar.xz + gcc-4.9-fix-build-with-gcc-6.patch + 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" + patch -Np0 -i "${srcdir}/gcc-4.9-fix-build-with-gcc-6.patch" + + mkdir build + cd build + +# --build=${CHOST} \ + 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/arm-none-eabi-4.9 \ + --bindir=/usr/bin \ + --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 \ + --disable-newlib-supplied-syscalls \ + --program-suffix="-${_relver}" \ + --program-prefix="arm-none-eabi-" + + 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=('63bd38c028fec87a85eff1f3728b9e8f9a7070346ab337a57963c413da4859a2' + 'd29fe53d70f545c2fb080b9686e05d0f8af5088fec9b7dc78bc788a98765ef99' + 'b328e9cdca4e2869490d932191b78ef1a61c60382cea3a23d1ef86e7c1fb86a7' + '104b9aa652804a56338470983e6975af1d1e5440eb8bddae3a01a966d2b332cf' + '3a1d6a17aba8a578ade3552a6d1beb66a129fb4f3268539596d39cbbef88ac6c') diff --git a/gcc-4.9-fix-build-with-gcc-6.patch b/gcc-4.9-fix-build-with-gcc-6.patch new file mode 100644 index 000000000000..f7cb0b5d13b8 --- /dev/null +++ b/gcc-4.9-fix-build-with-gcc-6.patch @@ -0,0 +1,126 @@ +--- gcc/cp/Make-lang.in +++++ gcc/cp/Make-lang.in +@@ -111,7 +111,7 @@ else + # deleting the $(srcdir)/cp/cfns.h file. + $(srcdir)/cp/cfns.h: + endif +- gperf -o -C -E -k '1-6,$$' -j1 -D -N 'libc_name_p' -L ANSI-C \ ++ gperf -o -C -E -k '1-6,$$' -j1 -D -N 'libc_name_p' -L C++ \ + $(srcdir)/cp/cfns.gperf --output-file $(srcdir)/cp/cfns.h + + # +diff --git gcc/cp/cfns.gperf gcc/cp/cfns.gperf +index 05ca753..d9b16b8 100644 +--- gcc/cp/cfns.gperf ++++ gcc/cp/cfns.gperf +@@ -1,3 +1,5 @@ ++%language=C++ ++%define class-name libc_name + %{ + /* Copyright (C) 2000-2014 Free Software Foundation, Inc. + +@@ -16,14 +18,6 @@ for more details. + You should have received a copy of the GNU General Public License + along with GCC; see the file COPYING3. If not see + <http://www.gnu.org/licenses/>. */ +-#ifdef __GNUC__ +-__inline +-#endif +-static unsigned int hash (const char *, unsigned int); +-#ifdef __GNUC__ +-__inline +-#endif +-const char * libc_name_p (const char *, unsigned int); + %} + %% + # The standard C library functions, for feeding to gperf; the result is used +diff --git gcc/cp/cfns.h gcc/cp/cfns.h +index c845ddf..65801d1 100644 +--- gcc/cp/cfns.h ++++ gcc/cp/cfns.h +@@ -1,5 +1,5 @@ +-/* ANSI-C code produced by gperf version 3.0.3 */ +-/* Command-line: gperf -o -C -E -k '1-6,$' -j1 -D -N libc_name_p -L ANSI-C cfns.gperf */ ++/* C++ code produced by gperf version 3.0.4 */ ++/* Command-line: gperf -o -C -E -k '1-6,$' -j1 -D -N libc_name_p -L C++ -output-file cfns.h cfns.gperf */ + + #if !((' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \ + && ('%' == 37) && ('&' == 38) && ('\'' == 39) && ('(' == 40) \ +@@ -28,7 +28,7 @@ + #error "gperf generated tables don't work with this execution character set. Please report a bug to <bug-gnu-gperf@gnu.org>." + #endif + +-#line 1 "cfns.gperf" ++#line 3 "cfns.gperf" + + /* Copyright (C) 2000-2014 Free Software Foundation, Inc. + +@@ -47,25 +47,18 @@ for more details. + You should have received a copy of the GNU General Public License + along with GCC; see the file COPYING3. If not see + <http://www.gnu.org/licenses/>. */ +-#ifdef __GNUC__ +-__inline +-#endif +-static unsigned int hash (const char *, unsigned int); +-#ifdef __GNUC__ +-__inline +-#endif +-const char * libc_name_p (const char *, unsigned int); + /* maximum key range = 391, duplicates = 0 */ + +-#ifdef __GNUC__ +-__inline +-#else +-#ifdef __cplusplus +-inline +-#endif +-#endif +-static unsigned int +-hash (register const char *str, register unsigned int len) ++class libc_name ++{ ++private: ++ static inline unsigned int hash (const char *str, unsigned int len); ++public: ++ static const char *libc_name_p (const char *str, unsigned int len); ++}; ++ ++inline unsigned int ++libc_name::hash (register const char *str, register unsigned int len) + { + static const unsigned short asso_values[] = + { +@@ -122,14 +115,8 @@ hash (register const char *str, register unsigned int len) + return hval + asso_values[(unsigned char)str[len - 1]]; + } + +-#ifdef __GNUC__ +-__inline +-#ifdef __GNUC_STDC_INLINE__ +-__attribute__ ((__gnu_inline__)) +-#endif +-#endif + const char * +-libc_name_p (register const char *str, register unsigned int len) ++libc_name::libc_name_p (register const char *str, register unsigned int len) + { + enum + { +diff --git gcc/cp/except.c gcc/cp/except.c +index 221971a..32340f5 100644 +--- gcc/cp/except.c ++++ gcc/cp/except.c +@@ -1030,7 +1030,8 @@ nothrow_libfn_p (const_tree fn) + unless the system headers are playing rename tricks, and if + they are, we don't want to be confused by them. */ + id = DECL_NAME (fn); +- return !!libc_name_p (IDENTIFIER_POINTER (id), IDENTIFIER_LENGTH (id)); ++ return !!libc_name::libc_name_p (IDENTIFIER_POINTER (id), ++ IDENTIFIER_LENGTH (id)); + } + + /* Returns nonzero if an exception of type FROM will be caught by a +-- +2.8.2 + diff --git a/gcc-4.9-multilib2.patch b/gcc-4.9-multilib2.patch new file mode 100644 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 100644 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) + |