Home | Forums | What's new | Resources | |
GNUSH news |
antime - Apr 8, 2003 |
< Prev | 1 | 2 | 3 | 4 | Next> |
vbt | Mar 11, 2011 | ||||
GNUSH v11.01
|
vbt | Apr 5, 2012 | ||||
GNUSH v12.01
|
vbt | Apr 9, 2012 | |||
problem with wolfenstein3d, it doesn't happen with gnush11 if i link with gnush11 it work (with source compiled with gnush12) wl_act2.cpp wl_act2.cpp wl_act2.cpp wl_act2.cpp wl_act2.cpp wl_act2.cpp wl_act2.cpp wl_act2.cpp wl_draw.o: In function `TransformActor(objstruct*)': wl_draw.cpp wl_draw.cpp wl_draw.o: In function `TransformTile(int, int, short*, short*)': wl_draw.cpp wl_draw.cpp wl_draw.o: In function `CalcHeight()': wl_draw.cpp wl_draw.cpp wl_draw.o: In function `VGAClearScreen()': wl_draw.cpp wl_draw.o: In function `ScaleShape(int, int, unsigned int, unsigned long)': wl_draw.cpp wl_draw.o: In function `SimpleScaleShape(int, int, unsigned int)': wl_draw.cpp wl_draw.o: In function `AsmRefresh()': wl_draw.cpp wl_draw.cpp wl_draw.cpp wl_draw.o:wl_draw.cpp 4_6' follow wl_draw.o: In function `ThreeDRefresh()': wl_draw.cpp wl_draw.cpp wl_draw.cpp wl_draw.cpp wl_game.o: In function `SetupGameLevel()': wl_game.cpp wl_game.o: In function `LatchNumberHERE(int, int, unsigned int, long)': wl_game.cpp wl_game.cpp wl_game.o: In function `StartDemoRecord(int)': wl_game.cpp wl_game.o: In function `FinishDemoRecord()': wl_game.cpp wl_game.cpp wl_game.cpp wl_game.o: In function `RecordDemo()': wl_game.cpp wl_game.o: In function `PlayDemo(int)': wl_game.cpp wl_game.o: In function `Died()': wl_game.cpp wl_game.cpp wl_game.cpp wl_game.cpp wl_game.cpp wl_game.cpp wl_game.cpp wl_game.cpp wl_game.cpp wl_game.cpp wl_game.o: In function `GameLoop()': wl_game.cpp wl_play.o: In function `PollControls()': wl_play.cpp .... l:/saturn/SBL6/SEGALIB/GFS/elf/gfs_cdc2.o: In function `GFCD_Init': gfs_cdc2.c gfs_cdc2.c gfs_cdc2.c gfs_cdc2.c gfs_cdc2.c gfs_cdc2.c gfs_cdc2.c gfs_cdc2.c l:/saturn/SBL6/SEGALIB/GFS/elf/gfs_cdf2.o: In function `GFCF_cnvIntlvOfs': gfs_cdf2.c l:/saturn/SBL6/SEGALIB/GFS/elf/gfs_trn2.o: In function `gftr_getSrcPack': gfs_trn2.c l:/saturn/SBL6/SEGALIB/GFS/elf/gfs_dir2.o: In function `GFDR_NameToId': gfs_dir2.c l:/saturn/SBL6/SEGALIB/GFS/elf/gfs_dir2.o: In function `gfdr_read': gfs_dir2.c gfs_dir2.c l:/saturn/SBL6/SEGALIB/GFS/elf/gfs_dir2.o: In function `gfdr_setupDirNameTbl': gfs_dir2.c gfs_dir2.c wl_main.o: In function `main': wl_main.cpp wl_main.cpp wl_main.cpp wl_main.cpp wl_main.cpp wl_main.cpp wl_main.cpp wl_main.o: In function `_GLOBAL__sub_I_str': wl_main.cpp collect2: ld returned 1 exit status make: *** [root/sl.coff] Error 1 |
antime | Apr 9, 2012 | |||
Can you successfully build a simple "hello world" application? If that works, go over your linker invocation in your makefile. In particular, the library and object file order matters. GNU ld will only keep symbols from static libraries it thinks are needed, so if the object a.o depends on the library b.a, a.o must appear before b.a on the linker command line. |
Chilly Willy | Apr 9, 2012 | |||
The missing refs sounds like you're missing the libraries. Maybe they changed the path in the latest arc. Double check the paths for libc, libgcc, and libgcc-Os-4-200. |
vbt | Apr 13, 2012 | |||||
I did, I don't see any difference, i never used -lgcc-Os-4-200 to compile. for test only, not tested on saturn yet : * http://vberthelot.free.fr/test.rar... |
antime | Apr 13, 2012 | |||||
AFAIK, the need to link against gcc-Os-4-200 was a bug in early GCC 4.2. It's not needed anymore. |
Chilly Willy | Apr 16, 2012 | ||||||||
Hmm - I'll have to check that out. I can't remember the last time I tried not linking to it. It was required for compiling as SH2 as opposed to SH1. And... nope! It's still needed. Without that lib, you get this with Wolf32X compiled with 4.6.2:
Code:
So it's just as I learned before - if you compile for SH2 (-m2), you NEED to link against that lib. If you compile to SH1, you don't, but you also can't take advantage of the extra SH2 instructions. I used to compile my 32X stuff as SH1 until I learned to link against gcc-Os-4-200. |
antime | Apr 17, 2012 | |||
Works for me. Are you compiling with -nodefaultlibs? |
Chilly Willy | Apr 17, 2012 | |||||
I wasn't, but adding it makes no difference - still get those errors. I think it's more from using the gcc libc and libgcc than any flags - you use the libc and libgcc, you HAVE to use libgcc-Os-4-200 for SH2. I use libc and libm from newlib, and libgcc from gcc. On something like the SH2, I don't see using custom libc/libm as necessary. Even on the 68000, using newlib isn't a big deal. |
vbt | Apr 17, 2012 | |||
I didn't find yet, I just can say all my projects in C compile well, Wolf3D is my only C++ project. Chilly Willy, you compile .c files and me .cpp maybe that's the difference. |
antime | Apr 17, 2012 | |||
I'm using the simplest possible GCC+Newlib toolchain (--target=sh-elf --enable-languages="c,c++" --with-newlib). GCC is set up to implicitly link against libgcc-Os-4-200 (look in the GCC specs files), but -nodefaultlibs would of course prevent that. |
Chilly Willy | Apr 18, 2012 | ||||||||||||
My C++ example, as simple as it is, requires it too.
Code:
The SH2 build of libgcc simply REQUIRES libgcc-Os-4-200.
I tried -nodefaultlibs and it doesn't change the behavior. The only flag I know of that does is the machine flag... -m1 doesn't require it, and -m2 does. Like I said above, if you use libgcc for the SH2, you have to use the other or you get the link errors I posted previously. |
antime | Apr 18, 2012 | |||
There is definitely something weird about your setup. GCC automatically links against libgcc, libgcc-Os-4-200 and libc unless you use -nodefaultlibs or -nostdlib. G++ will also automatically link against libstdc++ unless explicitely prevented. Do you have a small example project I could try? |
vbt | Apr 18, 2012 | |||
it's fixed
there was in my link script --format=coff-sh it worked on gnush11, i have put --format=elf32-sh instead also can someone explain me how to use newlib with kpit gnush |
antime | Apr 18, 2012 | |||
The KPIT distribution already uses newlib as its C library. |
Chilly Willy | Apr 18, 2012 | |||||
http://segaxtreme.net/community/topic/18627-time-t... You'll find the archive of examples towards the bottom. You'll want the 32X examples... there is both a C and a C++ example, both of which show the same behavior, with or without -nodefaultlibs. They use -nostdlib to prevent gcc from automatically linking in the "standard" crt0.o, and then the makefile links in libc libgcc libgc-Os-4-200. |
antime | Apr 19, 2012 | ||||||||
That would explain it. Quoting the GCC documentation:
If you just want to use a custom crt0, use the -nostartfiles option instead. |
Chilly Willy | Apr 19, 2012 | |||||
Ah - okay. So if you don't need those other libs (or are using minimal replacements), use -nostartfiles. Thanks for pointing that out. It's hard to keep track of all those crazy options, ESPECIALLY the ones for optimization. |
< Prev | 1 | 2 | 3 | 4 | Next> |