Open mheyer32 opened 1 week ago
Weird, I did a make update today, now compiling DOpus ends up in:
68k-amigaos-gcc init/libinit.o read.o read_data.o read_strings.o init/amiga.o -m68020-60 -mtune=68030 -flto -fshort-enums -D__amigaos3__ -D__USE_SYSBASE -D__NO_NET_API -DUSE_64BIT -DCOMPDATE=19.06.2024 -g -ggdb -noixemul -Os -fomit-frame-pointer -nostartfiles -ldebug -lamiga -o ../../bin.os3/read.module_unstripped
/tmp/cc6nnJsy.s: Assembler messages:
/tmp/cc6nnJsy.s:2105: Error: syntax error -- statement `jsr (#-36,a6)' ignored
/tmp/cc6nnJsy.s:2804: Error: syntax error -- statement `jsr (#-30,a6)' ignored
/tmp/cc6nnJsy.s:3631: Error: syntax error -- statement `jsr (#-66,a6)' ignored
/tmp/cc6nnJsy.s:3682: Error: syntax error -- statement `jsr (#-66,a6)' ignored
lto-wrapper: fatal error: m68k-amigaos-gcc returned 1 exit status
compilation terminated.
collect2: fatal error: lto-wrapper returned 1 exit status
compilation terminated.
Weird, I did a make update today, now compiling DOpus ends up in:
68k-amigaos-gcc init/libinit.o read.o read_data.o read_strings.o init/amiga.o -m68020-60 -mtune=68030 -flto -fshort-enums -D__amigaos3__ -D__USE_SYSBASE -D__NO_NET_API -DUSE_64BIT -DCOMPDATE=19.06.2024 -g -ggdb -noixemul -Os -fomit-frame-pointer -nostartfiles -ldebug -lamiga -o ../../bin.os3/read.module_unstripped /tmp/cc6nnJsy.s: Assembler messages: /tmp/cc6nnJsy.s:2105: Error: syntax error -- statement `jsr (#-36,a6)' ignored /tmp/cc6nnJsy.s:2804: Error: syntax error -- statement `jsr (#-30,a6)' ignored /tmp/cc6nnJsy.s:3631: Error: syntax error -- statement `jsr (#-66,a6)' ignored /tmp/cc6nnJsy.s:3682: Error: syntax error -- statement `jsr (#-66,a6)' ignored lto-wrapper: fatal error: m68k-amigaos-gcc returned 1 exit status compilation terminated. collect2: fatal error: lto-wrapper returned 1 exit status compilation terminated.
caused by a bogus fix for https://github.com/bebbo/gcc/issues/233 ... test in 30 mins
-stackswap
Please update your own spec file and use -u___stkswap
since that file is in the library now.
Or don't use an own spec and define the reference in the code:
unsigned long __stack = 42000;
extern long __stkswap;
long * __ref = &__stkswap;
Thank you! The compilation error got fixed. Removing the referal to the .spec file and -stackswap
and replacing it with -u___stkswap
let it compile again. But now the program crashes at startup - could be some other failure.
You can try your own build: checkout https://github.com/mheyer32/dopus5allamigas/tree/new_stackswap
go to /source and build:
make os3 release debug=<yes|no>
Then the whole build ends up as a zip file under /release
if you want to pass -u___stkswap
to gcc (and not to the linker directly), then you have to use -Wl,-u___stkswap
So, I was able to track down the crash at DOpus' startup to opening sysinfo.library. It is unclear to me why that is, but I don't think its compiler related. Renaming sysinfo.library gets DOpus to start properly.
Is there a way to confirm that the -Wl,-u___stackswap
mechanics are working properly?
grep stkswap bin.os3/DirectoryOpus_unstripped
So, I was able to track down the crash at DOpus' startup to opening sysinfo.library. It is unclear to me why that is, but I don't think its compiler related. Renaming sysinfo.library gets DOpus to start properly.
Is there a way to confirm that the
-Wl,-u___stackswap
mechanics are working properly?
This is wrong. use -Wl,-u___stkswap
Oh, ok, it's typo in my comment. I think I copy&pasted correctly:
https://github.com/mheyer32/dopus5allamigas/commit/ae80ab910defbf63a6d345ff03eb8ea0595b8655
so what is the grep command printing?
Looks good!(?)
➜ source git:(master) ✗ grep stkswap bin.os3/DirectoryOpus_unstripped
grep: bin.os3/DirectoryOpus_unstripped: binary file matches
And if you are curious you might test -Wl,-u___checkstack
too. Use both together.
DOpus is not linking anymore, complaining about a missing swapstack.o:
And indeed, I can't find swapstack.o anywhere in the output directory...