English Amiga Board

English Amiga Board (https://eab.abime.net/index.php)
-   Coders. C/C++ (https://eab.abime.net/forumdisplay.php?f=118)
-   -   WarpOS version of SDL (https://eab.abime.net/showthread.php?t=88760)

emufan 30 September 2017 14:51

Quote:

Originally Posted by grelbfarlk (Post 1188716)
I use -lSDL_wos or -LlibSDL_wos.a same difference. -lauto and -lAuto are not found.

put libSDL_wos.a in the source folder and dont use -l (CFLAGS),
-L gives path to lib folder only (LDFLAGS), remove that too.

ppc-amigaos-g++ -warpup sdltest2.cpp libSDL-wos.a -o sdltest801.elf

since ppc-amigaos-g++ is also the linker, it 1st build sdltest2.o,
searching for unresolved things and then uses libSDL-wos.a to fillin what is missing in sdltest2.o.
with the wrong order, it may ignore all from libSDL-wos.a, so functions are missing when it goes to sdltest2.o

so the link libs must be placed always at the end of the link object chain.
it's easier when you have a working makefile:
Code:

LD = ppc-amigaos-g++
LDOPTS = -warpos
OBJECTS = sdltest2.o
LIBS = libSDL-wos.a
$(LD) $(LDOPTS) $(OBJECTS) -o sdltest801.elf $(LIBS)

instead of -lauto, try -lamiga , not really sure.

#2) not sure about correct path, but is there anything usefull in:
ppc-gcc-2.95.3-base/ppc-amigaos/lib/ ?

with the 68k toolchain i have something like this, for example:
/opt/m68k-amigaos/m68k-amigaos/libnix/lib/libamiga.a

which could be linked in with -lamiga . maybe automaticaly invoced by -noixemul or such options.
dunno exactly the mechanism.

grelbfarlk 30 September 2017 15:14

Quote:

Originally Posted by emufan (Post 1188718)
put libSDL_wos.a in the source folder and dont use -l (CFLAGS),
-L gives path to lib folder only (LDFLAGS), remove that too.

ppc-amigaos-g++ -warpup sdltest2.cpp libSDL-wos.a -o sdltest801.elf

since ppc-amigaos-g++ is also the linker, it 1st build sdltest2.o,
searching for unresolved things and then uses libSDL-wos.a to fillin what is missing in sdltest2.o.
with the wrong order, it may ignore all from libSDL-wos.a, so functions are missing when it goes to sdltest2.o

so the link libs must be placed always at the end of the link object chain.
it's easier when you have a working makefile:
Code:

LD = ppc-amigaos-g++
LDOPTS = -warpos
OBJECTS = sdltest2.o
LIBS = libSDL-wos.a
$(LD) $(LDOPTS) $(OBJECTS) -o sdltest801.elf $(LIBS)

instead of -lauto, try -lamiga , not really sure.

That gives the same longer set of undefined symbols, which might mean that it is linking to the SDL_wos but those are problems in the library itself?

I'll try making a makefile.

ppc-amigaos/lib has:
sdlppc.lib 248692 ----rwed 16-Sep-17 16:38:38
libSDL_wos.a 328396 ----rw-d Yesterday 19:07:47
end.o 874 ----rwed 18-Sep-16 20:26:41
libc.a 241952 ----rwed 18-Sep-16 20:26:41
libcwos.a 249608 ----rwed 18-Sep-16 20:26:41
libm.a 37510 ----rwed 18-Sep-16 20:26:41
libppcamiga.a 21378 ----rwed 18-Sep-16 20:26:41
startup.o 3336 ----rwed 18-Sep-16 20:26:41
startupwos.o 3140 ----rwed 18-Sep-16 20:26:41
libiberty.a 123492 ----rw-d 18-Sep-16 20:26:42
libstdc++.a.2.10.0 853292 ----rw-d 18-Sep-16 20:26:42
ldscripts Dir ----rwed 21-Sep-16 06:48:50
libdllppc.a 11084 ----rw-d 23-Sep-16 18:50:58

emufan 30 September 2017 15:25

read this from 2003:
Code:

I compiled some static unix libraries for the PPC processor but the programs
compiled with these libraries won't be changed to WarpOS format with the
Elf2exe util.
...
 Error: Undefined Symbol: PPCCallOS
...

Elf2exe was mentioned the other day, cannot remember extacly.
does it mean you have to convert the *.o with Elf2exe to make it a finished build?

#1) you can try to find for example the PPCCallOS:
nm -l libppcamiga.a | grep PPCCallOS
if it's included try add to LDFLAGS -lppcamiga

to make it even more weird: while reading i found WarpUP mentioned.
is this the same as WarpOS ?! :D

grelbfarlk 30 September 2017 15:37

Quote:

Originally Posted by emufan (Post 1188723)
read this from 2003:
Code:

I compiled some static unix libraries for the PPC processor but the programs
compiled with these libraries won't be changed to WarpOS format with the
Elf2exe util.
...
 Error: Undefined Symbol: PPCCallOS
...

Elf2exe was mentioned the other day, cannot remember extacly.
does it mean you have to convert the *.o with Elf2exe to make it a finished build?

Yeah so the compiler uses warpcollect2 during linking then dumps out an .elf file which elf2exe2 converts to hunk format. I ah... didn't think to run elf2exe2 on the lib and I don't remember if it did.

I'm pretty sure it did run it on it, elf2exe2 on a different file that was run on it gives the same output:
8.Ram Disk:> elf2exe2 gameppc.dll gameppc.exe
Error: Wrong magic number in ELF-header !
Error: Error processing Elffile !

8.Ram Disk:> elf2exe2 libSDL_wos.a libSDL_wos.lib
Error: Wrong magic number in ELF-header !
Error: Error processing Elffile !

The different naming between WarpUP and WarpOS screws me up all the time.

PPCCallOS isn't in libppcamiga.a

emufan 30 September 2017 15:45

Quote:

Originally Posted by grelbfarlk (Post 1188725)
Yeah so the compiler uses warpcollect2 during linking then dumps out an .elf file which elf2exe2 converts to hunk format. I ah... didn't think to run elf2exe2 on the lib and I don't remember if it did.

ah, ok. there is not much info available, unfortunately.

#1) StormC4 is still being sold and supported product. too bad.
they also offer the gnu source code of StormC4 i just zoned.

emufan 30 September 2017 15:56

Quote:

Originally Posted by grelbfarlk (Post 1188725)
The different naming between WarpUP and WarpOS screws me up all the time.

PPCCallOS isn't in libppcamiga.a

hmm, you may try the other *.a in the lib folder.
there must be something what provides this function, and all the others you have to link with.

#1) those .a are some sort of "special" archive. which hold those *.o objects files of a project.
each of those *.o , or .wo files holds a fucntion, can be extracted, manipulated with objdump.
eg: objdump.exe -f libSDL_wos.a

#2) objdump.exe -a libSDL_wos.a | grep -i flip
--> no result, same for init *hmmm*

others are listed:
Code:

$ objdump.exe -a libSDL_wos.a | grep -i cgx
SDL_cgxvideo.wo:    file format elf32-big
rw-r--r-- 65534/65534  17192 Sep 29 00:06 2017 SDL_cgxvideo.wo
SDL_cgxaccel.wo:    file format elf32-big
rw-r--r-- 65534/65534  3684 Sep 29 00:06 2017 SDL_cgxaccel.wo
SDL_cgxgl_wrapper.wo:    file format elf32-big
rw-r--r-- 65534/65534    612 Sep 29 00:06 2017 SDL_cgxgl_wrapper.wo

Code:

$ objdump.exe -s libSDL_wos.a | grep -i flip


$ objdump.exe -s libSDL_wos.a | grep -i cgx
SDL_cgxvideo.wo:    file format elf32-big
 0080 43475800 696e7475 6974696f 6e2e6c69  CGX.intuition.li
 0160 74656420 43475820 64697370 6c617900  ted CGX display.
SDL_cgxmodes.wo:    file format elf32-big
SDL_cgximage.wo:    file format elf32-big
SDL_cgxgl.wo:    file format elf32-big
SDL_cgxwm.wo:    file format elf32-big
SDL_cgxyuv.wo:    file format elf32-big
SDL_cgxaccel.wo:    file format elf32-big
SDL_cgxgl_wrapper.wo:    file format elf32-big

take a look to the sdl source tree, you build yesterday,
is there a SDL_Flip.wo in the objects or src folder?

grelbfarlk 30 September 2017 15:58

Quote:

Originally Posted by emufan (Post 1188730)
hmm, you may try the other *.a in the lib folder.
there must be something what provides this function, and all the others you have to link with.

PPCCallOS is found in libc.a and startupwos.o the latter I think is included by the -warpup flag.

Thinking maybe I botched something in compiling the orignal lib here's the output of the make:

Code:

9.Gorkbench:ADE/SDL-AmigaSrc> make libSDL_wos.a -B
ppc-amigaos-gcc -warpup -O2 -fomit-frame-pointer -mcpu=750 -mmultiple -DENABLE_CYBERGRAPHICS -DENABLE_AHI -DNO_SIGNAL_H -DWARPOS -DNO_AMIGADEBUG -o SDL_error.wo -c SDL_error.c
ppc-amigaos-gcc -warpup -O2 -fomit-frame-pointer -mcpu=750 -mmultiple -DENABLE_CYBERGRAPHICS -DENABLE_AHI -DNO_SIGNAL_H -DWARPOS -DNO_AMIGADEBUG -o SDL_fatal.wo -c SDL_fatal.c
ppc-amigaos-gcc -warpup -O2 -fomit-frame-pointer -mcpu=750 -mmultiple -DENABLE_CYBERGRAPHICS -DENABLE_AHI -DNO_SIGNAL_H -DWARPOS -DNO_AMIGADEBUG -o SDL_RLEaccel.wo -c SDL_RLEaccel.c
ppc-amigaos-gcc -warpup -O2 -fomit-frame-pointer -mcpu=750 -mmultiple -DENABLE_CYBERGRAPHICS -DENABLE_AHI -DNO_SIGNAL_H -DWARPOS -DNO_AMIGADEBUG -o SDL_blit.wo -c SDL_blit.c
ppc-amigaos-gcc -warpup -O2 -fomit-frame-pointer -mcpu=750 -mmultiple -DENABLE_CYBERGRAPHICS -DENABLE_AHI -DNO_SIGNAL_H -DWARPOS -DNO_AMIGADEBUG -o SDL_blit_0.wo -c SDL_blit_0.c
ppc-amigaos-gcc -warpup -O2 -fomit-frame-pointer -mcpu=750 -mmultiple -DENABLE_CYBERGRAPHICS -DENABLE_AHI -DNO_SIGNAL_H -DWARPOS -DNO_AMIGADEBUG -o SDL_blit_1.wo -c SDL_blit_1.c
ppc-amigaos-gcc -warpup -O2 -fomit-frame-pointer -mcpu=750 -mmultiple -DENABLE_CYBERGRAPHICS -DENABLE_AHI -DNO_SIGNAL_H -DWARPOS -DNO_AMIGADEBUG -o SDL_blit_A.wo -c SDL_blit_A.c
ppc-amigaos-gcc -warpup -O2 -fomit-frame-pointer -mcpu=750 -mmultiple -DENABLE_CYBERGRAPHICS -DENABLE_AHI -DNO_SIGNAL_H -DWARPOS -DNO_AMIGADEBUG -o SDL_blit_N.wo -c SDL_blit_N.c
ppc-amigaos-gcc -warpup -O2 -fomit-frame-pointer -mcpu=750 -mmultiple -DENABLE_CYBERGRAPHICS -DENABLE_AHI -DNO_SIGNAL_H -DWARPOS -DNO_AMIGADEBUG -o SDL_bmp.wo -c SDL_bmp.c
ppc-amigaos-gcc -warpup -O2 -fomit-frame-pointer -mcpu=750 -mmultiple -DENABLE_CYBERGRAPHICS -DENABLE_AHI -DNO_SIGNAL_H -DWARPOS -DNO_AMIGADEBUG -o SDL_cursor.wo -c SDL_cursor.c
ppc-amigaos-gcc -warpup -O2 -fomit-frame-pointer -mcpu=750 -mmultiple -DENABLE_CYBERGRAPHICS -DENABLE_AHI -DNO_SIGNAL_H -DWARPOS -DNO_AMIGADEBUG -o SDL_pixels.wo -c SDL_pixels.c
ppc-amigaos-gcc -warpup -O2 -fomit-frame-pointer -mcpu=750 -mmultiple -DENABLE_CYBERGRAPHICS -DENABLE_AHI -DNO_SIGNAL_H -DWARPOS -DNO_AMIGADEBUG -o SDL_surface.wo -c SDL_surface.c
ppc-amigaos-gcc -warpup -O2 -fomit-frame-pointer -mcpu=750 -mmultiple -DENABLE_CYBERGRAPHICS -DENABLE_AHI -DNO_SIGNAL_H -DWARPOS -DNO_AMIGADEBUG -o SDL_stretch.wo -c SDL_stretch.c
ppc-amigaos-gcc -warpup -O2 -fomit-frame-pointer -mcpu=750 -mmultiple -DENABLE_CYBERGRAPHICS -DENABLE_AHI -DNO_SIGNAL_H -DWARPOS -DNO_AMIGADEBUG -o SDL_yuv.wo -c SDL_yuv.c
ppc-amigaos-gcc -warpup -O2 -fomit-frame-pointer -mcpu=750 -mmultiple -DENABLE_CYBERGRAPHICS -DENABLE_AHI -DNO_SIGNAL_H -DWARPOS -DNO_AMIGADEBUG -o SDL_yuv_sw.wo -c SDL_yuv_sw.c
ppc-amigaos-gcc -warpup -O2 -fomit-frame-pointer -mcpu=750 -mmultiple -DENABLE_CYBERGRAPHICS -DENABLE_AHI -DNO_SIGNAL_H -DWARPOS -DNO_AMIGADEBUG -o SDL_yuv_mmx.wo -c SDL_yuv_mmx.c
ppc-amigaos-gcc -warpup -O2 -fomit-frame-pointer -mcpu=750 -mmultiple -DENABLE_CYBERGRAPHICS -DENABLE_AHI -DNO_SIGNAL_H -DWARPOS -DNO_AMIGADEBUG -o SDL_video.wo -c SDL_video.c
ppc-amigaos-gcc -warpup -O2 -fomit-frame-pointer -mcpu=750 -mmultiple -DENABLE_CYBERGRAPHICS -DENABLE_AHI -DNO_SIGNAL_H -DWARPOS -DNO_AMIGADEBUG -o SDL_audio.wo -c SDL_audio.c
ppc-amigaos-gcc -warpup -O2 -fomit-frame-pointer -mcpu=750 -mmultiple -DENABLE_CYBERGRAPHICS -DENABLE_AHI -DNO_SIGNAL_H -DWARPOS -DNO_AMIGADEBUG -o SDL_audiocvt.wo -c SDL_audiocvt.c
ppc-amigaos-gcc -warpup -O2 -fomit-frame-pointer -mcpu=750 -mmultiple -DENABLE_CYBERGRAPHICS -DENABLE_AHI -DNO_SIGNAL_H -DWARPOS -DNO_AMIGADEBUG -o SDL_audiomem.wo -c SDL_audiomem.c
ppc-amigaos-gcc -warpup -O2 -fomit-frame-pointer -mcpu=750 -mmultiple -DENABLE_CYBERGRAPHICS -DENABLE_AHI -DNO_SIGNAL_H -DWARPOS -DNO_AMIGADEBUG -o SDL_mixer.wo -c SDL_mixer.c
ppc-amigaos-gcc -warpup -O2 -fomit-frame-pointer -mcpu=750 -mmultiple -DENABLE_CYBERGRAPHICS -DENABLE_AHI -DNO_SIGNAL_H -DWARPOS -DNO_AMIGADEBUG -o SDL_wave.wo -c SDL_wave.c
ppc-amigaos-gcc -warpup -O2 -fomit-frame-pointer -mcpu=750 -mmultiple -DENABLE_CYBERGRAPHICS -DENABLE_AHI -DNO_SIGNAL_H -DWARPOS -DNO_AMIGADEBUG -o SDL_ahiaudio.wo -c SDL_ahiaudio.c
ppc-amigaos-gcc -warpup -O2 -fomit-frame-pointer -mcpu=750 -mmultiple -DENABLE_CYBERGRAPHICS -DENABLE_AHI -DNO_SIGNAL_H -DWARPOS -DNO_AMIGADEBUG -o SDL_systimer.wo -c SDL_systimer.c
ppc-amigaos-gcc -warpup -O2 -fomit-frame-pointer -mcpu=750 -mmultiple -DENABLE_CYBERGRAPHICS -DENABLE_AHI -DNO_SIGNAL_H -DWARPOS -DNO_AMIGADEBUG -o SDL_timer.wo -c SDL_timer.c
ppc-amigaos-gcc -warpup -O2 -fomit-frame-pointer -mcpu=750 -mmultiple -DENABLE_CYBERGRAPHICS -DENABLE_AHI -DNO_SIGNAL_H -DWARPOS -DNO_AMIGADEBUG -o SDL_joystick.wo -c SDL_joystick.c
ppc-amigaos-gcc -warpup -O2 -fomit-frame-pointer -mcpu=750 -mmultiple -DENABLE_CYBERGRAPHICS -DENABLE_AHI -DNO_SIGNAL_H -DWARPOS -DNO_AMIGADEBUG -o SDL_sysjoystick.wo -c SDL_sysjoystick.c
ppc-amigaos-gcc -warpup -O2 -fomit-frame-pointer -mcpu=750 -mmultiple -DENABLE_CYBERGRAPHICS -DENABLE_AHI -DNO_SIGNAL_H -DWARPOS -DNO_AMIGADEBUG -o SDL_cdrom.wo -c SDL_cdrom.c
ppc-amigaos-gcc -warpup -O2 -fomit-frame-pointer -mcpu=750 -mmultiple -DENABLE_CYBERGRAPHICS -DENABLE_AHI -DNO_SIGNAL_H -DWARPOS -DNO_AMIGADEBUG -o SDL_syscdrom.wo -c SDL_syscdrom.c
ppc-amigaos-gcc -warpup -O2 -fomit-frame-pointer -mcpu=750 -mmultiple -DENABLE_CYBERGRAPHICS -DENABLE_AHI -DNO_SIGNAL_H -DWARPOS -DNO_AMIGADEBUG -o SDL_quit.wo -c SDL_quit.c
ppc-amigaos-gcc -warpup -O2 -fomit-frame-pointer -mcpu=750 -mmultiple -DENABLE_CYBERGRAPHICS -DENABLE_AHI -DNO_SIGNAL_H -DWARPOS -DNO_AMIGADEBUG -o SDL_active.wo -c SDL_active.c
ppc-amigaos-gcc -warpup -O2 -fomit-frame-pointer -mcpu=750 -mmultiple -DENABLE_CYBERGRAPHICS -DENABLE_AHI -DNO_SIGNAL_H -DWARPOS -DNO_AMIGADEBUG -o SDL_keyboard.wo -c SDL_keyboard.c
ppc-amigaos-gcc -warpup -O2 -fomit-frame-pointer -mcpu=750 -mmultiple -DENABLE_CYBERGRAPHICS -DENABLE_AHI -DNO_SIGNAL_H -DWARPOS -DNO_AMIGADEBUG -o SDL_mouse.wo -c SDL_mouse.c
ppc-amigaos-gcc -warpup -O2 -fomit-frame-pointer -mcpu=750 -mmultiple -DENABLE_CYBERGRAPHICS -DENABLE_AHI -DNO_SIGNAL_H -DWARPOS -DNO_AMIGADEBUG -o SDL_resize.wo -c SDL_resize.c
ppc-amigaos-gcc -warpup -O2 -fomit-frame-pointer -mcpu=750 -mmultiple -DENABLE_CYBERGRAPHICS -DENABLE_AHI -DNO_SIGNAL_H -DWARPOS -DNO_AMIGADEBUG -o SDL_rwops.wo -c SDL_rwops.c
ppc-amigaos-gcc -warpup -O2 -fomit-frame-pointer -mcpu=750 -mmultiple -DENABLE_CYBERGRAPHICS -DENABLE_AHI -DNO_SIGNAL_H -DWARPOS -DNO_AMIGADEBUG -o SDL_endian.wo -c SDL_endian.c
ppc-amigaos-gcc -warpup -O2 -fomit-frame-pointer -mcpu=750 -mmultiple -DENABLE_CYBERGRAPHICS -DENABLE_AHI -DNO_SIGNAL_H -DWARPOS -DNO_AMIGADEBUG -o SDL.wo -c SDL.c
ppc-amigaos-gcc -warpup -O2 -fomit-frame-pointer -mcpu=750 -mmultiple -DENABLE_CYBERGRAPHICS -DENABLE_AHI -DNO_SIGNAL_H -DWARPOS -DNO_AMIGADEBUG -o SDL_events.wo -c SDL_events.c
ppc-amigaos-gcc -warpup -O2 -fomit-frame-pointer -mcpu=750 -mmultiple -DENABLE_CYBERGRAPHICS -DENABLE_AHI -DNO_SIGNAL_H -DWARPOS -DNO_AMIGADEBUG -o SDL_sysmutex.wo -c SDL_sysmutex.c
ppc-amigaos-gcc -warpup -O2 -fomit-frame-pointer -mcpu=750 -mmultiple -DENABLE_CYBERGRAPHICS -DENABLE_AHI -DNO_SIGNAL_H -DWARPOS -DNO_AMIGADEBUG -o SDL_syssem.wo -c SDL_syssem.c
ppc-amigaos-gcc -warpup -O2 -fomit-frame-pointer -mcpu=750 -mmultiple -DENABLE_CYBERGRAPHICS -DENABLE_AHI -DNO_SIGNAL_H -DWARPOS -DNO_AMIGADEBUG -o SDL_systhread.wo -c SDL_systhread.c
ppc-amigaos-gcc -warpup -O2 -fomit-frame-pointer -mcpu=750 -mmultiple -DENABLE_CYBERGRAPHICS -DENABLE_AHI -DNO_SIGNAL_H -DWARPOS -DNO_AMIGADEBUG -o SDL_thread.wo -c SDL_thread.c
ppc-amigaos-gcc -warpup -O2 -fomit-frame-pointer -mcpu=750 -mmultiple -DENABLE_CYBERGRAPHICS -DENABLE_AHI -DNO_SIGNAL_H -DWARPOS -DNO_AMIGADEBUG -o SDL_syscond.wo -c SDL_syscond.c
ppc-amigaos-gcc -warpup -O2 -fomit-frame-pointer -mcpu=750 -mmultiple -DENABLE_CYBERGRAPHICS -DENABLE_AHI -DNO_SIGNAL_H -DWARPOS -DNO_AMIGADEBUG -o SDL_cgxvideo.wo -c SDL_cgxvideo.c
SDL_cgxvideo.c: In function `CGX_CreateDevice':
SDL_cgxvideo.c:251: warning: assignment from incompatible pointer type
SDL_cgxvideo.c: In function `CGX_VideoInit':
SDL_cgxvideo.c:595: warning: passing arg 5 of `GetDisplayInfoData' makes integer from pointer without a cast
SDL_cgxvideo.c: In function `CGX_CreateWindow':
SDL_cgxvideo.c:738: warning: passing arg 5 of `GetDisplayInfoData' makes integer from pointer without a cast
ppc-amigaos-gcc -warpup -O2 -fomit-frame-pointer -mcpu=750 -mmultiple -DENABLE_CYBERGRAPHICS -DENABLE_AHI -DNO_SIGNAL_H -DWARPOS -DNO_AMIGADEBUG -o SDL_cgxmodes.wo -c SDL_cgxmodes.c
SDL_cgxmodes.c: In function `CGX_GetVideoModes':
SDL_cgxmodes.c:133: warning: passing arg 5 of `GetDisplayInfoData' makes integer from pointer without a cast
ppc-amigaos-gcc -warpup -O2 -fomit-frame-pointer -mcpu=750 -mmultiple -DENABLE_CYBERGRAPHICS -DENABLE_AHI -DNO_SIGNAL_H -DWARPOS -DNO_AMIGADEBUG -o SDL_cgximage.wo -c SDL_cgximage.c
ppc-amigaos-gcc -warpup -O2 -fomit-frame-pointer -mcpu=750 -mmultiple -DENABLE_CYBERGRAPHICS -DENABLE_AHI -DNO_SIGNAL_H -DWARPOS -DNO_AMIGADEBUG -o SDL_amigaevents.wo -c SDL_amigaevents.c
ppc-amigaos-gcc -warpup -O2 -fomit-frame-pointer -mcpu=750 -mmultiple -DENABLE_CYBERGRAPHICS -DENABLE_AHI -DNO_SIGNAL_H -DWARPOS -DNO_AMIGADEBUG -o SDL_amigamouse.wo -c SDL_amigamouse.c
ppc-amigaos-gcc -warpup -O2 -fomit-frame-pointer -mcpu=750 -mmultiple -DENABLE_CYBERGRAPHICS -DENABLE_AHI -DNO_SIGNAL_H -DWARPOS -DNO_AMIGADEBUG -o SDL_cgxgl.wo -c SDL_cgxgl.c
ppc-amigaos-gcc -warpup -O2 -fomit-frame-pointer -mcpu=750 -mmultiple -DENABLE_CYBERGRAPHICS -DENABLE_AHI -DNO_SIGNAL_H -DWARPOS -DNO_AMIGADEBUG -o SDL_cgxwm.wo -c SDL_cgxwm.c
ppc-amigaos-gcc -warpup -O2 -fomit-frame-pointer -mcpu=750 -mmultiple -DENABLE_CYBERGRAPHICS -DENABLE_AHI -DNO_SIGNAL_H -DWARPOS -DNO_AMIGADEBUG -o SDL_cgxyuv.wo -c SDL_cgxyuv.c
ppc-amigaos-gcc -warpup -O2 -fomit-frame-pointer -mcpu=750 -mmultiple -DENABLE_CYBERGRAPHICS -DENABLE_AHI -DNO_SIGNAL_H -DWARPOS -DNO_AMIGADEBUG -o SDL_cgxaccel.wo -c SDL_cgxaccel.c
ppc-amigaos-gcc -warpup -O2 -fomit-frame-pointer -mcpu=750 -mmultiple -DENABLE_CYBERGRAPHICS -DENABLE_AHI -DNO_SIGNAL_H -DWARPOS -DNO_AMIGADEBUG -o SDL_cgxgl_wrapper.wo -c SDL_cgxgl_wrapper.c
ppc-amigaos-gcc -warpup -O2 -fomit-frame-pointer -mcpu=750 -mmultiple -DENABLE_CYBERGRAPHICS -DENABLE_AHI -DNO_SIGNAL_H -DWARPOS -DNO_AMIGADEBUG -o SDL_gamma.wo -c SDL_gamma.c
rm -f lib/libSDL_wos.a
ppc-amigaos-ar cru libSDL_wos.a SDL_error.wo SDL_fatal.wo SDL_RLEaccel.wo SDL_blit.wo SDL_blit_0.wo SDL_blit_1.wo SDL_blit_A.wo SDL_blit_N.wo SDL_bmp.wo SDL_cursor.wo SDL_pixels.wo SDL_surface.wo SDL_stretch.wo SDL_yuv.wo SDL_yuv_sw.wo SDL_yuv_mmx.wo SDL_video.wo SDL_audio.wo SDL_audiocvt.wo SDL_audiomem.wo SDL_mixer.wo SDL_wave.wo SDL_ahiaudio.wo SDL_systimer.wo SDL_timer.wo SDL_joystick.wo SDL_sysjoystick.wo SDL_cdrom.wo SDL_syscdrom.wo SDL_quit.wo SDL_active.wo SDL_keyboard.wo SDL_mouse.wo SDL_resize.wo SDL_rwops.wo SDL_endian.wo SDL.wo SDL_events.wo SDL_sysmutex.wo SDL_syssem.wo SDL_systhread.wo SDL_thread.wo SDL_syscond.wo SDL_cgxvideo.wo SDL_cgxmodes.wo SDL_cgximage.wo SDL_amigaevents.wo SDL_amigamouse.wo SDL_cgxgl.wo SDL_cgxwm.wo SDL_cgxyuv.wo SDL_cgxaccel.wo SDL_cgxgl_wrapper.wo SDL_gamma.wo
ppc-amigaos-ranlib libSDL_wos.a


emufan 30 September 2017 16:12

Quote:

Originally Posted by grelbfarlk (Post 1188733)
ppc-amigaos-ar cru libSDL_wos.a SDL_error.wo SDL_fatal.wo SDL_RLEaccel.wo SDL_blit.wo SDL_blit_0.wo SDL_blit_1.wo SDL_blit_A.wo SDL_blit_N.wo SDL_bmp.wo SDL_cursor.wo SDL_pixels.wo SDL_surface.wo ....[/CODE]

no SDL_Init.wo, SDL_Flip.wo so the build of the libsdl is not correct. i would say.?!
or it's a function in one of those .wo ? *i'm confused*

#2) Flip is in SDL_Video.wo:
Code:

$ ar -x libSDL_wos.a // produces *.wo
$ grep Flip  *.wo
Binary file SDL_cgximage.wo matches
Binary file SDL_cgxvideo.wo matches
Binary file SDL_video.wo matches

#2) you may try:
Code:

ppc-amigaos-g++ -warpup sdltest2.cpp SDL_video.wo SDL_cgxvideo.wo \
SDL_cgximage.wo -o sdltest801.elf

this way the SDL_Flip error should vanish. or something is wrong with the whole build.

Cowcat 30 September 2017 16:13

elf2exe2/warpcollect is not needed if using latest gcc stuff.

Do a simple intuition window open/close mini program. :bash
Start with the 68k version, then warpos.

Show the assembly output (-S) -o whatever.asm. See the uglyness :evilgrin

I have some of those done in some place. A simple "hello word!" works, an intuition warpos program got in a loop waiting.

I compiled the minigl lib+demos, but only got a grey screen.

If someone could figure out how to redo the whole gcc/g++ binaries for warpos with latest includes something could be done.

By the way, it is possible to use the output gcc object files to work with vbcc vasm/vlink.?
Maybe some serious editing of the raw text assembly could be later used for a proper bin.

emufan 30 September 2017 16:38

Quote:

Originally Posted by Cowcat (Post 1188737)
If someone could figure out how to redo the whole gcc/g++ binaries for warpos with latest includes something could be done.

can we not just try to compile the stormc4 sources?
Code:

cd stormc4_gnu_sources/gcc/src
CC="ppc-amigaos-gcc" CFLAGS="-warpup" ./configure
...

or maybe with vbcc and target warpos/warpup ?

grelbfarlk 30 September 2017 16:40

Quote:

Originally Posted by emufan (Post 1188736)
no SDL_Init.wo, SDL_Flip.wo so the build of the libsdl is not correct. i would say.?!
or it's a function in one of those .wo ? *i'm confused*

#2) Flip is in SDL_Video.wo:
Code:

$ ar -x libSDL_wos.a // produces *.wo
$ grep Flip  *.wo
Binary file SDL_cgximage.wo matches
Binary file SDL_cgxvideo.wo matches
Binary file SDL_video.wo matches

#2) you may try:
Code:

ppc-amigaos-g++ -warpup sdltest2.cpp SDL_video.wo SDL_cgxvideo.wo \
SDL_cgximage.wo -o sdltest801.elf

this way the SDL_Flip error should vanish. or something is wrong with the whole build.

ppc-amigaos-g++ -warpup sdltest2.cpp SDL_video.wo SDL_cgxvideo.wo \
SDL_cgximage.wo -o sdltest801.elf
Gives me:

Code:

Error: Undefined Symbol: CGX_LeaveFullScreen
Error: Undefined Symbol: ChangeScreenBuffer
Error: Undefined Symbol: CGX_GL_Quit
Error: Undefined Symbol: SDL_LowerBlit
Error: Undefined Symbol: SDL_ResetKeyboard
Error: Undefined Symbol: SDL_GetRelativeMouseState
Error: Undefined Symbol: SDL_SetCursor
Error: Undefined Symbol: OpenScreenTags
Error: Undefined Symbol: ChangeWindowBox
Error: Undefined Symbol: SDL_PrivateResize
Error: Undefined Symbol: SDL_LoadBMP_RW
Error: Undefined Symbol: SDL_Quit
Error: Undefined Symbol: SDL_RWFromFile
Error: Undefined Symbol: SDL_MapRGB
Error: Undefined Symbol: SDL_ConvertSurface
Error: Undefined Symbol: SDL_CursorPaletteChanged
Error: Undefined Symbol: amiga_WarpWMCursor
Error: Undefined Symbol: FreeScreenBuffer
Error: Undefined Symbol: SDL_StartEventLoop
Error: Undefined Symbol: SDL_PrivateMouseMotion
Error: Undefined Symbol: SDL_EventThreadID
Error: Undefined Symbol: SDL_Delay
Error: Undefined Symbol: SDL_CreateRGBSurface
Error: Undefined Symbol: OpenWindowTags
Error: Undefined Symbol: UnlockPubScreen
Error: Undefined Symbol: ReleasePen
Error: Undefined Symbol: SDL_Lock_EventThread
Error: Undefined Symbol: amiga_InitOSKeymap
Error: Undefined Symbol: SDL_UpperBlit
Error: Undefined Symbol: SDL_StopEventLoop
Error: Undefined Symbol: CGX_GL_Update
Error: Undefined Symbol: SDL_Error
Error: Undefined Symbol: CGX_FreeVideoModes
Error: Undefined Symbol: DeleteMsgPort
Error: Undefined Symbol: SDL_cursorlock
Error: Undefined Symbol: AllocMem
Error: Undefined Symbol: SDL_AllocFormat
Error: Undefined Symbol: SDL_FormatChanged
Error: Undefined Symbol: GetMsg
Error: Undefined Symbol: CloseWindow
Error: Undefined Symbol: CreateMsgPort
Error: Undefined Symbol: SDL_Unlock_EventThread
Error: Undefined Symbol: LockPubScreen
Error: Undefined Symbol: Wait
Error: Undefined Symbol: PPCCallOS
Error: Undefined Symbol: amiga_CheckMouseMode
Error: Undefined Symbol: amiga_FreeWMCursor
Error: Undefined Symbol: amiga_ShowWMCursor
Error: Undefined Symbol: CGX_ListModes
Error: Undefined Symbol: CGX_GL_Init
Error: Undefined Symbol: CGX_GetVideoModes
Error: Undefined Symbol: CGX_GetWMInfo
Error: Undefined Symbol: CGX_SetIcon
Error: Undefined Symbol: SDL_CursorQuit
Error: Undefined Symbol: AllocScreenBuffer
Error: Undefined Symbol: SDL_cursorstate
Error: Undefined Symbol: SDL_Init
Error: Undefined Symbol: SDL_CursorInit
Error: Undefined Symbol: SDL_ThreadID
Error: Undefined Symbol: SDL_FillRect
Error: Undefined Symbol: SDL_FreeSurface
Error: Undefined Symbol: SDL_PrivateAppActive
Error: Undefined Symbol: SDL_InvalidateMap
Error: Undefined Symbol: SDL_CalculatePitch
Error: Undefined Symbol: CGX_EnterFullScreen
Error: Undefined Symbol: AllocBitMap
Error: Undefined Symbol: OpenLibrary
Error: Undefined Symbol: CGX_SetHWColorKey
Error: Undefined Symbol: CGX_SetCaption
Error: Undefined Symbol: GetVPModeID
Error: Undefined Symbol: WindowLimits
Error: Undefined Symbol: SDL_EraseCursor
Error: Undefined Symbol: SDL_SetClipRect
Error: Undefined Symbol: FreeBitMap
Error: Undefined Symbol: CloseScreen
Error: Undefined Symbol: SDL_mutexV
Error: Undefined Symbol: SDL_mutexP
Error: Undefined Symbol: SDL_SetError
Error: Undefined Symbol: FindDisplayInfo
Error: Undefined Symbol: SDL_ReallocFormat
Error: Undefined Symbol: SDL_DrawCursor
Error: Undefined Symbol: LoadRGB32
Error: Undefined Symbol: SDL_DitherColors
Error: Undefined Symbol: InitRastPort
Error: Undefined Symbol: FreeMem
Error: Undefined Symbol: SDL_ResetMouse
Error: Undefined Symbol: SDL_ResetCursor
Error: Undefined Symbol: GetDisplayInfoData
Error: Undefined Symbol: amiga_PumpEvents
Error: Undefined Symbol: ObtainBestPenA
Error: Undefined Symbol: amiga_CreateWMCursor
Error: Undefined Symbol: CGX_FillHWRect
Error: Undefined Symbol: CloseLibrary
Error: Undefined Symbol: SDL_FreeFormat
Error: Undefined Symbol: SDL_ApplyGamma
Error: Undefined Symbol: CGX_CheckHWBlit
Error: Error processing Elffile !

By the way my stupid little test .cpp is:

Code:

/* Include SDL functions and datatypes */
#include <SDL-Amigasrc/SDL.h>
#include <exec/exec.h>
#include <intuition/intuition.h>
#include <graphics/gfx.h>
#include <cybergraphx/cybergraphics.h>
#include <powerpc/powerpc_protos.h>
int main( int argc, char* args[] )
 {
 //The images
SDL_Surface* hello = NULL;
SDL_Surface* screen = NULL;

/* /Start SDL */
SDL_Init( SDL_INIT_VIDEO );
/* Set up screen */
screen = SDL_SetVideoMode( 640, 480, 32, SDL_SWSURFACE );
/* Load image */
hello = SDL_LoadBMP( "hello.bmp" );
/* Apply image to screen */
SDL_BlitSurface( hello, NULL, screen, NULL );
/* Update Screen  */
SDL_Flip( screen );
/* Pause  */
SDL_Delay( 2000 );
/* Free the loaded image  */
SDL_FreeSurface( hello );
/* Quit SDL */
SDL_Quit();
return 0;
}


emufan 30 September 2017 16:59

Quote:

Originally Posted by grelbfarlk (Post 1188743)
ppc-amigaos-g++ -warpup sdltest2.cpp SDL_video.wo SDL_cgxvideo.wo \
SDL_cgximage.wo -o sdltest801.elf
Gives me:

hmm, there is no SDL_Flip missing anymore?

not sure if it does work this way: put all *.wo from SDl build in same folder:
or move sdltest2.cpp into the sdl_src directory and cd to that folder which holds the *.wo files:
Code:

ppc-amigaos-g++ -warpup sdltest2.cpp *.wo -o sdltest801.elf
*removed*

grelbfarlk 30 September 2017 17:08

Quote:

Originally Posted by Cowcat (Post 1188737)
elf2exe2/warpcollect is not needed if using latest gcc stuff.

Do a simple intuition window open/close mini program. :bash
Start with the 68k version, then warpos.

Show the assembly output (-S) -o whatever.asm. See the uglyness :evilgrin

I have some of those done in some place. A simple "hello word!" works, an intuition warpos program got in a loop waiting.

I compiled the minigl lib+demos, but only got a grey screen.

If someone could figure out how to redo the whole gcc/g++ binaries for warpos with latest includes something could be done.

By the way, it is possible to use the output gcc object files to work with vbcc vasm/vlink.?
Maybe some serious editing of the raw text assembly could be later used for a proper bin.

Point me at a test.c and I'll try it. I have compiled those Q2 mods with this compiler so it does work on some very large things but there's no intuition stuff in there.

I would think that it's not possible to use this lib.a with VBCC since it's a different compiler and that but Hedeon laughed at my thrashing around and said he'd do the VBCC version.

grelbfarlk 30 September 2017 17:12

Quote:

Originally Posted by emufan (Post 1188742)
can we not just try to compile the stormc4 sources?
Code:

cd stormc4_gnu_sources/gcc/src
CC="ppc-amigaos-gcc" CFLAGS="-warpup" ./configure
...

or maybe with vbcc and target warpos/warpup ?

That's something else I was going to try, since stormC 4 uses GCC as the compiler, though there's also the option to use StormC 3 compiler.

Here's the whole -v output that shows warpcollect is trying to use all the .wo .

Code:

8.Gorkbench:ADE/SDL-AmigaSrc> ppc-amigaos-g++ -warpup sdltest2.cpp *.wo -lSDL_wos -lgcc -lc -lm -lamiga -v -o sdltest801.elf
Reading specs from /gg/lib/gcc-lib/ppc-amigaos/2.95.3/specs
gcc version 2.95.3 20010315 (release)
 /gg/lib/gcc-lib/ppc-amigaos/2.95.3/cpp0 -lang-c++ -v -D__GNUC__=2 -D__GNUG__=2 -D__GNUC_MINOR__=95 -D__cplusplus -DPPC -Damiga -Damigaos -DMCH_AMIGA -DAMIGA -D__PPC__ -D__amiga__ -D__amigaos__ -D__MCH_AMIGA__ -D__AMIGA__ -D__PPC -D__amiga -D__amigaos -D__MCH_AMIGA -D__AMIGA -Asystem(amigaos) -Acpu(powerpc) -Amachine(powerpc) -D__EXCEPTIONS -D__CHAR_UNSIGNED__ -I/ade/os-includeppc -D__PPC__ -D_CALL_SYSV -D_BIG_ENDIAN -Amachine(bigendian) -D_ARCH_PPC -DWARPUP sdltest2.cpp /t/ccPSpUhk.ii
GNU CPP version 2.95.3 20010315 (release) (PowerPC System V.4)
#include "..." search starts here:
#include <...> search starts here:
 /ade/os-includeppc
 /gg/lib/gcc-lib/ppc-amigaos/2.95.3/../../../../include/g++-3
 /gg/lib/gcc-lib/ppc-amigaos/2.95.3/include
 /gg/lib/gcc-lib/ppc-amigaos/2.95.3/../../../../ppc-amigaos/include
End of search list.
The following default directories have been omitted from the search path:
 /gg/lib/gcc-lib/ppc-amigaos/2.95.3/../../../../ppc-amigaos/sys-include
End of omitted list.
 /gg/ppc-amigaos/bin/cc1plus /t/ccPSpUhk.ii -quiet -dumpbase sdltest2.cc -version -o /t/ccOFkFMh.s
GNU C++ version 2.95.3 20010315 (release) (ppc-amigaos) compiled by GNU C version 2.95.3 20010315 (release).
 /gg/ppc-amigaos/bin/as -u -V -Qy -o /t/cc14D6Yl.o /t/ccOFkFMh.s
GNU assembler version 2.9.1 (ppc-amigaos), using BFD version 2.9.1
 /gg/lib/gcc-lib/ppc-amigaos/2.95.3/warpcollect -r -V -Qy -o sdltest801.elf /gg/ppc-amigaos/lib/startupwos.o -L/gg/lib/gcc-lib/ppc-amigaos/2.95.3 -L/gg/ppc-amigaos/lib -L/gg/lib -L/gg/lib -L/gg/lib /t/cc14D6Yl.o SDL.wo SDL_active.wo SDL_ahiaudio.wo SDL_amigaevents.wo SDL_amigamouse.wo SDL_audio.wo SDL_audiocvt.wo SDL_audiomem.wo SDL_blit.wo SDL_blit_0.wo SDL_blit_1.wo SDL_blit_A.wo SDL_blit_N.wo SDL_bmp.wo SDL_cdrom.wo SDL_cgxaccel.wo SDL_cgxgl.wo SDL_cgxgl_wrapper.wo SDL_cgximage.wo SDL_cgxmodes.wo SDL_cgxvideo.wo SDL_cgxwm.wo SDL_cgxyuv.wo SDL_cursor.wo SDL_endian.wo SDL_error.wo SDL_events.wo SDL_fatal.wo SDL_gamma.wo SDL_joystick.wo SDL_keyboard.wo SDL_mixer.wo SDL_mouse.wo SDL_pixels.wo SDL_quit.wo SDL_resize.wo SDL_RLEaccel.wo SDL_rwops.wo SDL_stretch.wo SDL_surface.wo SDL_syscdrom.wo SDL_syscond.wo SDL_sysjoystick.wo SDL_sysmutex.wo SDL_syssem.wo SDL_systhread.wo SDL_systimer.wo SDL_thread.wo SDL_timer.wo SDL_video.wo SDL_wave.wo SDL_yuv.wo SDL_yuv_mmx.wo SDL_yuv_sw.wo -lSDL_wos -lgcc -lamiga -lstdc++ -lm -lc -lgcc -lcwos /gg/ppc-amigaos/lib/end.o
GNU ld version 2.9.1 (with BFD 2.9.1)
  Supported emulations:
  elf32ppc
Error: Undefined Symbol: ChangeScreenBuffer
Error: Undefined Symbol: PPCClose
Error: Undefined Symbol: BltMaskBitMapRastPort
Error: Undefined Symbol: PPCAllocVecPooled
Error: Undefined Symbol: OpenScreenTags
Error: Undefined Symbol: ChangeWindowBox
Error: Undefined Symbol: CreateIORequest
Error: Undefined Symbol: WaitTOF
Error: Undefined Symbol: AllocVec
Error: Undefined Symbol: FreeScreenBuffer
Error: Undefined Symbol: PPCSeek
Error: Undefined Symbol: PPCCreatePool
Error: Undefined Symbol: ClearPointer
Error: Undefined Symbol: SetPointer
Error: Undefined Symbol: OpenWindowTags
Error: Undefined Symbol: UnlockPubScreen
Error: Undefined Symbol: ReleasePen
Error: Undefined Symbol: PPCRead
Error: Undefined Symbol: CheckIO
Error: Undefined Symbol: DeleteMsgPort
Error: Undefined Symbol: PPCRemove
Error: Undefined Symbol: BltBitMap
Error: Undefined Symbol: AllocMem
Error: Undefined Symbol: AbortIO
Error: Undefined Symbol: PPCDeletePool
Error: Undefined Symbol: GetMsg
Error: Undefined Symbol: BltBitMapRastPort
Error: Undefined Symbol: SetWindowTitles
Error: Undefined Symbol: CloseWindow
Error: Undefined Symbol: CreateMsgPort
Error: Undefined Symbol: GetSysTimePPC
Error: Undefined Symbol: PPCAllocVec
Error: Undefined Symbol: LockPubScreen
Error: Undefined Symbol: Wait
Error: Undefined Symbol: PPCOpen
Error: Undefined Symbol: PPCFreeVec
Error: Undefined Symbol: PPCCallOS
Error: Undefined Symbol: CloseDevice
Error: Undefined Symbol: AllocScreenBuffer
Error: Undefined Symbol: DeleteIORequest
Error: Undefined Symbol: NextDisplayInfo
Error: Undefined Symbol: AllocBitMap
Error: Undefined Symbol: OpenLibrary
Error: Undefined Symbol: PPCSetSignal
Error: Undefined Symbol: GetVPModeID
Error: Undefined Symbol: SendIO
Error: Undefined Symbol: Delay
Error: Undefined Symbol: WindowLimits
Error: Undefined Symbol: FreeBitMap
Error: Undefined Symbol: ReadJoyPort
Error: Undefined Symbol: PPCAddHead
Error: Undefined Symbol: FreeVec
Error: Undefined Symbol: CloseScreen
Error: Undefined Symbol: FindDisplayInfo
Error: Undefined Symbol: WaitIO
Error: Undefined Symbol: LoadRGB32
Error: Undefined Symbol: InitRastPort
Error: Undefined Symbol: FreeMem
Error: Undefined Symbol: ReplyMsg
Error: Undefined Symbol: PPCFreeVecPooled
Error: Undefined Symbol: GetDisplayInfoData
Error: Undefined Symbol: ObtainBestPenA
Error: Undefined Symbol: PPCGetTaskAttr
Error: Undefined Symbol: PPCWrite
Error: Undefined Symbol: RawKeyConvert
Error: Undefined Symbol: OpenDevice
Error: Undefined Symbol: CloseLibrary
Error: Error processing Elffile !


emufan 30 September 2017 17:42

Quote:

Originally Posted by grelbfarlk (Post 1188760)
though there's also the option to use StormC 3 compiler.

storm3 dont use gcc. I tried to build some c++ lightwave stuff with that,
but that did not work. was terrible, IIRC ... I dont want to remember :spin


#1) some intuition examples - source code - you can find here:
Amiga C Tutorial - Programming AmigaOS in C - Opening a Window


#2)
Quote:

Originally Posted by emufan (Post 1188754)
Code:

ppc-amigaos-g++ -warpup sdltest2.cpp *.wo -o sdltest801.elf

*ohhh* it does work, it seems, cool :D
now the same with the other missing functions :spin

it seems "/gg/lib/gcc-lib/ppc-amigaos/2.95.3/warpcollect" is doing the linking stuff,
which has problem with the libSDL_wos.a file format it seems.
since it does find the missing function in the .wo files *hmmm*

Quote:

Originally Posted by grelbfarlk (Post 1188721)

ppc-amigaos/lib has:
sdlppc.lib 248692 ----rwed 16-Sep-17 16:38:38
libSDL_wos.a 328396 ----rw-d Yesterday 19:07:47
end.o 874 ----rwed 18-Sep-16 20:26:41
libc.a 241952 ----rwed 18-Sep-16 20:26:41
libcwos.a 249608 ----rwed 18-Sep-16 20:26:41
libm.a 37510 ----rwed 18-Sep-16 20:26:41
libppcamiga.a 21378 ----rwed 18-Sep-16 20:26:41
startup.o 3336 ----rwed 18-Sep-16 20:26:41
startupwos.o 3140 ----rwed 18-Sep-16 20:26:41
libiberty.a 123492 ----rw-d 18-Sep-16 20:26:42
libstdc++.a.2.10.0 853292 ----rw-d 18-Sep-16 20:26:42
ldscripts Dir ----rwed 21-Sep-16 06:48:50
libdllppc.a 11084 ----rw-d 23-Sep-16 18:50:58

all *.a archive file format, if warpcollect has the same problem with them, as seen with libSDL_wos.a,
they have to get extracted and added with the *.wo "method"

I know this is ridiculous, there must be something else, to prevent using warpcollect.

#3)
Quote:

Originally Posted by Cowcat (Post 1188737)
elf2exe2/warpcollect is not needed if using latest gcc stuff.
.

what is the "latest gcc stuff", what are you referring to?

emufan 30 September 2017 18:29

ppc-gcc-2.95.3-base.lha /ppc-gcc-2.95.3-base/lib/gcc-lib/ppc-amigaos/2.95.3/specs:
Code:

*linker:
%{warpup:warpcollect} %{!warpup:/ade/ppc-amigaos/bin/ld}

for some reason it is invoked here. warpcollect but _not_ /ade/ppc-amigaos/bin/ld ?
something does call warpcollect, not exactly sure if its using the spec file.

#1) you may try to build the object file only with "-c" option:
Code:

ppc-amigaos-g++ -c -warpup sdltest2.cpp *.wo -o sdltest801.elf
or (?!)
ppc-amigaos-g++ -c -warpup sdltest2.cpp

and invoke the linker ld manually, but i'm not sure about the syntax. maybe:
Code:

ppc-amigaos-ld  /gg/ppc-amigaos/lib/startupwos.o sdltest2.o *.wo  -lgcc \
-lamiga -lstdc++ -lm -lc -lgcc -lcwos /gg/ppc-amigaos/lib/end.o -o sdltest801.elf

or (!?)

/ade/ppc-amigaos/bin/ld  /gg/ppc-amigaos/lib/startupwos.o sdltest2.o *.wo  -lgcc \
-lamiga -lstdc++  -lm -lc -lgcc -lcwos /gg/ppc-amigaos/lib/end.o -o sdltest801.elf

or (!?)

/gg/ppc-amigaos/bin/ld /gg/ppc-amigaos/lib/startupwos.o sdltest2.o *.wo  -lgcc \
-lamiga -lstdc++  -lm -lc -lgcc -lcwos /gg/ppc-amigaos/lib/end.o -o sdltest801.elf


phx 30 September 2017 18:56

Sorry. Still didn't read the whole thread, but some more of it. ;)

Quote:

Originally Posted by grelbfarlk (Post 1188725)
Yeah so the compiler uses warpcollect2 during linking then dumps out an .elf file which elf2exe2 converts to hunk format.

Yes. I remember something like elf2exe2 was used to convert the ELF V.4-ABI executable into an AmigaDOS-hunk format file, including a small 68k startup-code to launch the PPC main program(?).

Quote:

8.Ram Disk:> elf2exe2 gameppc.dll gameppc.exe
Error: Wrong magic number in ELF-header !
Error: Error processing Elffile !

8.Ram Disk:> elf2exe2 libSDL_wos.a libSDL_wos.lib
Error: Wrong magic number in ELF-header !
Error: Error processing Elffile !
You cannot run elf2exe2 on a library, as it is an archive containing several ELF objects. So there is no ELF-executable header.

Neither can you run it on a DLL (ELF shared object), which also has a different ID in its ELF header.

But you also don't want to do that, as both make no sense at all.


Quote:

PPCCallOS isn't in libppcamiga.a
PPCCallOS is PowerUp, not WarpOS! Something seriously went wrong here.

Quote:

Originally Posted by grelbfarlk (Post 1188760)
That's something else I was going to try, since stormC 4 uses GCC as the compiler, though there's also the option to use StormC 3 compiler.

FYI, StormC 3 and StormC 4, although different compilers, have something in common: both generate valid PowerOpen-ABI code and real hunk-format executables. H&P managed to patch the GCC used in StormC 4 that way, which not many of the free GCC-ports did.

I don't know what the -warpup option does, which I saw in some posts. Hopefully it switches to PowerOpen-ABI? Then your only remaining problem would be linking and generating a hunk-format executable.

Your llisting of ppc-amigaos/lib seems to include everything needed. Also the startup codes. startup.o is probably the 68k startup? Theoretically it should be possible to link a WarpOS executable with vlink using your ELF objects (it can also convert leading underscores on the fly).

But when this is really a WarpOS compiler then you should be able to compile a simple WarpOS program, without too much warpcollects and elf2exes... :)

emufan 30 September 2017 19:01

dev/gcc/ppc-gcc-2.95.3-base.lha:
Code:

Launch with "ppc-amigaos-gcc -warpup" for WarpOS and with "ppc-amigaos-gcc" for
PowerUP.

Quote:

PPCCallOS is PowerUp, not WarpOS! Something seriously went wrong here.
it is really confusing :/

Quote:

H&P managed to patch the GCC used in StormC 4 that way, which not many of the free GCC-ports did.
since the source code is available, does it make sense to build it?
--> since it would provide g++ aswell, it does make sense :spin

do you think it will build with vbcc and target warpup/warpos?

phx 30 September 2017 19:21

Quote:

Originally Posted by emufan (Post 1188779)
Code:

Launch with "ppc-amigaos-gcc -warpup" for WarpOS and with "ppc-amigaos-gcc" for
PowerUP.


Still we don't know what it does. Compile a simple function with and without -warpup and compare the assembler output (-S).

Quote:

since the source code is available, does it make sense to build it?
--> since it would provide g++ aswell, it does make sense :spin
Probably. If you have a lot of time. Also note that this is still an old GCC version (2.95.x, IIRC), which has problems with some modern sources.

Quote:

do you think it will build with vbcc and target warpup/warpos?
I didn't have a look into the source. When it is ANSI/ISO-C with not too much compiler-specific stuff in it - possible. Otherwise it is also possible, but much more work. ;)

emufan 30 September 2017 20:28

Quote:

Originally Posted by phx (Post 1188788)
Otherwise it is also possible, but much more work. ;)

I'm aware of the trouble caused by old and new crosscompiler.
maybe someone takes the challenge. :spin

ok, lets see, if something simple gets build for grelbfarlk.


All times are GMT +2. The time now is 15:24.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.

Page generated in 0.07834 seconds with 11 queries