summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorCarsten Teibes2016-11-27 23:56:48 +0100
committerCarsten Teibes2016-11-27 23:56:48 +0100
commitfd50f354c5dcda3866eb30b7654db93830b0e8ce (patch)
treee9ac9654cafbf45bfffc9edb053db034e85af92c
parentc22281880aa42d89d8f2b0755bf3de31aa30604c (diff)
downloadaur-fd50f354c5dcda3866eb30b7654db93830b0e8ce.tar.gz
[fix] build on GCC 6
-rw-r--r--.SRCINFO14
-rw-r--r--PKGBUILD20
-rw-r--r--devkitarm-add-gcc-patch.patch11
-rw-r--r--devkitarm-add-tool-patches.patch13
-rw-r--r--fix-gcc-5.3.0-compilation-on-gcc-6.patch163
-rw-r--r--fix-gp32tools.patch42
-rw-r--r--fix-grit.patch40
7 files changed, 299 insertions, 4 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 3960f114c951..039665573d2c 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = devkitarm
pkgdesc = An ARM toolchain for GP32, Nintendo DS and GBA homebrew development
pkgver = r45
- pkgrel = 1
+ pkgrel = 2
url = http://www.devkitpro.org
install = devkitarm.install
arch = i686
@@ -36,7 +36,7 @@ pkgbase = devkitarm
options = emptydirs
source = http://downloads.sourceforge.net/sourceforge/devkitpro/buildscripts-20151213.tar.bz2
source = http://downloads.sourceforge.net/sourceforge/devkitpro/binutils-2.25.1.tar.bz2
- source = http://mirrors.kernel.org/gnu/gcc/gcc-5.3.0/gcc-5.3.0.tar.bz2
+ source = http://downloads.sourceforge.net/sourceforge/devkitpro/gcc-5.3.0.tar.bz2
source = http://downloads.sourceforge.net/sourceforge/devkitpro/newlib-2.2.0.tar.gz
source = http://downloads.sourceforge.net/sourceforge/devkitpro/gdb-7.10.tar.bz2
source = http://downloads.sourceforge.net/sourceforge/devkitpro/gbatools-1.0.0.tar.bz2
@@ -53,6 +53,11 @@ pkgbase = devkitarm
source = http://downloads.sourceforge.net/sourceforge/devkitpro/3dstools-1.1.1.tar.bz2
source = http://downloads.sourceforge.net/sourceforge/devkitpro/picasso-2.1.0.tar.bz2
source = devkitarm-skip-libs.patch
+ source = devkitarm-add-gcc-patch.patch
+ source = devkitarm-add-tool-patches.patch
+ source = fix-gcc-5.3.0-compilation-on-gcc-6.patch
+ source = fix-grit.patch
+ source = fix-gp32tools.patch
source = devkitarm.sh
sha256sums = dffe312bdcd86b30bbe91969fb82c8634b6e7171548c04ee8ebf52540de28818
sha256sums = b5b14added7d78a8d1ca70b5cb75fef57ce2197264f4f5835326b0df22ac9f22
@@ -73,6 +78,11 @@ pkgbase = devkitarm
sha256sums = 6dbf15bb5cbeee826b6ffc608288f1267ed3696d725956943545c0572401d548
sha256sums = 79bf84b42da964918f6c8bb1294434ed1e10feab9a2b1f5a0183030637977650
sha256sums = 97b498aa26aba743e141115cd8f1169aa8411532f589c3c845233a299f5ecf74
+ sha256sums = 6462b0911186b1b0167c74e2b146d7c09b17974c021ce37087e8c157b6cdd59f
+ sha256sums = 27353ac1375867b8d07889a35515e144f3f989588fec4364adc6c5317d17ae4f
+ sha256sums = e22c5cb2748a8a62eacbd9401fcdd7a1239a469ab7811382e7564e7554ce2341
+ sha256sums = e8fd36de318e8a2726c24d7de0190e475da628456380032a708e0ab232d5e091
+ sha256sums = fce6e900ee23ebe0bdee1e6f58e02ba521598f5a1a74eb5798ee35ca1f27be3b
sha256sums = fc5489fab5ee4ce5cd53c2e1549fd2958872a6777324920b89e03b88584072db
pkgname = devkitarm
diff --git a/PKGBUILD b/PKGBUILD
index b3a66aeec3bc..dd9e618bfcfb 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,7 +2,7 @@
pkgname=devkitarm
pkgver=r45
-pkgrel=1
+pkgrel=2
pkgdesc="An ARM toolchain for GP32, Nintendo DS and GBA homebrew development"
arch=('i686' 'x86_64')
url="http://www.devkitpro.org"
@@ -12,7 +12,7 @@ depends=('freeimage' 'python' 'flex' 'libmpc' 'libusb' 'guile')
install=devkitarm.install
source=("http://downloads.sourceforge.net/sourceforge/devkitpro/buildscripts-20151213.tar.bz2"
"http://downloads.sourceforge.net/sourceforge/devkitpro/binutils-2.25.1.tar.bz2"
- "http://mirrors.kernel.org/gnu/gcc/gcc-5.3.0/gcc-5.3.0.tar.bz2"
+ "http://downloads.sourceforge.net/sourceforge/devkitpro/gcc-5.3.0.tar.bz2"
"http://downloads.sourceforge.net/sourceforge/devkitpro/newlib-2.2.0.tar.gz"
"http://downloads.sourceforge.net/sourceforge/devkitpro/gdb-7.10.tar.bz2"
"http://downloads.sourceforge.net/sourceforge/devkitpro/gbatools-1.0.0.tar.bz2"
@@ -29,6 +29,11 @@ source=("http://downloads.sourceforge.net/sourceforge/devkitpro/buildscripts-201
"http://downloads.sourceforge.net/sourceforge/devkitpro/3dstools-1.1.1.tar.bz2"
"http://downloads.sourceforge.net/sourceforge/devkitpro/picasso-2.1.0.tar.bz2"
"devkitarm-skip-libs.patch"
+ "devkitarm-add-gcc-patch.patch"
+ "devkitarm-add-tool-patches.patch"
+ "fix-gcc-5.3.0-compilation-on-gcc-6.patch"
+ "fix-grit.patch"
+ "fix-gp32tools.patch"
"devkitarm.sh")
sha256sums=('dffe312bdcd86b30bbe91969fb82c8634b6e7171548c04ee8ebf52540de28818'
'b5b14added7d78a8d1ca70b5cb75fef57ce2197264f4f5835326b0df22ac9f22'
@@ -49,6 +54,11 @@ sha256sums=('dffe312bdcd86b30bbe91969fb82c8634b6e7171548c04ee8ebf52540de28818'
'6dbf15bb5cbeee826b6ffc608288f1267ed3696d725956943545c0572401d548'
'79bf84b42da964918f6c8bb1294434ed1e10feab9a2b1f5a0183030637977650'
'97b498aa26aba743e141115cd8f1169aa8411532f589c3c845233a299f5ecf74'
+ '6462b0911186b1b0167c74e2b146d7c09b17974c021ce37087e8c157b6cdd59f'
+ '27353ac1375867b8d07889a35515e144f3f989588fec4364adc6c5317d17ae4f'
+ 'e22c5cb2748a8a62eacbd9401fcdd7a1239a469ab7811382e7564e7554ce2341'
+ 'e8fd36de318e8a2726c24d7de0190e475da628456380032a708e0ab232d5e091'
+ 'fce6e900ee23ebe0bdee1e6f58e02ba521598f5a1a74eb5798ee35ca1f27be3b'
'fc5489fab5ee4ce5cd53c2e1549fd2958872a6777324920b89e03b88584072db')
noextract=('binutils-2.25.1.tar.bz2' 'gcc-5.3.0.tar.bz2' 'newlib-2.2.0.tar.gz'
'gdb-7.10.tar.bz2' 'gbatools-1.0.0.tar.bz2' 'gp32tools-1.0.1.tar.bz2'
@@ -79,6 +89,12 @@ END
sed 's|$PATH:$TOOLPATH/$package/bin|$TOOLPATH/$package/bin:$PATH|' -i \
buildscripts/build-devkit.sh
+ # add patch to build gcc 5.3.0 on gcc >6
+ patch -Np0 < devkitarm-add-gcc-patch.patch
+
+ # add patch to build tools on gcc >6
+ patch -Np0 < devkitarm-add-tool-patches.patch
+
# disable building of libraries, we have separate packages
patch -Np0 < devkitarm-skip-libs.patch
}
diff --git a/devkitarm-add-gcc-patch.patch b/devkitarm-add-gcc-patch.patch
new file mode 100644
index 000000000000..a993c74fdef4
--- /dev/null
+++ b/devkitarm-add-gcc-patch.patch
@@ -0,0 +1,11 @@
+diff -Naur buildscripts.old/build-devkit.sh buildscripts/build-devkit.sh
+--- buildscripts.old/build-devkit.sh 2016-11-27 21:58:40.103228901 +0100
++++ buildscripts/build-devkit.sh 2016-11-27 22:54:55.283172632 +0100
+@@ -243,6 +243,7 @@
+ extract_and_patch binutils $BINUTILS_VER bz2
+ extract_and_patch gcc $GCC_VER bz2
+ rm -fr gcc-$GCC_VER/zlib
++patch -d gcc-$GCC_VER -Np1 < "$SRCDIR/fix-gcc-5.3.0-compilation-on-gcc-6.patch"
+ extract_and_patch newlib $NEWLIB_VER gz
+ extract_and_patch gdb $GDB_VER bz2
+
diff --git a/devkitarm-add-tool-patches.patch b/devkitarm-add-tool-patches.patch
new file mode 100644
index 000000000000..27167d474931
--- /dev/null
+++ b/devkitarm-add-tool-patches.patch
@@ -0,0 +1,13 @@
+diff -Naur buildscripts.old/dkarm-eabi/scripts/build-tools.sh buildscripts/dkarm-eabi/scripts/build-tools.sh
+--- buildscripts.old/dkarm-eabi/scripts/build-tools.sh 2016-11-27 21:58:43.449895511 +0100
++++ buildscripts/dkarm-eabi/scripts/build-tools.sh 2016-11-27 23:43:07.699791078 +0100
+@@ -1,6 +1,9 @@
+ #!/bin/bash
+ cd $BUILDDIR
+
++patch -Np1 -d grit-0.8.13 < ../../fix-grit.patch
++patch -Np0 < ../../fix-gp32tools.patch
++
+ for archive in $hostarchives
+ do
+ dir=$(echo $archive | sed -e 's/\(.*\)\.tar\.bz2/\1/' )
diff --git a/fix-gcc-5.3.0-compilation-on-gcc-6.patch b/fix-gcc-5.3.0-compilation-on-gcc-6.patch
new file mode 100644
index 000000000000..7be4ecd27077
--- /dev/null
+++ b/fix-gcc-5.3.0-compilation-on-gcc-6.patch
@@ -0,0 +1,163 @@
+From 0adb418f0df38077add871fd62ce8cddda76d8de Mon Sep 17 00:00:00 2001
+From: Carsten Teibes <dev@f4ke.de>
+Date: Sun, 27 Nov 2016 22:49:52 +0100
+Subject: [PATCH] Fix gcc 5.3.0 compilation on gcc 6
+
+* Use C++ for invoking gperf
+* Do not inline hash and libc_name_p
+
+Based on upstream patch (adapted to apply cleanly):
+https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff;h=ec1cc0263f156f70693a62cf17b254a0029f4852
+---
+ gcc/cp/ChangeLog | 9 +++++++++
+ gcc/cp/Make-lang.in | 2 +-
+ gcc/cp/cfns.gperf | 10 ++--------
+ gcc/cp/cfns.h | 41 ++++++++++++++---------------------------
+ gcc/cp/except.c | 3 ++-
+ 5 files changed, 28 insertions(+), 37 deletions(-)
+
+diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
+index 3477397..be77231 100644
+--- a/gcc/cp/ChangeLog
++++ b/gcc/cp/ChangeLog
+@@ -1,3 +1,12 @@
++2016-02-19 Jakub Jelinek <jakub@redhat.com>
++ Bernd Edlinger <bernd.edlinger@hotmail.de>
++
++ * Make-lang.in: Invoke gperf with -L C++.
++ * cfns.gperf: Remove prototypes for hash and libc_name_p
++ inlines.
++ * cfns.h: Regenerated.
++ * except.c (nothrow_libfn_p): Adjust.
++
+ 2015-12-04 Release Manager
+
+ * GCC 5.3.0 released.
+diff --git a/gcc/cp/Make-lang.in b/gcc/cp/Make-lang.in
+index e98beb1..b09fb02 100644
+--- 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 a/gcc/cp/cfns.gperf b/gcc/cp/cfns.gperf
+index 68acd3d..214ecf6 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-2015 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 a/gcc/cp/cfns.h b/gcc/cp/cfns.h
+index 1c6665d..596f413 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-2015 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 a/gcc/cp/except.c b/gcc/cp/except.c
+index 3ff1ce6..2f2e396 100644
+--- a/gcc/cp/except.c
++++ b/gcc/cp/except.c
+@@ -1040,7 +1040,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.10.2
+
diff --git a/fix-gp32tools.patch b/fix-gp32tools.patch
new file mode 100644
index 000000000000..79efe85f8c5e
--- /dev/null
+++ b/fix-gp32tools.patch
@@ -0,0 +1,42 @@
+diff -Naur gp32tools-1.0.1.old/src/b2fxec/compress_fxe0.cpp gp32tools-1.0.1/src/b2fxec/compress_fxe0.cpp
+--- gp32tools-1.0.1.old/src/b2fxec/compress_fxe0.cpp 2014-12-22 00:56:00.000000000 +0100
++++ gp32tools-1.0.1/src/b2fxec/compress_fxe0.cpp 2016-10-30 22:18:41.015165705 +0100
+@@ -22,8 +22,8 @@
+ // Sort into descending order..
+
+ int litcomp( const void* a, const void* b ) {
+- return reinterpret_cast<const literals*>(b)->count -
+- reinterpret_cast<const literals*>(a)->count;
++ return reinterpret_cast<const struct literals*>(b)->count -
++ reinterpret_cast<const struct literals*>(a)->count;
+ }
+ };
+
+diff -Naur gp32tools-1.0.1.old/src/b2fxec/compress_fxe2.cpp gp32tools-1.0.1/src/b2fxec/compress_fxe2.cpp
+--- gp32tools-1.0.1.old/src/b2fxec/compress_fxe2.cpp 2014-12-22 00:56:00.000000000 +0100
++++ gp32tools-1.0.1/src/b2fxec/compress_fxe2.cpp 2016-10-30 22:18:28.351643844 +0100
+@@ -23,8 +23,8 @@
+ // Sort into descending order..
+
+ int litcomp( const void* a, const void* b ) {
+- return reinterpret_cast<const literals*>(b)->count -
+- reinterpret_cast<const literals*>(a)->count;
++ return reinterpret_cast<const struct literals*>(b)->count -
++ reinterpret_cast<const struct literals*>(a)->count;
+ }
+ };
+
+diff -Naur gp32tools-1.0.1.old/src/b2fxec/compress_fxe3.cpp gp32tools-1.0.1/src/b2fxec/compress_fxe3.cpp
+--- gp32tools-1.0.1.old/src/b2fxec/compress_fxe3.cpp 2014-12-22 00:56:00.000000000 +0100
++++ gp32tools-1.0.1/src/b2fxec/compress_fxe3.cpp 2016-10-30 22:18:12.824746032 +0100
+@@ -23,8 +23,8 @@
+ // Sort into descending order..
+
+ int litcomp( const void* a, const void* b ) {
+- return reinterpret_cast<const literals*>(b)->count -
+- reinterpret_cast<const literals*>(a)->count;
++ return reinterpret_cast<const struct literals*>(b)->count -
++ reinterpret_cast<const struct literals*>(a)->count;
+ }
+ };
+
diff --git a/fix-grit.patch b/fix-grit.patch
new file mode 100644
index 000000000000..186091eee698
--- /dev/null
+++ b/fix-grit.patch
@@ -0,0 +1,40 @@
+From cd792af5f92da6dfa00b0ed32126e6ccd17619b1 Mon Sep 17 00:00:00 2001
+From: Dave Murphy <davem@devkitpro.org>
+Date: Sat, 17 Sep 2016 15:58:04 +0100
+Subject: [PATCH] return NULL rather than false
+
+---
+ cldib/cldib_conv.cpp | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/cldib/cldib_conv.cpp b/cldib/cldib_conv.cpp
+index d0db746..11c2967 100644
+--- a/cldib/cldib_conv.cpp
++++ b/cldib/cldib_conv.cpp
+@@ -179,7 +179,7 @@ CLDIB *dib_bit_unpack_copy(CLDIB *src, int dstB, DWORD base)
+ CLDIB *dst= dib_alloc(srcW, srcH, dstB, NULL, dib_is_topdown(src));
+
+ if(dst==NULL)
+- return false;
++ return NULL;
+
+ BYTE *srcD= dib_get_img(src), *dstD= dib_get_img(dst);
+
+@@ -256,7 +256,7 @@ CLDIB *dib_8_to_true_copy(CLDIB *src, int dstB)
+ CLDIB *dst= dib_alloc(srcW, srcH, dstB, NULL, dib_is_topdown(src));
+
+ if(dst==NULL)
+- return false;
++ return NULL;
+
+ BYTE *srcD= dib_get_img(src), *dstD= dib_get_img(dst);
+
+@@ -301,7 +301,7 @@ CLDIB *dib_true_to_true_copy(CLDIB *src, int dstB)
+ CLDIB *dst= dib_alloc(srcW, srcH, dstB, NULL, dib_is_topdown(src));
+
+ if(dst==NULL)
+- return false;
++ return NULL;
+
+ BYTE *srcD= dib_get_img(src), *dstD= dib_get_img(dst);
+