Did investigate some more. error happens in cc1.exe. compiled a version of cc1.exe with -ggdb and -O0 and run it via gdb with a simple test program
$ gdb c:/mingw/msys/1.0/home/user/msp430/bin/../libexec/gcc/msp430/4.7.0/cc1.exe GNU gdb (GDB) 7.4 Copyright (C) 2012 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "i686-pc-mingw32". For bug reporting instructions, please see: <http://www.gnu.org/software/gdb/bugs/>... Reading symbols from c:\mingw\msys\1.0\home\user\msp430\libexec\gcc\msp430\4.7.0\cc1.exe...done. run -quiet -v -iprefix c:\mingw\msys\1.0\home\user\msp430\bin\../lib/gcc/msp430/4.7.0/ test.c -mcpu=430 -mmpy=none -mivcnt=16 -quiet -dumpbase test.c -mcpu=430 -mmpy=none -mivcnt=16 -auxbase test -version -o C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\ccrJ66Sq.s Starting program: c:\mingw\msys\1.0\home\user\msp430\libexec\gcc\msp430\4.7.0\cc1.exe -quiet -v -iprefix c:\mingw\msys\1.0\home\user\msp430\bin\../lib/gcc/msp430/4.7.0/ test.c -mcpu=430 -mmpy=none -mivcnt=16 -quiet -dumpbase test.c -mcpu=430 -mmpy=none -mivcnt=16 -auxbase test -version -o C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\ccrJ66Sq.s [New Thread 124.0x674] GNU C (GCC) version 4.7.0 20120322 (mspgcc dev 20120911) (msp430) compiled by GNU C version 4.7.1, GMP version 5.0.5, MPFR version 3.0.1, MPC version 0.9 GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096 ignoring nonexistent directory "c:\mingw\msys\1.0\home\user\msp430\bin\../lib/gcc/msp430/4.7.0/../../../../msp430/sys-include" ignoring nonexistent directory "/usr/local/msp430/lib/gcc/msp430/4.7.0/include" ignoring nonexistent directory "/usr/local/msp430/lib/gcc/msp430/4.7.0/include-fixed" ignoring nonexistent directory "/usr/local/msp430/msp430/sys-include" ignoring nonexistent directory "/usr/local/msp430/msp430/include" #include "..." search starts here: #include <...> search starts here: c:\mingw\msys\1.0\home\user\msp430\bin\../lib/gcc/msp430/4.7.0/include c:\mingw\msys\1.0\home\user\msp430\bin\../lib/gcc/msp430/4.7.0/include-fixed c:\mingw\msys\1.0\home\user\msp430\bin\../lib/gcc/msp430/4.7.0/../../../../msp430/include End of search list. GNU C (GCC) version 4.7.0 20120322 (mspgcc dev 20120911) (msp430) compiled by GNU C version 4.7.1, GMP version 5.0.5, MPFR version 3.0.1, MPC version 0.9 GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096 Compiler executable checksum: 212a98083063141132893f89e394d4be Program received signal SIGSEGV, Segmentation fault. 0x00b80b76 in __pformat_putc (c=8, stream=0x56efcdc) at ../../mingw/mingwex/stdio/pformat.c:282 282 ../../mingw/mingwex/stdio/pformat.c: No such file or directory. (gdb) bt #0 0x00b80b76 in __pformat_putc (c=8, stream=0x56efcdc) at ../../mingw/mingwex/stdio/pformat.c:282 #1 0x00b80cf7 in __pformat_putchars (s=<optimized out>, count=<optimized out>, stream=0x56efcdc) at ../../mingw/mingwex/stdio/pformat.c:337 #2 0x00b82392 in __pformat_puts (stream=0x56efccc, s=<optimized out>) at ../../mingw/mingwex/stdio/pformat.c:363 #3 __mingw_pformat (flags=8192, dest=0x0, max=0, fmt=0xbce562 "=%s%s", argv=0x56efd8c "_EXCEPTIONS__ 1\nwƒ¡") at ../../mingw/mingwex/stdio/pformat.c:1869 #4 0x00b8050c in __mingw_vsprintf (buf=buf@entry=0x0, fmt=fmt@entry=0xbce560 "%s=%s%s", argv=argv@entry=0x56efd88 "αß│\005_EXCEPTIONS__ 1\nwƒ¡") at ../../mingw/mingwex/stdio/vsprintf.c:62 #5 0x004bf81f in sprintf (__stream=0x0, __format=0xbce560 "%s=%s%s", __format=0xbce560 "%s=%s%s") at /opt/mxe/usr/lib/gcc/i686-pc-mingw32/4.7.1/../../../../i686-pc-mingw32/include/stdio.h:266 #6 0x0049a2c0 in builtin_define_type_minmax (min_macro=min_macro@entry=0x0, max_macro=max_macro@entry=0xbc0f20 "__SCHAR_MAX__", type=0x5b3e1e0) at ../../../gcc-4.7.0/gcc/c-family/c-cppbuiltin.c:1214 #7 0x0049a53b in builtin_define_type_max (macro=macro@entry=0xbc0f20 "__SCHAR_MAX__", type=<optimized out>) at ../../../gcc-4.7.0/gcc/c-family/c-cppbuiltin.c:1192 #8 0x0049c674 in c_cpp_builtins (pfile=0x5b2e6e8) at ../../../gcc-4.7.0/gcc/c-family/c-cppbuiltin.c:750 #9 0x004a64e7 in c_finish_options () at ../../../gcc-4.7.0/gcc/c-family/c-opts.c:1339 #10 0x004a8594 in c_common_parse_file () at ../../../gcc-4.7.0/gcc/c-family/c-opts.c:1114 #11 0x0066c3fd in compile_file () at ../../../gcc-4.7.0/gcc/toplev.c:557 #12 0x0066e47d in do_compile () at ../../../gcc-4.7.0/gcc/toplev.c:1938 #13 0x0066e603 in toplev_main (argc=argc@entry=20, argv=argv@entry=0x232710) at ../../../gcc-4.7.0/gcc/toplev.c:2014 #14 0x00b87c50 in main (argc=20, argv=0x232710) at ../../../gcc-4.7.0/gcc/main.c:36 I am not really able to interpret this output, but I hope one of you is. May be it has to do with the optimizer see "type=<optimized out>" above in #7 and #8 but I am just guessing. Your help is appreciated. The test program is: int main(void) { while(1) { printf("Test\n"); } return 0; } Best Matthias 2012/7/25 Matthias Hartmann <matthias.w.hartm...@gmail.com>: > I can confirm this. > > Tried building any of the 20bit versions for mingw32 (native on XP > 32bit,cross on ubuntu 11), all give a segmentation fault. > > No idea so far. > > May be there is somebody out there able to debug the msp430-gcc for mingw32. > > Best > > Matthias > > 2012/7/25 Marc de Hoop <marcdeh...@solcon.nl>: >> Hello, >> >> I wanted to try mspgcc's 20-bits support so I decided to compile mspgcc >> 20120716. I'm using the most recent MinGW on Windows 7 64bit. >> >> I checked out a whole workspace using: >> git clone -b workspace/master >> git://mspgcc.git.sourceforge.net/gitroot/mspgcc/mspgcc msp430 >> cd msp430 >> git submodule init >> git pull >> git submodule update >> >> The test430.sh script uses fixed paths and compiling gcc under mingw using >> fixed paths gives problems with mixing windows and posix path's so I >> followed the test430.sh script but with relative paths: >> >> mkdir -p /home/marc/workspace/msp430/install/dev/ >> mkdir -p /home/marc/workspace/msp430/BUILD/binutils/dev >> cd /home/marc/workspace/msp430/BUILD/binutils/dev >> ../../../binutils/configure --target=msp430 >> --prefix=/home/marc/workspace/msp430/install/dev >> make -j4 >> make install >> cd /home/marc/workspace/msp430/msp430mcu >> >> MSP430MCU_ROOT=$(pwd) sh scripts/install.sh >> /home/marc/workspace/msp430/install/dev >> >> mkdir -p /home/marc/workspace/msp430/gcc/dev/ >> mkdir -p /home/marc/workspace/msp430/BUILD/gcc/dev >> cd /home/marc/workspace/msp430/BUILD/gcc/dev >> >> ../../../gcc/configure --target=msp430 >> --prefix=/home/marc/workspace/msp430/install/dev --enable-languages=c,c++ >> >> make -j1 >> >> Then make runs for quite a while and finally I get: >> Configuring in msp430/libgcc >> configure: creating cache ./config.cache >> checking build system type... i686-pc-mingw32 >> checking host system type... msp430-unknown-none >> checking for --enable-version-specific-runtime-libs... no >> checking for a BSD-compatible install... /bin/install -c >> checking for gawk... gawk >> checking for msp430-ar... >> /home/marc/workspace/msp430/install/dev/msp430/bin/ar >> checking for msp430-lipo... msp430-lipo >> checking for msp430-nm... /home/marc/workspace/msp430/BUILD/gcc/dev/./gcc/nm >> checking for msp430-ranlib... >> /home/marc/workspace/msp430/install/dev/msp430/bin/ranlib >> checking for msp430-strip... >> /home/marc/workspace/msp430/install/dev/msp430/bin/strip >> checking whether ln -s works... no, using cp -p >> checking for msp430-gcc... >> /home/marc/workspace/msp430/BUILD/gcc/dev/./gcc/xgcc >> -B/home/marc/workspace/msp430/BUILD/gcc/dev/./gcc/ >> -B/home/marc/workspace/msp430/install/dev/msp430/bin/ >> -B/home/marc/workspace/msp430/install/dev/msp430/lib/ -isystem >> /home/marc/workspace/msp430/install/dev/msp430/include -isystem >> /home/marc/workspace/msp430/install/dev/msp430/sys-include >> checking for suffix of object files... configure: error: in >> `/home/marc/workspace/msp430/BUILD/gcc/dev/msp430/libgcc': >> configure: error: cannot compute suffix of object files: cannot compile >> See `config.log' for more details. >> make[1]: *** [configure-target-libgcc] Error 1 >> make[1]: Leaving directory `/home/marc/workspace/msp430/BUILD/gcc/dev' >> make: *** [all] Error 2 >> >> Checking >> /home/marc/workspace/msp430/BUILD/gcc/dev/msp430/libgcc/config.log shows >> me: >> >> configure:3434: /home/marc/workspace/msp430/BUILD/gcc/dev/./gcc/xgcc >> -B/home/marc/workspace/msp430/BUILD/gcc/dev/./gcc/ >> -B/home/marc/workspace/msp430/install/dev/msp430/bin/ >> -B/home/marc/workspace/msp430/install/dev/msp430/lib/ -isystem >> /home/marc/workspace/msp430/install/dev/msp430/include -isystem >> /home/marc/workspace/msp430/install/dev/msp430/sys-include -o conftest >> -g -O2 conftest.c >&5 >> conftest.c:1:0: internal compiler error: Segmentation fault >> Please submit a full bug report, >> with preprocessed source if appropriate. >> See <http://gcc.gnu.org/bugs.html> for instructions. >> configure:3437: $? = 1 >> configure:3625: checking for suffix of object files >> configure:3647: /home/marc/workspace/msp430/BUILD/gcc/dev/./gcc/xgcc >> -B/home/marc/workspace/msp430/BUILD/gcc/dev/./gcc/ >> -B/home/marc/workspace/msp430/install/dev/msp430/bin/ >> -B/home/marc/workspace/msp430/install/dev/msp430/lib/ -isystem >> /home/marc/workspace/msp430/install/dev/msp430/include -isystem >> /home/marc/workspace/msp430/install/dev/msp430/sys-include -c -g -O2 >> conftest.c >&5 >> conftest.c:1:0: internal compiler error: Segmentation fault >> Please submit a full bug report, >> with preprocessed source if appropriate. >> See <http://gcc.gnu.org/bugs.html> for instructions. >> configure:3651: $? = 1 >> configure: failed program was: >> | /* confdefs.h */ >> | #define PACKAGE_NAME "GNU C Runtime Library" >> | #define PACKAGE_TARNAME "libgcc" >> | #define PACKAGE_VERSION "1.0" >> | #define PACKAGE_STRING "GNU C Runtime Library 1.0" >> | #define PACKAGE_BUGREPORT "" >> | #define PACKAGE_URL "http://www.gnu.org/software/libgcc/" >> | /* end confdefs.h. */ >> | >> | int >> | main () >> | { >> | >> | ; >> | return 0; >> | } >> configure:3665: error: in >> `/home/marc/workspace/msp430/BUILD/gcc/dev/msp430/libgcc': >> configure:3668: error: cannot compute suffix of object files: cannot compile >> See `config.log' for more details. >> >> >> Bug report info according to http://gcc.gnu.org/bugs.html: >> >> Command line: >> /home/marc/workspace/msp430/BUILD/gcc/dev/./gcc/xgcc >> -B/home/marc/workspace/msp430/BUILD/gcc/dev/./gcc/ >> -B/home/marc/workspace/msp430/install/dev/msp430/bin/ >> -B/home/marc/workspace/msp430/install/dev/msp430/lib/ -isystem >> /home/marc/workspace/msp430/install/dev/msp430/include -isystem >> /home/marc/workspace/msp430/install/dev/msp430/sys-include -c -g -O2 >> conftest.c >> >> output of commandline with -v -save-temps: >> >> $ /home/marc/workspace/msp430/BUILD/gcc/dev/./gcc/xgcc >> -B/home/marc/workspace/m >> sp430/BUILD/gcc/dev/./gcc/ >> -B/home/marc/workspace/msp430/install/dev/msp430/bin >> / -B/home/marc/workspace/msp430/install/dev/msp430/lib/ -isystem >> /home/marc/wor >> kspace/msp430/install/dev/msp430/include -isystem >> /home/marc/workspace/msp430/i >> nstall/dev/msp430/sys-include -c -g -O2 -v -save-temps conftest.c >> Reading specs from >> C:/MinGW/msys/1.0/home/marc/workspace/msp430/BUILD/gcc/dev/gc >> c/specs >> Reading specs from >> C:/MinGW/msys/1.0/home/marc/workspace/msp430/install/dev/msp4 >> 30/lib/msp430mcu.spec >> COLLECT_GCC=C:\MinGW\msys\1.0\home\marc\workspace\msp430\BUILD\gcc\dev\gcc\xgcc. >> exe >> Target: msp430 >> Configured with: ../../../gcc/configure --target=msp430 >> --prefix=/home/marc/work >> space/msp430/install/dev --enable-languages=c,c++ >> Thread model: single >> gcc version 4.7.0 20120302 (mspgcc internal 20120618) (GCC) >> COLLECT_GCC_OPTIONS='-B' >> 'C:/MinGW/msys/1.0/home/marc/workspace/msp430/BUILD/gcc >> /dev/gcc/' '-B' >> 'C:/MinGW/msys/1.0/home/marc/workspace/msp430/install/dev/msp430 >> /bin/' '-B' >> 'C:/MinGW/msys/1.0/home/marc/workspace/msp430/install/dev/msp430/lib >> /' '-isystem' >> 'C:/MinGW/msys/1.0/home/marc/workspace/msp430/install/dev/msp430/i >> nclude' '-isystem' >> 'C:/MinGW/msys/1.0/home/marc/workspace/msp430/install/dev/msp >> 430/sys-include' '-c' '-g' '-O2' '-v' '-save-temps' '-mcpu=430' >> '-mmpy=none' '-m >> ivcnt=16' >> C:/MinGW/msys/1.0/home/marc/workspace/msp430/BUILD/gcc/dev/gcc/cc1.exe -E >> -quie >> t -v -iprefix >> c:\mingw\msys\1.0\home\marc\workspace\msp430\build\gcc\dev\gcc\../ >> lib/gcc/msp430/4.7.0/ -isystem >> C:/MinGW/msys/1.0/home/marc/workspace/msp430/BUIL >> D/gcc/dev/gcc/include -isystem >> C:/MinGW/msys/1.0/home/marc/workspace/msp430/BUIL >> D/gcc/dev/gcc/include-fixed -isystem >> C:/MinGW/msys/1.0/home/marc/workspace/msp43 >> 0/install/dev/msp430/include -isystem >> C:/MinGW/msys/1.0/home/marc/workspace/msp4 >> 30/install/dev/msp430/sys-include conftest.c -mcpu=430 -mmpy=none >> -mivcnt=16 -mc >> pu=430 -mmpy=none -mivcnt=16 -g -fworking-directory -O2 -fpch-preprocess >> -o conf >> test.i >> ignoring nonexistent directory >> "C:/MinGW/msys/1.0/home/marc/workspace/msp430/ins >> tall/dev/msp430/sys-include" >> ignoring nonexistent directory >> "c:\mingw\msys\1.0\home\marc\workspace\msp430\bui >> ld\gcc\dev\gcc\../lib/gcc/msp430/4.7.0/include" >> ignoring nonexistent directory >> "c:\mingw\msys\1.0\home\marc\workspace\msp430\bui >> ld\gcc\dev\gcc\../lib/gcc/msp430/4.7.0/include-fixed" >> ignoring nonexistent directory >> "c:\mingw\msys\1.0\home\marc\workspace\msp430\bui >> ld\gcc\dev\gcc\../lib/gcc/msp430/4.7.0/../../../../msp430/sys-include" >> ignoring nonexistent directory >> "c:\mingw\msys\1.0\home\marc\workspace\msp430\bui >> ld\gcc\dev\gcc\../lib/gcc/msp430/4.7.0/../../../../msp430/include" >> ignoring nonexistent directory >> "c:/mingw/msys/1.0/home/marc/workspace/msp430/bui >> ld/gcc/dev/lib/gcc/msp430/4.7.0/include" >> ignoring nonexistent directory >> "c:/mingw/msys/1.0/home/marc/workspace/msp430/bui >> ld/gcc/dev/lib/gcc/msp430/4.7.0/include-fixed" >> ignoring nonexistent directory >> "c:/mingw/msys/1.0/home/marc/workspace/msp430/bui >> ld/gcc/dev/msp430/sys-include" >> ignoring nonexistent directory >> "c:/mingw/msys/1.0/home/marc/workspace/msp430/bui >> ld/gcc/dev/msp430/include" >> #include "..." search starts here: >> #include <...> search starts here: >> C:/MinGW/msys/1.0/home/marc/workspace/msp430/BUILD/gcc/dev/gcc/include >> C:/MinGW/msys/1.0/home/marc/workspace/msp430/BUILD/gcc/dev/gcc/include-fixed >> C:/MinGW/msys/1.0/home/marc/workspace/msp430/install/dev/msp430/include >> End of search list. >> <built-in>:0:0: internal compiler error: Segmentation fault >> Please submit a full bug report, >> with preprocessed source if appropriate. >> See <http://gcc.gnu.org/bugs.html> for instructions. >> >> Preprocessed file: >> $ cat conftest.i >> # 1 "conftest.c" >> # 1 >> "C:\\MinGW\\msys\\1.0\\home\\marc\\workspace\\msp430\\BUILD\\gcc\\dev\\msp430\\libgcc//" >> >> >> I have tried a number of different things: >> - mpfr 2.4.1/gmp 5.0.1/mpc 0.8.1 from mingw and the versions obtained >> using contrib/dowload_prerequisites >> - using the normal gcc/binutils/gdb with the mspgcc patches >> - compiling the linux version using the same procedure and the test430.sh >> script works fine. >> >> So what do I do now? Is this a bug or am I doing something wrong? >> >> Or is it possible for someone to build a binary package for Windows of >> mspgcc 20120716? (Because that's where it all started.) >> >> Regards, >> >> Marc de Hoop >> >> >> ------------------------------------------------------------------------------ >> Live Security Virtual Conference >> Exclusive live event will cover all the ways today's security and >> threat landscape has changed and how IT managers can respond. Discussions >> will include endpoint security, mobile security and the latest in malware >> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ >> _______________________________________________ >> Mspgcc-users mailing list >> Mspgcc-users@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/mspgcc-users ------------------------------------------------------------------------------ Don't let slow site performance ruin your business. Deploy New Relic APM Deploy New Relic app performance management and know exactly what is happening inside your Ruby, Python, PHP, Java, and .NET app Try New Relic at no cost today and get our sweet Data Nerd shirt too! http://p.sf.net/sfu/newrelic-dev2dev _______________________________________________ Mspgcc-users mailing list Mspgcc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mspgcc-users