debian/0000775000000000000000000000000012377452646007210 5ustar debian/rules0000775000000000000000000000477512377452557010306 0ustar #!/usr/bin/make -f # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 PACKAGE=gcc-msp430 TARGET=msp430 VERSION = $(shell dpkg-parsechangelog | sed -n 's/^Version:.*\(msp.*\)-.*$$/\1/p') CONFARGS = -v \ --enable-languages=c,c++ \ --prefix=/usr \ --with-system-zlib \ --infodir=\$${prefix}/share/info \ --mandir=\$${prefix}/share/man \ --bindir=\$${prefix}/bin \ --libexecdir=\$${prefix}/lib \ --libdir=\$${prefix}/lib \ --build=$(DEB_BUILD_GNU_TYPE) \ --host=$(DEB_HOST_GNU_TYPE) \ MAKEINFO=missing \ --target=$(TARGET) BUILD_TREE = $(shell find . -maxdepth 1 -mindepth 1 -type d -name 'gcc*') DEB_SOURCE = ./ BUILD_RES = build-result unpack: unpack-stamp unpack-stamp: tar xaf $(DEB_SOURCE)/gcc-*.tar.* touch unpack-stamp patch-stamp: unpack-stamp cd $(BUILD_TREE) && \ for upstreamp in `grep -v '^#' $(CURDIR)/debian/patchlist`; \ do echo; echo Applying patch $$upstreamp; \ patch -p1 < $(CURDIR)/debian/$$upstreamp; done touch patch-stamp configure: configure-stamp configure-stamp: patch-stamp dh_testdir dh_autotools-dev_updateconfig mkdir -p $(BUILD_RES) sed -i 's/BUILD_INFO=info/BUILD_INFO=/' $(BUILD_TREE)/configure cd $(BUILD_RES) && $(CURDIR)/$(BUILD_TREE)/configure $(CONFARGS) touch configure-stamp build: build-arch build-indep build-arch: build-stamp build-indep: build-stamp build-stamp: configure-stamp dh_testdir $(MAKE) $(MAKEFLAGS) -C $(BUILD_RES) touch build-stamp clean: dh_testdir dh_testroot rm -f build-stamp configure-stamp unpack-stamp patch-stamp rm -rf $(BUILD_TREE) rm -rf $(BUILD_RES) dh_clean install: build dh_testdir dh_testroot dh_prep dh_installdirs $(MAKE) $(MAKEFLAGS) -C $(BUILD_RES) install prefix=$(CURDIR)/debian/$(PACKAGE)/usr # Remove conflicting and empty files rm -rf debian/$(PACKAGE)/usr/share/info rm -rf debian/$(PACKAGE)/usr/share/man rm -rf debian/$(PACKAGE)/usr/msp430/ rm -rf debian/$(PACKAGE)/usr/lib/libiberty.a binary-indep: install binary-arch: install dh_testdir dh_testroot dh_installdocs -n dh_installman dh_installchangelogs dh_link # We'd really need cross-stripping here, instead dh_strip -Xlibgcc.a -Xlibcrt0.a -Xcrt0ivtbl64.o \ -Xlibgcov.a -Xlibcrt0dwdt.a -Xcrt0ivtbl16.o \ -Xcrt0ivtbl32.o dh_compress dh_fixperms dh_installdeb dh_shlibdeps dh_gencontrol dh_md5sums dh_builddeb binary: binary-indep binary-arch .PHONY: build clean binary-indep binary-arch binary install configure debian/patchlist0000664000000000000000000000013512376150550011111 0ustar ./own-patch/pr54638.diff ../msp430-gcc-4.6.3-20120406.patch ./own-patch/fram-fuse-blown.diff debian/source/0000775000000000000000000000000011575362224010477 5ustar debian/source/format0000664000000000000000000000001411575362222011703 0ustar 3.0 (quilt) debian/README.Debian0000664000000000000000000000044311575357545011253 0ustar To make it possible to have different versions of gcc packages installed for different targets the local and most common documentation have been removed from the cross packages. If you want these files aswell you'll have to install the same version of the native package as of this package. debian/changelog0000664000000000000000000000772212377452646011072 0ustar gcc-msp430 (4.6.3~mspgcc-20120406-7ubuntu3) utopic; urgency=medium * Drop restoreconfig from d/rules, trying to fix FTBFS. -- Artur Rona Thu, 28 Aug 2014 00:02:36 +0200 gcc-msp430 (4.6.3~mspgcc-20120406-7ubuntu2) utopic; urgency=medium * Switch from autoreconf to autotools, now it should start working. -- Artur Rona Wed, 27 Aug 2014 08:51:25 +0200 gcc-msp430 (4.6.3~mspgcc-20120406-7ubuntu1) utopic; urgency=medium * debian/control, debian/rules: - Use dh-autoreconf to get new libtool macros for ppc64el and update config.{sub,guess} for new arches. (Closes: #744434) -- Artur Rona Wed, 27 Aug 2014 00:30:52 +0200 gcc-msp430 (4.6.3~mspgcc-20120406-7) unstable; urgency=medium * Fix generation of wrong interrupt table for MSP430FR5xxx targets, resulting in security fuse blown (Closes: #706482) -- Luca Bruno Sat, 23 Aug 2014 19:38:20 +0200 gcc-msp430 (4.6.3~mspgcc-20120406-6) unstable; urgency=high * Fix ICE by backporting pr54638, now building with standard gcc (Closes: #747998) -- Luca Bruno Sun, 17 Aug 2014 15:46:15 +0200 gcc-msp430 (4.6.3~mspgcc-20120406-5) unstable; urgency=medium * Use gcc-4.7 for building (Closes: #701281) * Do not build info doc (Closes: #712342) -- Luca Bruno Fri, 12 Jul 2013 19:52:56 +0200 gcc-msp430 (4.6.3~mspgcc-20120406-4) unstable; urgency=high * Change package description to mention the incompatibility with MSP430FR5xxx chips (eg. Fraunchpad board). This package DOES NOT work on that chips series, and will brick your hardware * Do not use embedded zlib for building -- Luca Bruno Thu, 02 May 2013 13:40:16 +0200 gcc-msp430 (4.6.3~mspgcc-20120406-3) unstable; urgency=low * Disable features not relevant to msp430 -- Luca Bruno Sun, 20 May 2012 13:53:14 +0200 gcc-msp430 (4.6.3~mspgcc-20120406-2) unstable; urgency=low * Upload to unstable -- Luca Bruno Fri, 18 May 2012 20:45:00 +0200 gcc-msp430 (4.6.3~mspgcc-20120406-1) experimental; urgency=low * New upstream release * Due to upstream and debian gcc-source de-synchronization, vanilla sources are now embedded here along with patches -- Luca Bruno Thu, 17 May 2012 09:04:24 +0200 gcc-msp430 (4.5.3~mspgcc-20110716-4) unstable; urgency=low * Fix building targets in debian/rules -- Luca Bruno Wed, 18 Jan 2012 21:17:05 +0100 gcc-msp430 (4.5.3~mspgcc-20110716-3) unstable; urgency=low * Upstream patch-point + SF 3433730: Bug when casting function parameters -- Luca Bruno Sun, 06 Nov 2011 09:25:18 +0100 gcc-msp430 (4.5.3~mspgcc-20110716-2) unstable; urgency=low * Upstream patch-point + SF 3409864: Args overwritten after call involving int64 + SF 3417263: GDB wrong address for variables + SF 3431602: Incorrect comparison to 32-bit literal -- Luca Bruno Fri, 04 Nov 2011 22:33:24 +0100 gcc-msp430 (4.5.3~mspgcc-20110716-1) unstable; urgency=low * Upstream patch-point + SF 3370978: ICE on shift with 32-bit count + SF 3390964: broken optimization with emulated multiply libcalls + SF 3394176: unrecognizable insn error subtracting addresses + SF 3396639: restore lost source listings (and perhaps debugger support) -- Luca Bruno Tue, 23 Aug 2011 10:36:00 +0200 gcc-msp430 (4.5.3~mspgcc-4.5.2-20110612-1) unstable; urgency=low * New upstream release + First official mspgcc tarball -- Luca Bruno Mon, 13 Jun 2011 12:17:44 +0200 gcc-msp430 (4.5.3~msp20110421-1) unstable; urgency=low * Upload to Debian Unstable -- Luca Bruno Wed, 01 Jun 2011 15:59:24 +0200 gcc-msp430 (4.5.2~msp20110421-0exp1) experimental; urgency=low * Initial upload to Debian (Closes: #137712) -- Luca Bruno Fri, 22 Apr 2011 16:12:45 +0200 debian/compat0000664000000000000000000000000211575357545010407 0ustar 5 debian/control0000664000000000000000000000232112377274207010604 0ustar Source: gcc-msp430 Section: devel Priority: extra Maintainer: Ubuntu Developers XSBC-Original-Maintainer: Luca Bruno Standards-Version: 3.9.5 Build-Depends: autoconf (>= 2.13), bison, flex, gettext, texinfo, binutils (>= 2.9.5.0.12), gcc (>= 2.95.2), debhelper (>= 7), tar (>= 1.13.18), bzip2, findutils(>=4.2.31), libgmp-dev (>= 2:5.0.1+dfsg-7), libmpfr-dev, libmpc-dev, libzip-dev, binutils-msp430 (>= 2.21~), msp430mcu, autotools-dev Build-Conflicts: binutils-multiarch Package: gcc-msp430 Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends}, msp430mcu, binutils-msp430 (>= 2.21~) Recommends: msp430-libc Description: GNU C compiler (cross compiler for MSP430) This is the GNU C compiler, a fairly portable optimizing compiler for C for TI's MSP430 architecture. This package is primarily for MSP430 developers and cross-compilers and is not needed by normal users. . BEWARE: due to a bug in the memory layout reference of FRAM-based chips, this package DOES NOT WORK with MSP430FR5xxx chips (eg. FraunchPad devkit). DO NOT use gcc-msp430 on that chip series, as you will lose access to JTAG and BSL, and permanently BRICK your chip! debian/copyright0000664000000000000000000000423711575357545011152 0ustar This is the debian package of the GNU Compiler Collection compiled for cross development for the msp430 processor. It was created by Luca Bruno from a patchset distributed by the mspgcc project and applied to the original GCC source packages. msp430 original changes are available through git at http://mspgcc.git.sourceforge.net/git/gitweb-index.cgi Original GCC is available via the gcc-4.5-source package or at http://ftp.gnu.org/pub/gnu/gcc/ mspgcc patches follow GCC original copyright, as declared by the author clarifying the license of the patch-set: http://thread.gmane.org/gmane.comp.hardware.texas-instruments.msp430.gcc.user/9161 """ From: Peter Bigot Subject: copyright on upstream patches Date: Sun, 30 Jan 2011 18:30:34 -0600 In all the excitement of getting the new version out, I forgot I'd been asked to provide a header on the patch files that apply to the upstream distributions (binutils, gcc, gdb) explicitly noting that the material therein was copyright Free Software Foundation and subject to licensing restrictions of the upstream distribution (presumably GPL). This is consistent with everything I've been able to find in the source repositories from CVS onward. """ GCC is Copyright © 1986-2011, Free Software Foundation, Inc. The entire package is distributed under GPL-3+: This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. On Debian GNU/Linux systems, the complete text of the GNU General Public License can be found in `/usr/share/common-licenses/GPL'. debian/gcc-msp430.lintian-overrides0000664000000000000000000000005311705624235014333 0ustar gcc-msp430: binary-from-other-architecture debian/dirs0000664000000000000000000000002411575357545010071 0ustar usr/bin usr/lib debian/own-patch/0000775000000000000000000000000012376150511011071 5ustar debian/own-patch/fram-fuse-blown.diff0000664000000000000000000000511712141552527014736 0ustar From 0594213396817815f584efe3257987e704b4f187 Mon Sep 17 00:00:00 2001 From: Peter A. Bigot Date: Thu, 12 Jul 2012 14:32:16 -0500 Subject: [PATCH] SF 3540953 fram applications overwrite bsl/jtag passwords No MSP430 chip has more than 25 valid interrupts, and they are assigned from the top down. The FRAM chips use lower words in the interrupt vector to hold BSL and JTAG passwords, and having real addresses in those locations has been shown to result in problems accessing BSL and JTAG. Leave the low 32 words erased; this matches as-delivered MSP430FR5739 content for those addresses. --- gcc/config/msp430/crt0ivtbl.S | 44 ++++++++++++++++++++++++++++++++++++- 1 files changed, 42 insertions(+), 2 deletions(-) diff --git gcc-4.6.3.orig/gcc/config/msp430/crt0ivtbl.S gcc-4.6.3/gcc/config/msp430/crt0ivtbl.S index 46bc0c1..68dff23 100644 --- gcc-4.6.3.orig/gcc/config/msp430/crt0ivtbl.S +++ gcc-4.6.3/gcc/config/msp430/crt0ivtbl.S @@ -36,6 +36,7 @@ __br_unexpected_: DEFINE_IVTABLE INTERRUPT_VECTOR_COUNT +#if 32 >= INTERRUPT_VECTOR_COUNT INITIALIZE_ISR_SLOT 0 INITIALIZE_ISR_SLOT 1 INITIALIZE_ISR_SLOT 2 @@ -69,8 +70,47 @@ DEFINE_IVTABLE INTERRUPT_VECTOR_COUNT INITIALIZE_ISR_SLOT 29 INITIALIZE_ISR_SLOT 30 #endif /* 16 < INTERRUPT_VECTOR_COUNT */ -#if 32 < INTERRUPT_VECTOR_COUNT - INITIALIZE_ISR_SLOT 31 +#else /* 32 >= INTERRUPT_VECTOR_COUNT */ +/* SF 3540953 fram applications overwrite bsl/jtag passwords + * + * No MSP430 chip has more than 25 valid interrupts, and they are assigned from + * the top down. The FRAM chips use lower words in the interrupt vector to + * hold BSL and JTAG passwords, and having real addresses in those locations + * has been shown to result in problems accessing BSL and JTAG. Leave the low + * 32 words erased; this matches as-delivered MSP430FR5739 content for those + * addresses. */ + .word 0xffff ; 0 + .word 0xffff ; 1 + .word 0xffff ; 2 + .word 0xffff ; 3 + .word 0xffff ; 4 + .word 0xffff ; 5 + .word 0xffff ; 6 + .word 0xffff ; 7 + .word 0xffff ; 8 + .word 0xffff ; 9 + .word 0xffff ; 10 + .word 0xffff ; 11 + .word 0xffff ; 12 + .word 0xffff ; 13 + .word 0xffff ; 14 + .word 0xffff ; 15 + .word 0xffff ; 16 + .word 0xffff ; 17 + .word 0xffff ; 18 + .word 0xffff ; 19 + .word 0xffff ; 20 + .word 0xffff ; 21 + .word 0xffff ; 22 + .word 0xffff ; 23 + .word 0xffff ; 24 + .word 0xffff ; 25 + .word 0xffff ; 26 + .word 0xffff ; 27 + .word 0xffff ; 28 + .word 0xffff ; 29 + .word 0xffff ; 30 + .word 0xffff ; 31 INITIALIZE_ISR_SLOT 32 INITIALIZE_ISR_SLOT 33 INITIALIZE_ISR_SLOT 34 -- 1.7.4.1 debian/own-patch/pr54638.diff0000664000000000000000000000152112374137546012770 0ustar # DP: Fix PR middle-end/54638 gcc/ 2012-09-21 Richard Guenther PR middle-end/54638 Backport from mainline 2012-04-19 Richard Guenther * ira-int.h (ira_allocno_object_iter_cond): Avoid out-of-bound array access. Index: gcc/ira-int.h =================================================================== --- a/gcc/ira-int.h (revision 191604) +++ b/gcc/ira-int.h (revision 191605) @@ -1138,8 +1138,13 @@ ira_allocno_object_iter_cond (ira_allocno_object_iterator *i, ira_allocno_t a, ira_object_t *o) { - *o = ALLOCNO_OBJECT (a, i->n); - return i->n++ < ALLOCNO_NUM_OBJECTS (a); + int n = i->n++; + if (n < ALLOCNO_NUM_OBJECTS (a)) + { + *o = ALLOCNO_OBJECT (a, n); + return true; + } + return false; } /* Loop over all objects associated with allocno A. In each