From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25276 invoked by alias); 23 Sep 2013 14:07:06 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 25227 invoked by uid 48); 23 Sep 2013 14:07:04 -0000 From: "errordeveloper at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/58507] New: Incorrect parsing of `-mmcu=msp430*` Date: Mon, 23 Sep 2013 14:07:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 4.9.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: errordeveloper at gmail dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter cc Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2013-09/txt/msg01656.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58507 Bug ID: 58507 Summary: Incorrect parsing of `-mmcu=msp430*` Product: gcc Version: 4.9.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: errordeveloper at gmail dot com CC: dj at redhat dot com, nickc at redhat dot com % cat test.c #include int main() { return 0; }; % msp430-elf-gcc -mmcu=msp430fr5739 test.c -I/home/ilya/msp430/msp430-elf-21092013-0/msp430-elf/include/msp430 /home/ilya/msp430/msp430-elf-21092013-0/bin/../lib/gcc/msp430-elf/4.9.0/../../../../msp430-elf/bin/ld: error: /tmp/cc5edjEZ.o uses MSP430X instructions but /home/ilya/msp430/msp430-elf-21092013-0/bin/../lib/gcc/msp430-elf/4.9.0/../../../../msp430-elf/lib/crt0.o uses MSP430 /home/ilya/msp430/msp430-elf-21092013-0/bin/../lib/gcc/msp430-elf/4.9.0/../../../../msp430-elf/bin/ld: failed to merge target specific data of file /tmp/cc5edjEZ.o collect2: error: ld returned 1 exit status Checking this reviles a dull parameter parsing bug: % msp430-elf-gcc -mmcu=msp430 test.c -I/home/ilya/msp430/msp430-elf-21092013-0/msp430-elf/include/msp430 -c % msp430-elf-objdump -x test.o | grep -i arch architecture: msp:11, flags 0x00000010: % msp430-elf-gcc -mmcu=msp430x test.c -I/home/ilya/msp430/msp430-elf-21092013-0/msp430-elf/include/msp430 -c % msp430-elf-objdump -x test.o | grep -i arch architecture: msp:430X, flags 0x00000010: % msp430-elf-gcc -mmcu=msp430fr5739 test.c -I/home/ilya/msp430/msp430-elf-21092013-0/msp430-elf/include/msp430 -c % msp430-elf-objdump -x test.o | grep -i arch architecture: msp:430X, flags 0x00000010: Here are the revision ID's for your reference: gcc 25bd6b06e5c81ff8c97d6671651442305a2cbbb2 newlib 090b27c6ed560767408293f185aa313eeef23d74 binutils e1926926db9154828b02a83c3d094ba6c39247e0 gdb 7.6.50.20130921 msp430mcu d5dd733e674dfd80781669a98ef85fd57526ce47 mspdebug 0.22 The compilation was done according to: http://sourceforge.net/apps/mediawiki/mspgcc/index.php?title=Install:redhat A x86 binary can be found here: https://s3.amazonaws.com/com.xively.packages/msp430-elf-21092013-0.txz