diff options
-rw-r--r-- | .SRCINFO | 20 | ||||
-rw-r--r-- | PKGBUILD | 148 | ||||
-rw-r--r-- | bugfix60486.patch | 13 | ||||
-rw-r--r-- | gperf-inlines.patch | 126 |
4 files changed, 213 insertions, 94 deletions
@@ -1,6 +1,6 @@ pkgbase = avr-gcc-atmel - pkgdesc = The GNU AVR Compiler Collection - pkgver = 4.8.1 + pkgdesc = The GNU AVR Compiler Collection (from Atmel) + pkgver = 4.9.2 pkgrel = 1 url = http://www.atmel.com/tools/ATMELAVRTOOLCHAINFORLINUX.aspx arch = x86_64 @@ -9,19 +9,19 @@ pkgbase = avr-gcc-atmel license = LGPL license = FDL license = custom - depends = avr-binutils-atmel>=2.24 - depends = gcc-libs>=4.8.0 + depends = avr-binutils + depends = gcc-libs depends = libmpc optdepends = avr-libc: Standard C library for Atmel AVR development - provides = gcc-avr=4.8.1 - conflicts = gcc-avr + provides = avr-gcc=4.9.2 + conflicts = avr-gcc options = staticlibs options = !emptydirs options = !strip - source = http://distribute.atmel.no/tools/opensource/Atmel-AVR-GNU-Toolchain/3.4.4/avr-gcc-4.8.1.tar.bz2 - source = bugfix60486.patch - md5sums = e51124e20405c7598f9a01fb460f33e5 - md5sums = 01714fbab726728fae37d1ea866e1384 + source = http://distribute.atmel.no/tools/opensource/Atmel-AVR-GNU-Toolchain/3.5.4/avr-gcc.tar.bz2 + source = gperf-inlines.patch + md5sums = a10ce1c02bc9e990f3c88252f3b7bb25 + md5sums = 81bd4c68c80c796d3e2acbe4ca9bec56 pkgname = avr-gcc-atmel @@ -1,100 +1,106 @@ -# Maintainer: Andras Biro <bbandi86@gmail.com> +# Maintainer: Jonathan Kotta <jpkotta@gmail.com> +# Contributor: Andras Biro <bbandi86@gmail.com> # Contributor: Alex Forencich <alex at alexforencich dot com> # Contributor: schuay <jakob.gruber@gmail.com> # Contributor: Brad Fanella <bradfanella@archlinux.us> # Contributor: Corrado Primier <bardo@aur.archlinux.org> # Contributor: danst0 <danst0@west.de> -_pkgnamenoplatform=gcc -_pkgnamenobrand=avr-${_pkgnamenoplatform} -pkgname=${_pkgnamenobrand}-atmel -pkgver=4.8.1 -_atmelver=3.4.4 + +pkgname=avr-gcc-atmel +pkgver=4.9.2 +_atmelver=3.5.4 pkgrel=1 -pkgdesc="The GNU AVR Compiler Collection" +pkgdesc="The GNU AVR Compiler Collection (from Atmel)" url="http://www.atmel.com/tools/ATMELAVRTOOLCHAINFORLINUX.aspx" arch=('x86_64' 'i686') license=('GPL' 'LGPL' 'FDL' 'custom') -depends=('avr-binutils-atmel>=2.24' 'gcc-libs>=4.8.0' 'libmpc') +depends=('avr-binutils' 'gcc-libs' 'libmpc') optdepends=('avr-libc: Standard C library for Atmel AVR development') -provides=("gcc-avr=$pkgver") -conflicts=('gcc-avr') +provides=("avr-gcc=$pkgver") +conflicts=('avr-gcc') options=('staticlibs' '!emptydirs' '!strip') -source=("http://distribute.atmel.no/tools/opensource/Atmel-AVR-GNU-Toolchain/${_atmelver}/${_pkgnamenobrand}-${pkgver}.tar.bz2" - "bugfix60486.patch") -md5sums=('e51124e20405c7598f9a01fb460f33e5' - '01714fbab726728fae37d1ea866e1384') +source=("http://distribute.atmel.no/tools/opensource/Atmel-AVR-GNU-Toolchain/${_atmelver}/avr-gcc.tar.bz2" + "gperf-inlines.patch") +md5sums=('a10ce1c02bc9e990f3c88252f3b7bb25' + '81bd4c68c80c796d3e2acbe4ca9bec56') + +_builddir=build + +prepare() { + cd ${srcdir}/gcc + + # https://bugs.archlinux.org/task/34629 + sed -i "/ac_cpp=/s/\$CPPFLAGS/\$CPPFLAGS -O2/" libiberty/configure gcc/configure + + patch -p0 < ${srcdir}/gperf-inlines.patch + + rm -rf ${_builddir} + mkdir -p ${_builddir} +} -_builddir=${_pkgnamenoplatform}-build build() { - # default CFLAGS lead to issues later on when configure + cd ${srcdir}/gcc + + # default CFLAGS lead to issues later on when configure # calls avr-gcc with -march set. export CFLAGS="-O2 -pipe" export CXXFLAGS="-O2 -pipe" - cd ${srcdir}/${_pkgnamenoplatform} - patch -p0 < ../bugfix60486.patch - -# these were in the atmel script's but it didn't make any difference -# pushd gcc/config/avr/ -# sh genopt.sh avr-mcus.def > avr-tables.opt -# cat avr-mcus.def | awk -f genmultilib.awk FORMAT="Makefile" > t-multilib -# popd -# #don't force old autoconf -# sed -i 's/ \[m4_fatal(\[Please use exactly Autoconf \]/ \[m4_errprintn(\[Please use exactly Autoconf \]/g' ./config/override.m4 || task_error "sed failed" -# autoconf - - # Do not install libiberty - sed -i 's/install_to_$(INSTALL_DEST) //' libiberty/Makefile.in - - # https://bugs.archlinux.org/task/34629 - sed -i "/ac_cpp=/s/\$CPPFLAGS/\$CPPFLAGS -O2/" libiberty/configure - sed -i "/ac_cpp=/s/\$CPPFLAGS/\$CPPFLAGS -O2/" gcc/configure - - cd ${srcdir} - rm -rf ${_builddir} - mkdir -p ${_builddir} && cd ${_builddir} - - CFLAGS="-Os -g0 -s" ${srcdir}/${_pkgnamenoplatform}/configure \ - --target=avr\ - --prefix=/usr\ - --libdir=/usr/lib\ - --libexecdir=/usr/lib\ - --infodir=/usr/share/info\ - --mandir=/usr/share/man\ - --enable-languages="c,c++"\ - --with-dwarf2\ - --enable-doc\ - --disable-libada\ - --disable-libssp\ - --disable-nls\ - --enable-shared \ - --disable-install-libiberty \ - --with-ld=/usr/bin/avr-ld\ - --with-as=/usr/bin/avr-as\ - --with-avrlibc=yes + + config_guess=$(./config.guess) + + cd ${_builddir} + + # major differences from avr build script: + # --disable-shared + CFLAGS="-Os -g0 -s" ${srcdir}/gcc/configure \ + --target=avr \ + --host=${config_guess} \ + --build=${config_guess} \ + --prefix=/usr \ + --enable-languages="c,c++" \ + --with-dwarf2 \ + --enable-doc \ + --enable-shared \ + --disable-libada \ + --disable-libssp \ + --disable-nls \ + --with-ld=/usr/bin/avr-ld \ + --with-as=/usr/bin/avr-as \ + --disable-install-libiberty \ + --with-avrlibc=yes + make all } package() { - cd ${srcdir}/${_builddir} + cd ${srcdir}/gcc/${_builddir} make -j1 DESTDIR=${pkgdir} install - # Strip debug symbols from libraries; without this, the package size balloons to ~500MB. + # Strip debug symbols from libraries; without this, the package size + # balloons to ~500MB. find ${pkgdir}/usr/lib -type f -name "*.a" \ - -exec /usr/bin/avr-strip --strip-debug '{}' \; - - cd ${pkgdir}/usr/bin/ - strip * - cd ${pkgdir}/usr/lib/gcc/avr/${pkgver}/ - for binary in cc1 cc1plus collect2 lto-wrapper lto1 "install-tools/fixincl" "plugin/gengtype" - do - strip $binary - done + -exec /usr/bin/avr-strip --strip-debug '{}' \; + + (cd ${pkgdir}/usr/bin/ ; strip *) + + (cd ${pkgdir}/usr/libexec/gcc/avr/${pkgver}/ ; + for binary in cc1 cc1plus collect2 lto-wrapper lto1 \ + install-tools/fixincl plugin/gengtype ; do + strip $binary + done + ) rm -rf ${pkgdir}/usr/share/man/man7 - rm -rf ${pkgdir}/usr/share/info - install -Dm644 ${srcdir}/${_pkgnamenoplatform}/COPYING.RUNTIME ${pkgdir}/usr/share/licenses/${pkgname}/RUNTIME.LIBRARY.EXCEPTION + (cd ${pkgdir}/usr/share/info/ ; + for i in *.info ; do + mv "$i" "avr-$i" + done + ) + + install -Dm644 ${srcdir}/gcc/COPYING.RUNTIME \ + ${pkgdir}/usr/share/licenses/${pkgname}/RUNTIME.LIBRARY.EXCEPTION } -# vim:set ts=2 sw=2 et:
\ No newline at end of file +# vim:set ts=2 sw=2 et: diff --git a/bugfix60486.patch b/bugfix60486.patch deleted file mode 100644 index 80da544366bb..000000000000 --- a/bugfix60486.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- gcc/config/avr/avr.c 2014/03/13 07:53:48 208531 -+++ gcc/config/avr/avr.c 2014/03/13 09:16:53 208532 -@@ -6812,8 +6812,8 @@ - - /* Work out the shortest sequence. */ - -- avr_out_plus_1 (op, &len_minus, MINUS, &cc_plus, code_sat, sign, out_label); -- avr_out_plus_1 (op, &len_plus, PLUS, &cc_minus, code_sat, sign, out_label); -+ avr_out_plus_1 (op, &len_minus, MINUS, &cc_minus, code_sat, sign, out_label); -+ avr_out_plus_1 (op, &len_plus, PLUS, &cc_plus, code_sat, sign, out_label); - - if (plen) - { diff --git a/gperf-inlines.patch b/gperf-inlines.patch new file mode 100644 index 000000000000..f8f147a12bcc --- /dev/null +++ b/gperf-inlines.patch @@ -0,0 +1,126 @@ +Index: gcc/cp/Make-lang.in +=================================================================== +--- gcc/cp/Make-lang.in (revision 233574) ++++ gcc/cp/Make-lang.in (working copy) +@@ -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 + + # +Index: gcc/cp/cfns.gperf +=================================================================== +--- gcc/cp/cfns.gperf (revision 233574) ++++ gcc/cp/cfns.gperf (working copy) +@@ -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 +Index: gcc/cp/cfns.h +=================================================================== +--- gcc/cp/cfns.h (revision 233574) ++++ gcc/cp/cfns.h (working copy) +@@ -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,26 +47,19 @@ 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[] = + { + 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, +@@ -122,14 +115,8 @@ along with GCC; see the file COPYING3. If not see + 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 + { +Index: gcc/cp/except.c +=================================================================== +--- gcc/cp/except.c (revision 233574) ++++ gcc/cp/except.c (working copy) +@@ -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
\ No newline at end of file |