summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO38
-rw-r--r--0200-gcc-no-exceptions.patch22
-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.patch29
-rw-r--r--PKGBUILD87
6 files changed, 288 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..b576255e3c4b
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,38 @@
+pkgbase = arm-none-eabi-gcc74-linaro
+ pkgdesc = The GNU Compiler Collection - cross compiler for ARM EABI (bare-metal) target.
+ pkgver = 7.4_2019.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.32-1
+ depends = gmp
+ depends = mpfr
+ depends = libmpc
+ provides = arm-none-eabi-gcc-7.4
+ options = staticlibs
+ options = !libtool
+ options = !emptydirs
+ options = !strip
+ options = zipman
+ options = docs
+ source = http://releases.linaro.org/components/toolchain/gcc-linaro/7.4-2019.02/gcc-linaro-7.4-2019.02.tar.xz
+ source = ftp://sourceware.org/pub/newlib/newlib-3.1.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
+ sha384sums = 7b5cfced29c06115f45846b8c5bd1f654589b40aff8d880a33d42a2abf5bb443b0abbf38c01661c8d998917160a1ac08
+ sha384sums = 147772efafc4b98d807ae59409931a21c244d24b02d8db13fa56608b59251bd20a6c9b6ac50d5bdfdf1f0c31a9050387
+ sha384sums = 5d23b23b92f8952d73dabe4d463fb56bd56254bacb1c2c2a1cf0abe14ae74e15337b5740fbf076dabda0918505e8a43d
+ sha384sums = ce165bdfc64cfe184c56f5ddc194d6a023cbb3e44213e72854e8cb278a06f28a62e0b1125801da24928d66b01b0d7bb4
+ sha384sums = 758bda596dfdc621c2f5836b7046efccc50f3e0353c5678c4acafab7be844b76b3487991cae1d292af8f66dfe3ac141b
+ sha384sums = 4df1144ce8053b0e14e104fc700541991b402fa1d9335d189638b9a020c87bbe57331c09e28a91e6d5392d61498a9c8d
+
+pkgname = arm-none-eabi-gcc74-linaro
+
diff --git a/0200-gcc-no-exceptions.patch b/0200-gcc-no-exceptions.patch
new file mode 100644
index 000000000000..6184b3a7730d
--- /dev/null
+++ b/0200-gcc-no-exceptions.patch
@@ -0,0 +1,22 @@
+diff -ur ../1/libgcc/Makefile.in ./libgcc/Makefile.in
+--- ../1/libgcc/Makefile.in 2018-06-12 19:23:47.000000000 +0200
++++ ./libgcc/Makefile.in 2018-09-15 21:44:22.822605290 +0200
+@@ -523,7 +523,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.
+@@ -844,7 +844,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)
+
+Only in ./libgcc: Makefile.in.orig
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..4232169f3238
--- /dev/null
+++ b/1039-libcc1-fix-libcc1-s-install-path-and-rpath.patch
@@ -0,0 +1,29 @@
+diff -ur ../1/libcc1/Makefile.am ./libcc1/Makefile.am
+--- ../1/libcc1/Makefile.am 2018-06-12 19:23:46.000000000 +0200
++++ ./libcc1/Makefile.am 2018-09-15 22:02:50.670937188 +0200
+@@ -37,8 +37,8 @@
+ $(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 libcp1plugin.la
+Only in ./libcc1: Makefile.am.orig
+diff -ur ../1/libcc1/Makefile.in ./libcc1/Makefile.in
+--- ../1/libcc1/Makefile.in 2018-06-12 19:23:46.000000000 +0200
++++ ./libcc1/Makefile.in 2018-09-15 22:02:21.667644486 +0200
+@@ -303,8 +303,8 @@
+ $(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 libcp1plugin.la
+ @ENABLE_PLUGIN_TRUE@cc1lib_LTLIBRARIES = libcc1.la
+ BUILT_SOURCES = c-compiler-name.h cp-compiler-name.h
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..75370ff4ea5b
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,87 @@
+# Maintainer: Michael Duell <mail@akurei.me>
+# Based on the 7.3 package by Johnny Halfmoon <jhalfmoon@milksnot.com>
+# Based on the 6.4 package by Witold Kowolik <sdrb@onet.eu>
+
+pkgname=arm-none-eabi-gcc74-linaro
+_relver=7.4
+_relshortdate=19.02
+_reldate=20${_relshortdate}
+_relverdate=${_relver}-${_reldate}
+pkgver=7.4_2019.02
+pkgrel=1
+_newlibver=3.1.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.32-1' 'gmp' 'mpfr' 'libmpc')
+makedepends=('flex' 'bison')
+provides=('arm-none-eabi-gcc-7.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-${_newlibver}.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}
+
+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-7.4 \
+ --program-suffix="-7.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-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-7.4/libexec/gcc/arm-none-eabi/7.4.1/as
+ # libiberty.a conflicts with host version
+ rm -f $pkgdir/usr/lib/libiberty.a
+}
+
+sha384sums=('7b5cfced29c06115f45846b8c5bd1f654589b40aff8d880a33d42a2abf5bb443b0abbf38c01661c8d998917160a1ac08'
+ '147772efafc4b98d807ae59409931a21c244d24b02d8db13fa56608b59251bd20a6c9b6ac50d5bdfdf1f0c31a9050387'
+ '5d23b23b92f8952d73dabe4d463fb56bd56254bacb1c2c2a1cf0abe14ae74e15337b5740fbf076dabda0918505e8a43d'
+ 'ce165bdfc64cfe184c56f5ddc194d6a023cbb3e44213e72854e8cb278a06f28a62e0b1125801da24928d66b01b0d7bb4'
+ '758bda596dfdc621c2f5836b7046efccc50f3e0353c5678c4acafab7be844b76b3487991cae1d292af8f66dfe3ac141b'
+ '4df1144ce8053b0e14e104fc700541991b402fa1d9335d189638b9a020c87bbe57331c09e28a91e6d5392d61498a9c8d')