I build msp430-elf toolchains using the latest material in the gcc-4_9-branch of gcc, master of binutils, and master of newlib. In what follows I've set RHINC to point to the include directory from GCC_RH-20140508 that has the headers and linker scripts.
There is a fault in binutils introduced at 77ac17b8 which causes msp430-elf-ld to fail to link applications. I get this behavior: llc[186]$ cat x.c #include <msp430.h> void main (void) { } llc[187]$ /usr/local/msp430-elf-dev-20140601h/bin/msp430-elf-gcc -mmcu=msp430f5438a -I${RHINC} -T${RHINC}/msp430f5438a.ld x.c llc[188]$ /usr/local/msp430-elf-dev-20140601j/bin/msp430-elf-gcc -mmcu=msp430f5438a -I${RHINC} -T${RHINC}/msp430f5438a.ld x.c /usr/local/msp430-elf-dev-20140601h/lib/gcc/msp430-elf/4.9.1/../../../../msp430-elf/bin/ld: target not found collect2: error: ld returned 1 exit status The second produces a diagnostic from open_output in ld/ldlang.c where output_target is an empty string. The only difference between these two chains is the version of binutils: llc[189]$ cat /usr/local/msp430-elf-dev-20140601h/.sha1.binutils 77ac17b8453f60adabaa8931930e2bbe0499757d llc[190]$ cat /usr/local/msp430-elf-dev-20140601j/.sha1.binutils 9854d43d40fc116d72a24583f53e34f91cf4098b A cursory look at the commit doesn't explain why this might happen, unless msp430 requires that ${GENSCRIPTS} be invoked for some reason. 77ac17b8453f60adabaa8931930e2bbe0499757d is the first bad commit commit 77ac17b8453f60adabaa8931930e2bbe0499757d Author: Hans-Peter Nilsson <h...@bitrange.com> Date: Wed May 28 18:20:16 2014 +0200 ld: Split GENSCRIPTS rule from dependencies to fix tdir_'s. * Makefile.am: Change all rules with ${GENSCRIPTS} invocations to be just dependencies. ($(ALL_EMULATION_SOURCES) $(ALL_64_EMULATION_SOURCES)) (run-genscripts): New rules. * Makefile.in: Regenerate. :040000 040000 bd02f74300dab8958bc24165a23661e0d939889f 388df7b3ae54aabf53d35973a09bcc94fa1f91b5 M ld _______________________________________________ bug-binutils mailing list bug-binutils@gnu.org https://lists.gnu.org/mailman/listinfo/bug-binutils