From mint-bounce@lists.fishpool.fi Thu May 27 16:23:23 2010 X-Squirrel-UserHash: EhVcX1lFRQVaRwYcDQ== X-Squirrel-FromHash: UANfXlpGQwY= Message-ID: <6f058cd2548d6d5f3dd6be1d3e1793ba-EhVcX1lFRQVaRwYcDTpQCEFddQZLVF5dQUBFBDBTXF5bVkYAWEF3AVU6XF1YRUwLXlxYSQ==-webmailer2@server07.webmailer.hosteurope.de> Date: Thu, 27 May 2010 22:20:19 +0200 Subject: [MiNT] This must be an gcc / ld error! From: "Ole Loots" To: mint@lists.fishpool.fi Reply-To: ole@monochrom.net User-Agent: Host Europe Webmailer/1.0 MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) Importance: Normal X-HE-Access: Yes X-bounce-key: webpack.hosteurope.de;ole@monochrom.net;1274991776;d26e98a3; X-ecartis-version: Ecartis v1.0.0 Sender: mint-bounce@lists.fishpool.fi Errors-to: mint-bounce@lists.fishpool.fi X-original-sender: ole@monochrom.net Precedence: bulk List-help: List-unsubscribe: List-Id: X-List-ID: List-subscribe: List-owner: List-post: Sorry, I'm still messing around with gcc,..., I can't stop now. I'm trying to port a project, without your help I would have not finished the compilation / linking phase. Thanks for that! :) After everything had been linked, I thought I could try to start the Program, of course I was prepared for anything (or nothing at all)! Well, it did not work, the executable returned error code 1. So I got in contact with the developers of netsurf - someone there told me: "running libnsfb 'make test' is your first step in porting netsurf". (libnsfb is a framebuffer library with support for sdl framebuffers/surfaces). OK, I did that. The make file produced some test executables... any of the produced executables throws an Illegal Instruction exception. I removed the -O2 flag from the compiler options and I also removed the -g option. Both results in the same Invalid Instructions. I tried to load the test cases with gdb ( also with gdb-7.0 provided by Vincent ) but when I do: b main I get an Bus error (just if I compiled with -g ! - else i hit the Illegal Instruction). So I expect the executable is not build like it should have been build. GCC produced "garbage" ;) Of course it did not produce garbage - but maybe it sets the entry point to something wrong, or such thing? Btw. I don't want to bash on gcc etc. - I'm just working with it ;) It's good to have an new gcc version for the Atari, of course ! :) Here is the gcc commandline that produces the bad executable: COMPILE: test/frontend.c cc -MMD -MP -g -std=c99 -D_BSD_SOURCE -I/d/root/netsurf/mintlibs/libnsfb/include/ -I/d/root/netsurf/mintlibs/libnsfb/src -Wall -Wextra -Wundef -Wpointer-arith -Wcast-align -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -pedantic -Wno-overlength-strings -DNDEBUG -DBUILD_TARGET_FreeMiNT -DBUILD_HOST_FreeMiNT -o build-FreeMiNT-FreeMiNT-release-lib-static/test_frontend.o -c test/frontend.c echo " LINK: build-FreeMiNT-FreeMiNT-release-lib-static/test_frontend" LINK: build-FreeMiNT-FreeMiNT-release-lib-static/test_frontend cc -o build-FreeMiNT-FreeMiNT-release-lib-static/test_frontend build-FreeMiNT-FreeMiNT-release-lib-static/test_frontend.o -Wl,--whole-archive -lnsfb -Wl,--no-whole-archive -lSDL -lldg -lgem -lm -Lbuild-FreeMiNT-FreeMiNT-release-lib-static Maybe someone is willing to comment on this...? greets, mono