diff options
author | Witold Kowolik | 2016-09-07 10:00:09 +0200 |
---|---|---|
committer | Witold Kowolik | 2016-09-07 10:00:09 +0200 |
commit | 497aeb66c80e0ce4fafca87a99788e818c0bb56b (patch) | |
tree | 93f0d306a839af10d7e01edb0b32d63cc4ad15ce | |
download | aur-497aeb66c80e0ce4fafca87a99788e818c0bb56b.tar.gz |
Initial commit
-rw-r--r-- | .SRCINFO | 37 | ||||
-rw-r--r-- | 0100-gcc-fix-build-with-gcc-6.patch | 126 | ||||
-rw-r--r-- | 0200-gcc-no-exceptions.patch | 20 | ||||
-rw-r--r-- | 0300-gcc-multilib2.patch | 101 | ||||
-rw-r--r-- | 1039-libcc1-fix-libcc1-s-install-path-and-rpath.patch | 54 | ||||
-rwxr-xr-x | PKGBUILD | 107 |
6 files changed, 445 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..9812d4f1ce9e --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,37 @@ +pkgbase = arm-none-eabi-gcc53-linaro-alternative + pkgdesc = The GNU Compiler Collection - cross compiler for ARM EABI (bare-metal) target. + pkgver = 5.3_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/5.3-2016.02/gcc-linaro-5.3-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 = 0100-gcc-fix-build-with-gcc-6.patch + source = 0200-gcc-no-exceptions.patch + source = 0300-gcc-multilib2.patch + source = 1039-libcc1-fix-libcc1-s-install-path-and-rpath.patch + sha256sums = 549c1416c0e2025c8e4c07c7c970863437ac707429b268b36a9a426c45298090 + sha256sums = d29fe53d70f545c2fb080b9686e05d0f8af5088fec9b7dc78bc788a98765ef99 + sha256sums = 318919dd575819622ddaec1cf593506411fa4435bc9af662155572c30a7baa88 + sha256sums = 76eab14830216c774291d2ac35d4b4690f3273aa8c630a2c1546f02538847d8a + sha256sums = c9b6bc1dd53f9b4b80f5fdacdef94c9fce0e516c16fb78063107b66ba2e9fdd1 + sha256sums = fa08269d6a748631b07b55a5fe00fa518b2f6e04356a3d6634c60f3c3ece3b07 + +pkgname = arm-none-eabi-gcc53-linaro-alternative + diff --git a/0100-gcc-fix-build-with-gcc-6.patch b/0100-gcc-fix-build-with-gcc-6.patch new file mode 100644 index 000000000000..12e6ae915d0a --- /dev/null +++ b/0100-gcc-fix-build-with-gcc-6.patch @@ -0,0 +1,126 @@ +--- a/gcc/cp/Make-lang.in +++++ b/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 +--- a/gcc/cp/cfns.gperf ++++ b/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 +--- a/gcc/cp/cfns.h ++++ b/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 +--- a/gcc/cp/except.c ++++ b/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/0200-gcc-no-exceptions.patch b/0200-gcc-no-exceptions.patch new file mode 100644 index 000000000000..0113bd825671 --- /dev/null +++ b/0200-gcc-no-exceptions.patch @@ -0,0 +1,20 @@ +--- a/libgcc/Makefile.in 2013-06-01 23:57:51.711127513 +0200 ++++ b/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) + diff --git a/0300-gcc-multilib2.patch b/0300-gcc-multilib2.patch new file mode 100644 index 000000000000..d41cd4585970 --- /dev/null +++ b/0300-gcc-multilib2.patch @@ -0,0 +1,101 @@ +--- a/gcc/config/arm/t-arm-elf 2013-01-10 21:38:27.000000000 +0100 ++++ b/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/1039-libcc1-fix-libcc1-s-install-path-and-rpath.patch b/1039-libcc1-fix-libcc1-s-install-path-and-rpath.patch new file mode 100644 index 000000000000..2e0df968bd74 --- /dev/null +++ b/1039-libcc1-fix-libcc1-s-install-path-and-rpath.patch @@ -0,0 +1,54 @@ +From 1eede9e4a10d3532db826a6eeced695df3ad5b89 Mon Sep 17 00:00:00 2001 +From: Robert Yang <liezhi.yang@windriver.com> +Date: Sun, 5 Jul 2015 20:25:18 -0700 +Subject: [PATCH 39/46] libcc1: fix libcc1's install path and rpath + +* Install libcc1.so and libcc1plugin.so into + $(libexecdir)/gcc/$(target_noncanonical)/$(gcc_version), as what we + had done to lto-plugin. +* Fix bad RPATH iussue: + gcc-5.2.0: package gcc-plugins contains bad RPATH /patht/to/tmp/sysroots/qemux86-64/usr/lib64/../lib64 in file + /path/to/gcc/5.2.0-r0/packages-split/gcc-plugins/usr/lib64/gcc/x86_64-poky-linux/5.2.0/plugin/libcc1plugin.so.0.0.0 + [rpaths] + +Upstream-Status: Inappropriate [OE configuration] + +Signed-off-by: Robert Yang <liezhi.yang@windriver.com> +--- + libcc1/Makefile.am | 4 ++-- + libcc1/Makefile.in | 4 ++-- + 2 files changed, 4 insertions(+), 4 deletions(-) + +diff --git a/libcc1/Makefile.am b/libcc1/Makefile.am +index 7a274b3..db69bea 100644 +--- a/libcc1/Makefile.am ++++ b/libcc1/Makefile.am +@@ -35,8 +35,8 @@ libiberty = $(if $(wildcard $(libiberty_noasan)),$(Wc)$(libiberty_noasan), \ + $(Wc)$(libiberty_normal))) + libiberty_dep = $(patsubst $(Wc)%,%,$(libiberty)) + +-plugindir = $(libdir)/gcc/$(target_noncanonical)/$(gcc_version)/plugin +-cc1libdir = $(libdir)/$(libsuffix) ++cc1libdir = $(libexecdir)/gcc/$(target_noncanonical)/$(gcc_version) ++plugindir = $(cc1libdir) + + if ENABLE_PLUGIN + plugin_LTLIBRARIES = libcc1plugin.la +diff --git a/libcc1/Makefile.in b/libcc1/Makefile.in +index 1916134..c8995d2 100644 +--- a/libcc1/Makefile.in ++++ b/libcc1/Makefile.in +@@ -262,8 +262,8 @@ libiberty = $(if $(wildcard $(libiberty_noasan)),$(Wc)$(libiberty_noasan), \ + $(Wc)$(libiberty_normal))) + + libiberty_dep = $(patsubst $(Wc)%,%,$(libiberty)) +-plugindir = $(libdir)/gcc/$(target_noncanonical)/$(gcc_version)/plugin +-cc1libdir = $(libdir)/$(libsuffix) ++cc1libdir = $(libexecdir)/gcc/$(target_noncanonical)/$(gcc_version) ++plugindir = $(cc1libdir) + @ENABLE_PLUGIN_TRUE@plugin_LTLIBRARIES = libcc1plugin.la + @ENABLE_PLUGIN_TRUE@cc1lib_LTLIBRARIES = libcc1.la + BUILT_SOURCES = compiler-name.h +-- +2.6.3 + diff --git a/PKGBUILD b/PKGBUILD new file mode 100755 index 000000000000..5dcd851152fa --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,107 @@ +# Maintainer: Johnny Halfmoon <jhalfmoon@milksnot.com> +# Latest sources are at http://releases.linaro.org/components/toolchain/gcc-linaro/ +# NOTE: I get my patches from the following location. There might be a better source. If so, let me know. +# https://github.com/01org/luv-yocto/tree/master/meta/recipes-devtools/gcc/gcc-5.3 + +pkgname=arm-none-eabi-gcc53-linaro-alternative +_relver=5.3 +_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=5.3_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 + 0100-gcc-fix-build-with-gcc-6.patch + 0200-gcc-no-exceptions.patch + 0300-gcc-multilib2.patch + 1039-libcc1-fix-libcc1-s-install-path-and-rpath.patch) +_basedir=gcc-linaro-${_relverdate} + +prepare() { + cd ${srcdir} + mv ${srcdir}/newlib-${_newlibver}/newlib ${_basedir} + mv ${srcdir}/newlib-${_newlibver}/libgloss ${_basedir} + +hortdate=14.09 +_reldate=20${_relshortdate} + +cd ${srcdir}/${_basedir} + find ${srcdir}/*.patch | while read PATCH ; do + patch -Np1 -i $PATCH + done + + cd ${srcdir}/${_basedir} + mkdir build + cd build + +} + +build() { + + cd ${srcdir}/${_basedir}/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/arm-none-eabi-5.3 \ + --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=('549c1416c0e2025c8e4c07c7c970863437ac707429b268b36a9a426c45298090' + 'd29fe53d70f545c2fb080b9686e05d0f8af5088fec9b7dc78bc788a98765ef99' + '318919dd575819622ddaec1cf593506411fa4435bc9af662155572c30a7baa88' + '76eab14830216c774291d2ac35d4b4690f3273aa8c630a2c1546f02538847d8a' + 'c9b6bc1dd53f9b4b80f5fdacdef94c9fce0e516c16fb78063107b66ba2e9fdd1' + 'fa08269d6a748631b07b55a5fe00fa518b2f6e04356a3d6634c60f3c3ece3b07') |