Konamiman / Nextor

A disk operating system for MSX computers, forked from MSX-DOS 2.31
Other
183 stars 35 forks source link

SDCC creates .ROM files with different checksums on different PCs #94

Open mr-GreyWolf opened 3 years ago

mr-GreyWolf commented 3 years ago

This happens with the file source/kernel/bank5/fdisk.c

Probably the problem in file source/kernel/Makefile in line:

sdcc -o bank5/ --code-loc 0x4120 --data-loc 0x8020 -mz80 --disable-warning 196 --disable-warning 84 --disable-warning 85 \
     --max-allocs-per-node 1000 --allow-unsafe-read --opt-code-size --no-std-crt0 bank5/fdisk_crt0.rel $(patsubst %.dat,%.c,$@)
$(call hex2bin_full,$(patsubst %.dat,%.ihx,$@),$@)
Konamiman commented 2 years ago

Indeed, since that particular line is compiling FDISK using optimizations, the result might not always be the same (I don't know the internals of SDCC and how much these optimizations are "random") but I assume that the resulting code works in all cases, right?

Therefore I'll label it as an enhancement request and leave it open in case someone can figure out a wait to get consistent compilation results.