[arch-commits] Commit in avr-gcc/repos (6 files)

Anatol Pomozov anatolik at archlinux.org
Thu Feb 25 18:04:12 UTC 2016


    Date: Thursday, February 25, 2016 @ 19:04:12
  Author: anatolik
Revision: 163437

archrelease: copy trunk to community-testing-i686, community-testing-x86_64

Added:
  avr-gcc/repos/community-testing-i686/
  avr-gcc/repos/community-testing-i686/PKGBUILD
    (from rev 163436, avr-gcc/trunk/PKGBUILD)
  avr-gcc/repos/community-testing-i686/fix_instructions_out_of_range.patch
    (from rev 163436, avr-gcc/trunk/fix_instructions_out_of_range.patch)
  avr-gcc/repos/community-testing-x86_64/
  avr-gcc/repos/community-testing-x86_64/PKGBUILD
    (from rev 163436, avr-gcc/trunk/PKGBUILD)
  avr-gcc/repos/community-testing-x86_64/fix_instructions_out_of_range.patch
    (from rev 163436, avr-gcc/trunk/fix_instructions_out_of_range.patch)

--------------------------------------------------------------+
 community-testing-i686/PKGBUILD                              |  112 ++++++++++
 community-testing-i686/fix_instructions_out_of_range.patch   |   80 +++++++
 community-testing-x86_64/PKGBUILD                            |  112 ++++++++++
 community-testing-x86_64/fix_instructions_out_of_range.patch |   80 +++++++
 4 files changed, 384 insertions(+)

Copied: avr-gcc/repos/community-testing-i686/PKGBUILD (from rev 163436, avr-gcc/trunk/PKGBUILD)
===================================================================
--- community-testing-i686/PKGBUILD	                        (rev 0)
+++ community-testing-i686/PKGBUILD	2016-02-25 18:04:12 UTC (rev 163437)
@@ -0,0 +1,112 @@
+# $Id$
+# Maintainer: schuay <jakob.gruber at gmail.com>
+# Contributor: Brad Fanella <bradfanella at archlinux.us>
+# Contributor: Corrado Primier <bardo at aur.archlinux.org>
+# Contributor: danst0 <danst0 at west.de>
+
+# Build order: avr-binutils -> avr-gcc -> avr-libc
+
+pkgname=avr-gcc
+pkgver=5.3.0
+pkgrel=2
+_snapshot=5-20160223
+_islver=0.15
+pkgdesc='The GNU AVR Compiler Collection'
+arch=(i686 x86_64)
+license=(GPL LGPL FDL custom)
+url='http://gcc.gnu.org/'
+depends=(avr-binutils gcc-libs libmpc)
+optdepends=('avr-libc: Standard C library for Atmel AVR development')
+options=(!emptydirs !strip)
+source=(#ftp://gcc.gnu.org/pub/gcc/releases/gcc-${pkgver}/gcc-${pkgver}.tar.bz2
+        ftp://gcc.gnu.org/pub/gcc/snapshots/${_snapshot}/gcc-${_snapshot}.tar.bz2
+        http://isl.gforge.inria.fr/isl-${_islver}.tar.bz2
+        fix_instructions_out_of_range.patch
+       )
+sha1sums=('13b7c4de9da654ef968e658c77e32b265aa4eb5b'
+          '1e30e09a5fc2c9e1aa4bdb8c9c21fdff20a7cd12'
+          'e1f8295d2c0507cf798a641877fdce7a69681739')
+
+if [ -n "${_snapshot}" ]; then
+  _basedir=gcc-${_snapshot}
+else
+  _basedir=gcc-${pkgver}
+fi
+
+prepare() {
+  cd $_basedir
+  patch -p1 < ../fix_instructions_out_of_range.patch
+}
+
+build() {
+    cd ${srcdir}/${_basedir} 
+
+    # link isl for in-tree build
+    ln -s ../isl-${_islver} isl
+
+    # https://bugs.archlinux.org/task/34629
+    # hack! - some configure tests for header files using "$CPP $CPPFLAGS"
+    sed -i "/ac_cpp=/s/\$CPPFLAGS/\$CPPFLAGS -O2/" {libiberty,gcc}/configure
+
+    echo ${pkgver} > gcc/BASE-VER
+
+    cd ${srcdir}
+    mkdir gcc-build && cd gcc-build
+
+    export CFLAGS_FOR_TARGET='-O2 -pipe'
+    export CXXFLAGS_FOR_TARGET='-O2 -pipe'
+
+    # --disable-linker-build-id: https://bugs.archlinux.org/task/34902
+    ${srcdir}/${_basedir}/configure \
+                --disable-install-libiberty \
+                --disable-libssp \
+                --disable-libstdcxx-pch \
+                --disable-libunwind-exceptions \
+                --disable-linker-build-id \
+                --disable-nls \
+                --disable-werror \
+                --enable-__cxa_atexit \
+                --enable-checking=release \
+                --enable-clocale=gnu \
+                --enable-gnu-unique-object \
+                --enable-gold \
+                --enable-languages=c,c++ \
+                --enable-ld=default \
+                --enable-lto \
+                --enable-plugin \
+                --enable-shared \
+                --infodir=/usr/share/info \
+                --libdir=/usr/lib \
+                --libexecdir=/usr/lib \
+                --mandir=/usr/share/man \
+                --prefix=/usr \
+                --target=avr \
+                --with-as=/usr/bin/avr-as \
+                --with-gnu-as \
+                --with-gnu-ld \
+                --with-ld=/usr/bin/avr-ld \
+                --with-plugin-ld=ld.gold \
+                --with-system-zlib \
+                --with-isl \
+                --enable-gnu-indirect-function
+
+    make
+}
+
+package() {
+    cd ${srcdir}/gcc-build
+
+    make -j1 DESTDIR=${pkgdir} install
+
+    # 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 '{}' \;
+
+    # Install Runtime Library Exception
+    install -Dm644 ${srcdir}/${_basedir}/COPYING.RUNTIME \
+        ${pkgdir}/usr/share/licenses/avr-gcc/RUNTIME.LIBRARY.EXCEPTION
+
+    rm -r ${pkgdir}/usr/share/man/man7
+    rm -r ${pkgdir}/usr/share/info
+    rm ${pkgdir}/usr/lib/libcc1.*
+}

Copied: avr-gcc/repos/community-testing-i686/fix_instructions_out_of_range.patch (from rev 163436, avr-gcc/trunk/fix_instructions_out_of_range.patch)
===================================================================
--- community-testing-i686/fix_instructions_out_of_range.patch	                        (rev 0)
+++ community-testing-i686/fix_instructions_out_of_range.patch	2016-02-25 18:04:12 UTC (rev 163437)
@@ -0,0 +1,80 @@
+commit 8c1cab24c7ef8ec53c374bcfe2286250155f1db3
+Author: denisc <denisc at 138bc75d-0d04-0410-961f-82ee72b054a4>
+Date:   Wed Oct 28 17:35:27 2015 +0000
+
+    gcc/ChangeLog
+    
+    	PR target/67839
+    	* config/avr/predicates.md (low_io_address_operand): Don't
+    	consider MODE when computing upper bound.
+    	(io_address_operand): Likewise.
+    
+    gcc/testsuite/ChangeLog
+    
+    	PR target/67839
+    	* gcc.target/avr/pr67839.c: New test.
+    
+    
+    
+    git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@229495 138bc75d-0d04-0410-961f-82ee72b054a4
+
+ 2015-10-28  Jan Hubicka  <hubicka at ucw.cz>
+ 
+ 	* fold-const.c (operand_equal_p): Do not verify that types are
+diff --git a/gcc/config/avr/predicates.md b/gcc/config/avr/predicates.md
+index 2d12bc6..622bc0b 100644
+--- a/gcc/config/avr/predicates.md
++++ b/gcc/config/avr/predicates.md
+@@ -46,7 +46,7 @@
+ (define_special_predicate "low_io_address_operand"
+   (ior (and (match_code "const_int")
+ 	    (match_test "IN_RANGE (INTVAL (op) - avr_arch->sfr_offset,
+-				   0, 0x20 - GET_MODE_SIZE (mode))"))
++				   0, 0x1F)"))
+        (and (match_code "symbol_ref")
+ 	    (match_test "SYMBOL_REF_FLAGS (op) & SYMBOL_FLAG_IO_LOW"))))
+ 
+@@ -60,7 +60,7 @@
+ (define_special_predicate "io_address_operand"
+   (ior (and (match_code "const_int")
+ 	    (match_test "IN_RANGE (INTVAL (op) - avr_arch->sfr_offset,
+-				   0, 0x40 - GET_MODE_SIZE (mode))"))
++				   0, 0x3F)"))
+        (and (match_code "symbol_ref")
+ 	    (match_test "SYMBOL_REF_FLAGS (op) & SYMBOL_FLAG_IO"))))
+ 
+diff --git a/gcc/testsuite/gcc.target/avr/pr67839.c b/gcc/testsuite/gcc.target/avr/pr67839.c
+new file mode 100644
+index 0000000..604ab4b
+--- /dev/null
++++ b/gcc/testsuite/gcc.target/avr/pr67839.c
+@@ -0,0 +1,29 @@
++/* { dg-do compile } */
++/* { dg-options "-Os" } */
++/* { dg-final { scan-assembler "sbi 0x1f,0" } } */
++/* { dg-final { scan-assembler "cbi 0x1f,0" } } */
++/* { dg-final { scan-assembler-not "sbi 0x20,0" } } */
++/* { dg-final { scan-assembler-not "cbi 0x20,0" } } */
++/* { dg-final { scan-assembler "in r\\d+,__SREG__" } } */
++/* { dg-final { scan-assembler "out __SREG__,r\\d+" } } */
++/* { dg-final { scan-assembler-not "in r\\d+,0x40" } } */
++/* { dg-final { scan-assembler-not "out 0x40, r\\d+" } } */
++
++/* This testcase verifies that SBI/CBI/SBIS/SBIC
++   and IN/OUT instructions are not generated for
++   an IO addresses outside the valid range.
++*/
++#define IO_ADDR(x) (*((volatile char *)x + __AVR_SFR_OFFSET__))
++int main ()
++{
++  IO_ADDR(0x1f) |= 1;
++  IO_ADDR(0x1f) &= 0xFE;
++
++  IO_ADDR(0x20) |= 1;
++  IO_ADDR(0x20) &= 0xFE;
++
++  IO_ADDR(0x3f) = IO_ADDR(0x3f);
++
++  IO_ADDR(0x40) = IO_ADDR(0x40);
++  return 0;
++}

Copied: avr-gcc/repos/community-testing-x86_64/PKGBUILD (from rev 163436, avr-gcc/trunk/PKGBUILD)
===================================================================
--- community-testing-x86_64/PKGBUILD	                        (rev 0)
+++ community-testing-x86_64/PKGBUILD	2016-02-25 18:04:12 UTC (rev 163437)
@@ -0,0 +1,112 @@
+# $Id$
+# Maintainer: schuay <jakob.gruber at gmail.com>
+# Contributor: Brad Fanella <bradfanella at archlinux.us>
+# Contributor: Corrado Primier <bardo at aur.archlinux.org>
+# Contributor: danst0 <danst0 at west.de>
+
+# Build order: avr-binutils -> avr-gcc -> avr-libc
+
+pkgname=avr-gcc
+pkgver=5.3.0
+pkgrel=2
+_snapshot=5-20160223
+_islver=0.15
+pkgdesc='The GNU AVR Compiler Collection'
+arch=(i686 x86_64)
+license=(GPL LGPL FDL custom)
+url='http://gcc.gnu.org/'
+depends=(avr-binutils gcc-libs libmpc)
+optdepends=('avr-libc: Standard C library for Atmel AVR development')
+options=(!emptydirs !strip)
+source=(#ftp://gcc.gnu.org/pub/gcc/releases/gcc-${pkgver}/gcc-${pkgver}.tar.bz2
+        ftp://gcc.gnu.org/pub/gcc/snapshots/${_snapshot}/gcc-${_snapshot}.tar.bz2
+        http://isl.gforge.inria.fr/isl-${_islver}.tar.bz2
+        fix_instructions_out_of_range.patch
+       )
+sha1sums=('13b7c4de9da654ef968e658c77e32b265aa4eb5b'
+          '1e30e09a5fc2c9e1aa4bdb8c9c21fdff20a7cd12'
+          'e1f8295d2c0507cf798a641877fdce7a69681739')
+
+if [ -n "${_snapshot}" ]; then
+  _basedir=gcc-${_snapshot}
+else
+  _basedir=gcc-${pkgver}
+fi
+
+prepare() {
+  cd $_basedir
+  patch -p1 < ../fix_instructions_out_of_range.patch
+}
+
+build() {
+    cd ${srcdir}/${_basedir} 
+
+    # link isl for in-tree build
+    ln -s ../isl-${_islver} isl
+
+    # https://bugs.archlinux.org/task/34629
+    # hack! - some configure tests for header files using "$CPP $CPPFLAGS"
+    sed -i "/ac_cpp=/s/\$CPPFLAGS/\$CPPFLAGS -O2/" {libiberty,gcc}/configure
+
+    echo ${pkgver} > gcc/BASE-VER
+
+    cd ${srcdir}
+    mkdir gcc-build && cd gcc-build
+
+    export CFLAGS_FOR_TARGET='-O2 -pipe'
+    export CXXFLAGS_FOR_TARGET='-O2 -pipe'
+
+    # --disable-linker-build-id: https://bugs.archlinux.org/task/34902
+    ${srcdir}/${_basedir}/configure \
+                --disable-install-libiberty \
+                --disable-libssp \
+                --disable-libstdcxx-pch \
+                --disable-libunwind-exceptions \
+                --disable-linker-build-id \
+                --disable-nls \
+                --disable-werror \
+                --enable-__cxa_atexit \
+                --enable-checking=release \
+                --enable-clocale=gnu \
+                --enable-gnu-unique-object \
+                --enable-gold \
+                --enable-languages=c,c++ \
+                --enable-ld=default \
+                --enable-lto \
+                --enable-plugin \
+                --enable-shared \
+                --infodir=/usr/share/info \
+                --libdir=/usr/lib \
+                --libexecdir=/usr/lib \
+                --mandir=/usr/share/man \
+                --prefix=/usr \
+                --target=avr \
+                --with-as=/usr/bin/avr-as \
+                --with-gnu-as \
+                --with-gnu-ld \
+                --with-ld=/usr/bin/avr-ld \
+                --with-plugin-ld=ld.gold \
+                --with-system-zlib \
+                --with-isl \
+                --enable-gnu-indirect-function
+
+    make
+}
+
+package() {
+    cd ${srcdir}/gcc-build
+
+    make -j1 DESTDIR=${pkgdir} install
+
+    # 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 '{}' \;
+
+    # Install Runtime Library Exception
+    install -Dm644 ${srcdir}/${_basedir}/COPYING.RUNTIME \
+        ${pkgdir}/usr/share/licenses/avr-gcc/RUNTIME.LIBRARY.EXCEPTION
+
+    rm -r ${pkgdir}/usr/share/man/man7
+    rm -r ${pkgdir}/usr/share/info
+    rm ${pkgdir}/usr/lib/libcc1.*
+}

Copied: avr-gcc/repos/community-testing-x86_64/fix_instructions_out_of_range.patch (from rev 163436, avr-gcc/trunk/fix_instructions_out_of_range.patch)
===================================================================
--- community-testing-x86_64/fix_instructions_out_of_range.patch	                        (rev 0)
+++ community-testing-x86_64/fix_instructions_out_of_range.patch	2016-02-25 18:04:12 UTC (rev 163437)
@@ -0,0 +1,80 @@
+commit 8c1cab24c7ef8ec53c374bcfe2286250155f1db3
+Author: denisc <denisc at 138bc75d-0d04-0410-961f-82ee72b054a4>
+Date:   Wed Oct 28 17:35:27 2015 +0000
+
+    gcc/ChangeLog
+    
+    	PR target/67839
+    	* config/avr/predicates.md (low_io_address_operand): Don't
+    	consider MODE when computing upper bound.
+    	(io_address_operand): Likewise.
+    
+    gcc/testsuite/ChangeLog
+    
+    	PR target/67839
+    	* gcc.target/avr/pr67839.c: New test.
+    
+    
+    
+    git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@229495 138bc75d-0d04-0410-961f-82ee72b054a4
+
+ 2015-10-28  Jan Hubicka  <hubicka at ucw.cz>
+ 
+ 	* fold-const.c (operand_equal_p): Do not verify that types are
+diff --git a/gcc/config/avr/predicates.md b/gcc/config/avr/predicates.md
+index 2d12bc6..622bc0b 100644
+--- a/gcc/config/avr/predicates.md
++++ b/gcc/config/avr/predicates.md
+@@ -46,7 +46,7 @@
+ (define_special_predicate "low_io_address_operand"
+   (ior (and (match_code "const_int")
+ 	    (match_test "IN_RANGE (INTVAL (op) - avr_arch->sfr_offset,
+-				   0, 0x20 - GET_MODE_SIZE (mode))"))
++				   0, 0x1F)"))
+        (and (match_code "symbol_ref")
+ 	    (match_test "SYMBOL_REF_FLAGS (op) & SYMBOL_FLAG_IO_LOW"))))
+ 
+@@ -60,7 +60,7 @@
+ (define_special_predicate "io_address_operand"
+   (ior (and (match_code "const_int")
+ 	    (match_test "IN_RANGE (INTVAL (op) - avr_arch->sfr_offset,
+-				   0, 0x40 - GET_MODE_SIZE (mode))"))
++				   0, 0x3F)"))
+        (and (match_code "symbol_ref")
+ 	    (match_test "SYMBOL_REF_FLAGS (op) & SYMBOL_FLAG_IO"))))
+ 
+diff --git a/gcc/testsuite/gcc.target/avr/pr67839.c b/gcc/testsuite/gcc.target/avr/pr67839.c
+new file mode 100644
+index 0000000..604ab4b
+--- /dev/null
++++ b/gcc/testsuite/gcc.target/avr/pr67839.c
+@@ -0,0 +1,29 @@
++/* { dg-do compile } */
++/* { dg-options "-Os" } */
++/* { dg-final { scan-assembler "sbi 0x1f,0" } } */
++/* { dg-final { scan-assembler "cbi 0x1f,0" } } */
++/* { dg-final { scan-assembler-not "sbi 0x20,0" } } */
++/* { dg-final { scan-assembler-not "cbi 0x20,0" } } */
++/* { dg-final { scan-assembler "in r\\d+,__SREG__" } } */
++/* { dg-final { scan-assembler "out __SREG__,r\\d+" } } */
++/* { dg-final { scan-assembler-not "in r\\d+,0x40" } } */
++/* { dg-final { scan-assembler-not "out 0x40, r\\d+" } } */
++
++/* This testcase verifies that SBI/CBI/SBIS/SBIC
++   and IN/OUT instructions are not generated for
++   an IO addresses outside the valid range.
++*/
++#define IO_ADDR(x) (*((volatile char *)x + __AVR_SFR_OFFSET__))
++int main ()
++{
++  IO_ADDR(0x1f) |= 1;
++  IO_ADDR(0x1f) &= 0xFE;
++
++  IO_ADDR(0x20) |= 1;
++  IO_ADDR(0x20) &= 0xFE;
++
++  IO_ADDR(0x3f) = IO_ADDR(0x3f);
++
++  IO_ADDR(0x40) = IO_ADDR(0x40);
++  return 0;
++}



More information about the arch-commits mailing list