summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohnny Halfmoon2018-09-15 23:45:23 +0200
committerJohnny Halfmoon2018-09-15 23:45:23 +0200
commitb1502a859fd1a6c20fad9f28a052e99da98dd7dc (patch)
treec15a97884933bf206f3119032cd0d60ca9f46932
downloadaur-b1502a859fd1a6c20fad9f28a052e99da98dd7dc.tar.gz
initial commit
-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--PKGBUILD86
6 files changed, 287 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..921ca01ddd77
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,38 @@
+pkgbase = arm-none-eabi-gcc73-linaro
+ pkgdesc = The GNU Compiler Collection - cross compiler for ARM EABI (bare-metal) target.
+ pkgver = 7.3_2018.05
+ 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-7.3
+ options = staticlibs
+ options = !libtool
+ options = !emptydirs
+ options = !strip
+ options = zipman
+ options = docs
+ source = http://releases.linaro.org/components/toolchain/gcc-linaro/7.3-2018.05/gcc-linaro-7.3-2018.05.tar.xz
+ source = ftp://sourceware.org/pub/newlib/newlib-2.5.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 = 5864b46120e120949413ab698a5104cfd43b82246254cc4928a2d9e8cc1884e7
+ sha256sums = 5b76a9b97c9464209772ed25ce55181a7bb144a66e5669aaec945aa64da3189b
+ sha256sums = 4ab6e3b886bdb33b9e368c135337859003296e0efa29f6967cb5f22ffd00668a
+ sha256sums = c9b6bc1dd53f9b4b80f5fdacdef94c9fce0e516c16fb78063107b66ba2e9fdd1
+ sha256sums = d713a261f9988c5e202d8feb586d7f75b14fc7d288fee0fe3e0b332da1a780aa
+ sha256sums = 157de04865a94c0cd953133ee102d286783ea171a48245760d16a2362fde253b
+
+pkgname = arm-none-eabi-gcc73-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..783ed853c705
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,86 @@
+# Maintainer: Johnny Halfmoon <jhalfmoon@milksnot.com>
+# Based on the 6.4 package by Witold Kowolik <sdrb@onet.eu>
+
+pkgname=arm-none-eabi-gcc73-linaro
+_relver=7.3
+_relshortdate=18.05
+_reldate=20${_relshortdate}
+_relverdate=${_relver}-${_reldate}
+pkgver=7.3_2018.05
+pkgrel=1
+_newlibver=2.5.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-7.3')
+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.3 \
+ --program-suffix="-7.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 \
+ --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.3/libexec/gcc/arm-none-eabi/7.3.1/as
+ # libiberty.a conflicts with host version
+ rm -f $pkgdir/usr/lib/libiberty.a
+}
+
+sha256sums=('5864b46120e120949413ab698a5104cfd43b82246254cc4928a2d9e8cc1884e7'
+ '5b76a9b97c9464209772ed25ce55181a7bb144a66e5669aaec945aa64da3189b'
+ '4ab6e3b886bdb33b9e368c135337859003296e0efa29f6967cb5f22ffd00668a'
+ 'c9b6bc1dd53f9b4b80f5fdacdef94c9fce0e516c16fb78063107b66ba2e9fdd1'
+ 'd713a261f9988c5e202d8feb586d7f75b14fc7d288fee0fe3e0b332da1a780aa'
+ '157de04865a94c0cd953133ee102d286783ea171a48245760d16a2362fde253b')