[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[MiNT] This must be an gcc / ld error!
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