<QUOTE author="gijoe77" post_id="1275" time="1530339075" user_id="243">
gijoe77 post_id=1275 time=1530339075 user_id=243 Wrote:ok - I'm not at the skill level to take on alignment issues so I moved on to dgen 1.33
Just to point out one more thing: Alignment requirements are very common on RISC CPU-based systems (MIPS, PPC/POWER, Alpha, ARM, PA-RISC, ...), you will see this on any platform (CPU + OS) with RISC CPUs (and derivates like VLIW - it's about order). The reason is efficiency, in a broad sense: design of CPU can be less complex, software can be less complex, execution can be faster, programs can be smaller, and so on.
To put a real life example. RISC would be like <URL url="https://images.scribblelive.com/2017/7/31/be281e3d-65a1-4435-af51-8c75d754f98a_800.jpg">
this: an ordered life, with lots of assumptions (you work ~8 hours a day, ~5 days a week, you have to take the bus at a specified hour, you need ~45 min to get to work, ...).
And CISC would be more like <URL url="https://www.deike-online.de/media/image/thumbnail/bu712U69F3-96dpi_720x600.png">
this: chaos.
<QUOTE author="gijoe77" post_id="1275" time="1530339075" user_id="243">
gijoe77 post_id=1275 time=1530339075 user_id=243 Wrote:I was able to finally compile it with gcc
Congrats!!!
<QUOTE author="gijoe77" post_id="1275" time="1530339075" user_id="243">
gijoe77 post_id=1275 time=1530339075 user_id=243 Wrote:What is the typical way to handle gcc/GNU header files that are not installed by default MIPSpro/gcc?
Let's divide header files into two groups: those backed by a library (linked) and those that are not (independent). In both cases a header file functions as an interface for the programmer, but: The linked ones need the corresponding library to be included when linking the executable/DSO.
Mixing, modifying, replacing header files just for hacking, breaking and fixing things is great for learning but a really bad idea (what function prototypes does it include, where is the code for this functions, is it compatible with existing ones, ...).
<QUOTE author="gijoe77" post_id="1275" time="1530339075" user_id="243">
gijoe77 post_id=1275 time=1530339075 user_id=243 Wrote:just put them in the gcc include directory or make a separate one and link to it? Like put them in /usr/local/newincludes and then do a "-I/usr/local/newincludes" ?
If just hacking, this would be ok...
The steps I would take when in need of a header file not present on my system, would be:
1. Locate the package/project/whatever the header file is part of
2. Port this package/project/whatever to your platform (MIPS/IRIX) <-- here is where you adapt the header files and underlying libraries, if any, to work on your platform
3. Install it somewhere on your system
4. Use them in your source code
<QUOTE author="gijoe77" post_id="1275" time="1530339075" user_id="243">
gijoe77 post_id=1275 time=1530339075 user_id=243 Wrote:I noticed this spat out at linking (last line with "CXXFLAG -v" added):
Code:
CXXLD dgen
Reading specs from /usr/nekoware/lib/gcc/mips-sgi-irix6.5/3.4.6/specs
Configured with: ./configure --prefix=/usr/nekoware --enable-version-specific-runtime-libs --disable-shared --enable-threads --enable-haifa --enable-libgcj --with-included-gettext
Thread model: single
gcc version 3.4.6
/usr/nekoware/libexec/gcc/mips-sgi-irix6.5/3.4.6/collect2 -call_shared -no_unresolved -init __do_global_ctors -fini __do_global_dtors -_SYSTYPE_SVR4 -woff 131 -n32 -o dgen /usr/lib32/mips3/crt1.o /usr/nekoware/lib/gcc/mips-sgi-irix6.5/3.4.6/crtbegin.o -L/usr/nekoware/lib -L/usr/nekoware/lib/gcc/mips-sgi-irix6.5/3.4.6 -L/usr/bin -L/usr/nekoware/lib/gcc/mips-sgi-irix6.5/3.4.6/../../.. rc.o romload.o md.o mdfr.o decode.o vdp.o save.o graph.o fm.o myfm.o sn76496.o ras.o main.o mem.o ckvp.o joystick.o system.o cz80.o sdl/libpd.a musa/libmusa68.a mz80/libmz80.a -lGL -rpath /usr/nekoware/lib -lSDL -lpthread -lstdc++ -lm -dont_warn_unused -lgcc -warn_unused -L/usr/lib32/mips3 -L/usr/lib32 -dont_warn_unused -lc -warn_unused -dont_warn_unused -lgcc -warn_unused /usr/nekoware/lib/gcc/mips-sgi-irix6.5/3.4.6/crtend.o /usr/lib32/mips3/crtn.o
ld32: WARNING 84 : /usr/lib32/libGL.so is not used for resolving any symbol.
ld32: WARNING 127: Two shared objects with the same soname, /usr/lib32/mips3/libm.so and /usr/lib32/libm.so, have been been linked. This is probably due to a missing -L specification. Ignoring the latter.
ld32: WARNING 127: Two shared objects with the same soname, /usr/lib32/mips3/libm.so and /usr/lib32/libm.so, have been been linked. This is probably due to a missing -L specification. Ignoring the latter.
I would think that if this is SDL using OpenGL, I would want to have "/usr/lib32/libGL.so" used? Does this error message mean the program is not using the native hardware openGL support?
Maybe dgen does not use OpenGL/GL directly but indirectly through SDL (which in turn has been compiled and linked against OpenGL/GL).
You can check with the ldd command:
# ldd dgen
... should output libSDL at some entry ...
# ldd libSDL.so
... should output libGL at some entry if compiled/linked against it ...
Regards,
Tru