summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO38
-rw-r--r--0200-gcc-no-exceptions.patch20
-rw-r--r--0300-gcc-multilib2.patch101
-rw-r--r--0400-trap.patch11
-rw-r--r--1039-libcc1-fix-libcc1-s-install-path-and-rpath.patch54
-rw-r--r--PKGBUILD94
6 files changed, 318 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..a83123d749dc
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,38 @@
+pkgbase = arm-none-eabi-gcc64-linaro-alternative
+ pkgdesc = The GNU Compiler Collection - cross compiler for ARM EABI (bare-metal) target.
+ pkgver = 6.4_2017.06
+ 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
+ provides = arm-none-eabi-gcc-6.4
+ options = staticlibs
+ options = !libtool
+ options = !emptydirs
+ options = !strip
+ options = zipman
+ options = docs
+ source = http://releases.linaro.org/components/toolchain/gcc-linaro/6.4-2017.08/gcc-linaro-6.4-2017.08.tar.xz
+ source = ftp://sourceware.org/pub/newlib/newlib-2.4.0.tar.gz
+ source = 0200-gcc-no-exceptions.patch
+ source = 0300-gcc-multilib2.patch
+ source = 1039-libcc1-fix-libcc1-s-install-path-and-rpath.patch
+ source = 0400-trap.patch
+ sha256sums = 4188a8c799186a5759decead1cdf1139e82e5215cdb468d5ff7070010968bde0
+ sha256sums = 545b3d235e350d2c61491df8b9f775b1b972f191380db8f52ec0b1c829c52706
+ sha256sums = 76eab14830216c774291d2ac35d4b4690f3273aa8c630a2c1546f02538847d8a
+ sha256sums = c9b6bc1dd53f9b4b80f5fdacdef94c9fce0e516c16fb78063107b66ba2e9fdd1
+ sha256sums = fa08269d6a748631b07b55a5fe00fa518b2f6e04356a3d6634c60f3c3ece3b07
+ sha256sums = 157de04865a94c0cd953133ee102d286783ea171a48245760d16a2362fde253b
+
+pkgname = arm-none-eabi-gcc64-linaro-alternative
+
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/0400-trap.patch b/0400-trap.patch
new file mode 100644
index 000000000000..f30b7db31247
--- /dev/null
+++ b/0400-trap.patch
@@ -0,0 +1,11 @@
+--- a/newlib/libc/sys/arm/trap.S 2016-03-29 23:33:42.000000000 +0200
++++ b/newlib/libc/sys/arm/trap.S 2018-04-20 12:10:24.093416964 +0200
+@@ -85,7 +85,7 @@ __rt_stkovf_split_big:
+ @ protects the data against any events that may try and use
+ @ the stack.
+
+- SUB ip, sp, ip @ extra stack required for function
++ @SUB ip, sp, ip @ extra stack required for function
+ @ Add stack extension code here. If desired a new stack chunk
+ @ can be allocated, and the register state updated suitably.
+
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 100644
index 000000000000..282b1c8555b0
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,94 @@
+# Maintainer: Witold Kowolik <sdrb@onet.eu>
+
+pkgname=arm-none-eabi-gcc64-linaro-alternative
+_relver=6.4
+_relshortdate=17.08
+_reldate=20${_relshortdate}
+_relverdate=${_relver}-${_reldate}
+pkgver=6.4_2017.06
+pkgrel=1
+_newlibver=2.4.0
+_newlibvershort=15.01
+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-6.4')
+options=(staticlibs !libtool !emptydirs !strip zipman docs)
+source=(http://releases.linaro.org/components/toolchain/gcc-linaro/${_relverdate}/gcc-linaro-${_relverdate}.tar.xz
+ ftp://sourceware.org/pub/newlib/newlib-2.4.0.tar.gz
+ 0200-gcc-no-exceptions.patch
+ 0300-gcc-multilib2.patch
+ 1039-libcc1-fix-libcc1-s-install-path-and-rpath.patch
+ 0400-trap.patch)
+_basedir=gcc-linaro-${_relverdate}
+
+sha256sums=('4188a8c799186a5759decead1cdf1139e82e5215cdb468d5ff7070010968bde0'
+ '545b3d235e350d2c61491df8b9f775b1b972f191380db8f52ec0b1c829c52706'
+ '76eab14830216c774291d2ac35d4b4690f3273aa8c630a2c1546f02538847d8a'
+ 'c9b6bc1dd53f9b4b80f5fdacdef94c9fce0e516c16fb78063107b66ba2e9fdd1'
+ 'fa08269d6a748631b07b55a5fe00fa518b2f6e04356a3d6634c60f3c3ece3b07'
+ '157de04865a94c0cd953133ee102d286783ea171a48245760d16a2362fde253b')
+
+
+
+prepare() {
+ cd ${srcdir}
+ mv ${srcdir}/newlib-${_newlibver}/newlib ${_basedir}
+ mv ${srcdir}/newlib-${_newlibver}/libgloss ${_basedir}
+
+ cd ${srcdir}/${_basedir}
+ find ${srcdir}/*.patch | while read PATCH ; do
+ patch -Np1 -i $PATCH
+ done
+
+ cd ${srcdir}/${_basedir}
+ rm -rf build
+ mkdir build
+}
+
+
+
+
+build() {
+ cd ${srcdir}/${_basedir}/build
+
+ export CFLAGS="-O3"
+ export CXXFLAGS="-O3"
+ 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-6.4 \
+ --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 \
+ --enable-threads \
+ --disable-libssp \
+ --disable-libstdcxx-pch \
+ --enable-silent-rules \
+ --program-suffix="-6.4" \
+ --program-prefix="arm-none-eabi-"
+
+ make
+}
+
+package() {
+ cd ${srcdir}/${_basedir}/build
+ make -j1 DESTDIR=${pkgdir} install
+
+ ln -s /usr/arm-none-eabi/bin/as ${pkgdir}/usr/arm-none-eabi-6.4/libexec/gcc/arm-none-eabi/6.4.1/as
+
+ # libiberty.a conflicts with host version
+ rm -f $pkgdir/usr/lib/libiberty.a
+}