mirror of
https://github.com/RaySollium99/picodrive.git
synced 2025-09-05 15:27:46 -04:00
libretro, fix for windows and osx
This commit is contained in:
parent
62c7479bb1
commit
e2b573c0b0
1 changed files with 9 additions and 1 deletions
|
@ -46,14 +46,22 @@ get_define () # prefix struct member member...
|
|||
line=$(printf "#define %-20s 0x%04x" $prefix$name $rodata)
|
||||
}
|
||||
|
||||
fn="${1:-.}/pico_int_offs.h"
|
||||
if echo $CFLAGS | grep -qe -flto; then CFLAGS="$CFLAGS -fno-lto"; fi
|
||||
|
||||
# don't do this if readelf isn't available. it doesn't matter since offsets are
|
||||
# only needed for the asm parts (currently mips/arm32) and those have readelf
|
||||
if ! command -v readelf >/dev/null; then
|
||||
echo "/* mkoffset.sh: readelf not found, offset table not created */" >$fn
|
||||
echo "WARNING: readelf not found, offset table not created"
|
||||
exit
|
||||
fi
|
||||
# determine endianess
|
||||
echo '#include <stdint.h>' >/tmp/getoffs.c
|
||||
echo "const int32_t val = 1;" >>/tmp/getoffs.c
|
||||
compile_rodata
|
||||
ENDIAN=$(if [ "$rodata" -eq 1 ]; then echo be; else echo le; fi)
|
||||
# output header
|
||||
fn="${1:-.}/pico_int_offs.h"
|
||||
echo "/* autogenerated by mkoffset.sh, do not edit */" >$fn
|
||||
echo "/* target endianess: $ENDIAN, compiled with: $CC $CFLAGS */" >>$fn
|
||||
# output offsets
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue