cleanup config files, copyright stuff
authorkub <derkub@gmail.com>
Tue, 20 Aug 2019 20:26:39 +0000 (22:26 +0200)
committerkub <derkub@gmail.com>
Tue, 20 Aug 2019 20:26:39 +0000 (22:26 +0200)
14 files changed:
config.aarch64
config.caanoo
config.caanoo47
config.dingux
config.dingux54
config.gcw0
config.gp2x
config.gp2x47
config.i386
config.x86
pico/32x/draw_arm.S
pico/32x/memory.c
pico/memory_arm.S
tools/mkoffsets.sh

index 70a6fe3..9631d64 100644 (file)
@@ -4,12 +4,11 @@ CC = aarch64-linux-gnu-gcc
 CXX = aarch64-linux-gnu-g++
 AS = aarch64-linux-gnu-as
 STRIP = aarch64-linux-gnu-strip
-CFLAGS += -I/usr/include/SDL
-CFLAGS += -D_GNU_SOURCE=1 -D_REENTRANT -Wno-unused-result -fno-stack-protector
+CFLAGS += -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT -Wno-unused-result
 ASFLAGS += 
-LDFLAGS += 
-LDLIBS += -lSDL -lasound -lpng -lz -lm -lstdc++ -ldl
+LDFLAGS += # --sysroot ${HOME}/opt/aarch64/debian-arm64
+LDLIBS += -lSDL -lasound -lpng -lz -lm -ldl
 
 ARCH = aarch64
 PLATFORM = generic
-SOUND_DRIVERS = alsa
+SOUND_DRIVERS = oss alsa sdl
index dd053bc..1ffc54d 100644 (file)
@@ -4,11 +4,11 @@ CC = arm-gph-linux-gnueabi-gcc
 CXX = arm-gph-linux-gnueabi-g++
 AS = arm-gph-linux-gnueabi-as
 STRIP = arm-gph-linux-gnueabi-strip
-CFLAGS += -mfloat-abi=soft -mcpu=arm920t -mtune=arm920t -fno-stack-protector -D__GP2X__
-CFLAGS += -fno-gcse -funswitch-loops -fweb -ftree-loop-im #-fpredictive-commoning -ftree-loop-distribution -frename-registers
-CFLAGS += -I${HOME}/opt/GPH_SDK/tools/gcc-4.2.4-glibc-2.7-eabi/arm-gph-linux-gnueabi/sys-root/usr/include -I${HOME}/src/gp2x/armroot-eabi/include
+CFLAGS += -I${HOME}/opt/GPH_SDK/tools/gcc-4.2.4-glibc-2.7-eabi/arm-gph-linux-gnueabi/sys-root/usr/include -I${HOME}/src/gp2x/armroot-eabi/include -D__GP2X__ -Wno-unused-result
+CFLAGS += -mfloat-abi=soft -mcpu=arm920t -mtune=arm920t -mno-thumb-interwork -fno-stack-protector -fno-common
+CFLAGS += -finline-limit=42 -fipa-pta -fno-ipa-pure-const
 ASFLAGS += -mfloat-abi=soft -mcpu=arm920t
-LDFLAGS += -B${HOME}/opt/GPH_SDK/tools/gcc-4.2.4-glibc-2.7-eabi/lib/gcc/arm-gph-linux-gnueabi/4.2.4 -B${HOME}/opt/GPH_SDK/tools/gcc-4.2.4-glibc-2.7-eabi/arm-gph-linux-gnueabi/sys-root/usr/lib -L${HOME}/opt/GPH_SDK/tools/gcc-4.2.4-glibc-2.7-eabi/arm-gph-linux-gnueabi/sys-root/usr/lib -L${HOME}/src/gp2x/armroot-eabi/lib -static
+LDFLAGS += --sysroot ${HOME}/opt/GPH_SDK/tools/gcc-4.2.4-glibc-2.7-eabi/arm-gph-linux-gnueabi/sys-root -L${HOME}/opt/GPH_SDK/tools/gcc-4.2.4-glibc-2.7-eabi/arm-gph-linux-gnueabi/sys-root/usr/lib -L${HOME}/src/gp2x/armroot-eabi/lib -static
 LDLIBS += -lpng -lm -ldl
 
 ARCH = arm
index 2c0ee5a..5bcf860 100644 (file)
@@ -4,11 +4,11 @@ CC = arm-linux-gnueabi-gcc
 CXX = arm-linux-gnueabi-g++
 AS = arm-linux-gnueabi-as
 STRIP = arm-linux-gnueabi-strip
-CFLAGS += -mfloat-abi=soft -mcpu=arm920t -mtune=arm920t -Wno-unused-result -fno-stack-protector -D__GP2X__
-CFLAGS += -fno-gcse -funswitch-loops -fweb -ftree-loop-im #-fpredictive-commoning -ftree-loop-distribution -frename-registers
-CFLAGS += -I${HOME}/opt/GPH_SDK/tools/gcc-4.2.4-glibc-2.7-eabi/arm-gph-linux-gnueabi/sys-root/usr/include -I${HOME}/src/gp2x/armroot-eabi/include
+CFLAGS += -I${HOME}/opt/GPH_SDK/tools/gcc-4.2.4-glibc-2.7-eabi/arm-gph-linux-gnueabi/sys-root/usr/include -I${HOME}/src/gp2x/armroot-eabi/include  -D__GP2X__  -Wno-unused-result
+CFLAGS += -mfloat-abi=soft -mcpu=arm920t -mtune=arm920t -mno-thumb-interwork -fno-stack-protector -fno-common
+CFLAGS += -finline-limit=42 -fipa-pta -fno-ipa-sra -fno-ipa-pure-const
 ASFLAGS += -mfloat-abi=soft -mcpu=arm920t
-LDFLAGS += -B${HOME}/opt/GPH_SDK/tools/gcc-4.2.4-glibc-2.7-eabi/lib/gcc/arm-gph-linux-gnueabi/4.2.4 -B${HOME}/opt/GPH_SDK/tools/gcc-4.2.4-glibc-2.7-eabi/arm-gph-linux-gnueabi/sys-root/usr/lib -L${HOME}/opt/GPH_SDK/tools/gcc-4.2.4-glibc-2.7-eabi/arm-gph-linux-gnueabi/sys-root/usr/lib -static
+LDFLAGS += -B${HOME}/opt/GPH_SDK/tools/gcc-4.2.4-glibc-2.7-eabi/lib/gcc/arm-gph-linux-gnueabi/4.2.4 -B${HOME}/opt/GPH_SDK/tools/gcc-4.2.4-glibc-2.7-eabi/arm-gph-linux-gnueabi/sys-root/usr/lib -L${HOME}/opt/GPH_SDK/tools/gcc-4.2.4-glibc-2.7-eabi/arm-gph-linux-gnueabi/sys-root/usr/lib -L${HOME}/src/gp2x/armroot-eabi/lib -static
 LDLIBS += -lpng -lm -ldl
 
 ARCH = arm
index 8aca06a..d1ec7fe 100644 (file)
@@ -4,12 +4,11 @@ CC = mipsel-linux-gcc
 CXX = mipsel-linux-g++
 AS = mipsel-linux-as
 STRIP = mipsel-linux-strip
-CFLAGS +=  -I${HOME}/opt/opendingux-toolchain/usr/include/
-CFLAGS +=  -I${HOME}/opt/opendingux-toolchain/usr/include/SDL
+CFLAGS +=  -I${HOME}/opt/opendingux-toolchain/usr/include/ -I${HOME}/opt/opendingux-toolchain/usr/include/SDL
 CFLAGS += -D_GNU_SOURCE=1 -D_REENTRANT -Wno-unused-result -fno-stack-protector
 ASFLAGS += 
-LDFLAGS += 
-LDLIBS += -B${HOME}/opt/opendingux-toolchain/usr/lib -Wl,-rpath-link=${HOME}/opt/opendingux-toolchain/usr/lib -Wl,-rpath-link=${HOME}/opt/opendingux-toolchain/lib -lSDL -lasound -lpng -lm -lstdc++ -ldl
+LDFLAGS += --sysroot ${HOME}/opt/opendingux-toolchain -L${HOME}/opt/opendingux-toolchain/lib
+LDLIBS += -lSDL -lasound -lpng -lz -lm -ldl
 
 ARCH = mipsel
 PLATFORM = opendingux
index 5f29265..423cbd1 100644 (file)
@@ -4,12 +4,11 @@ CC = mipsel-linux-gnu-gcc
 CXX = mipsel-linux-gnu-g++
 AS = mipsel-linux-gnu-as
 STRIP = mipsel-linux-gnu-strip
-CFLAGS += -I${HOME}/opt/opendingux-toolchain/usr/include/
-CFLAGS += -I${HOME}/opt/opendingux-toolchain/usr/include/SDL
+CFLAGS += -I${HOME}/opt/opendingux-toolchain/usr/include/ -I${HOME}/opt/opendingux-toolchain/usr/include/SDL
 CFLAGS += -D_GNU_SOURCE=1 -D_REENTRANT -Wno-unused-result -fno-stack-protector
 ASFLAGS += 
-LDFLAGS += 
-LDLIBS += -B${HOME}/opt/opendingux-toolchain/usr/lib -B${HOME}/opt/opendingux-toolchain/lib -Wl,-rpath-link=${HOME}/opt/opendingux-toolchain/usr/lib -Wl,-rpath-link=${HOME}/opt/opendingux-toolchain/lib -lSDL -lasound -lpng -lz -lm -lstdc++ -ldl
+LDFLAGS += -B${HOME}/opt/opendingux-toolchain/usr/lib -B${HOME}/opt/opendingux-toolchain/lib -Wl,-rpath-link=${HOME}/opt/opendingux-toolchain/usr/lib -Wl,-rpath-link=${HOME}/opt/opendingux-toolchain/lib
+LDLIBS += -lSDL -lasound -lpng -lz -lm -ldl
 
 ARCH = mipsel
 PLATFORM = opendingux
index 1d2ccef..78f7c3a 100644 (file)
@@ -4,12 +4,11 @@ CC = mipsel-gcw0-linux-uclibc-gcc
 CXX = mipsel-gcw0-linux-uclibc-g++
 AS = mipsel-gcw0-linux-uclibc-as
 STRIP = mipsel-gcw0-linux-uclibc-strip
-CFLAGS +=  -I${HOME}/opt/gcw0-toolchain/usr/mipsel-gcw0-linux-uclibc/sysroot/usr/include/
-CFLAGS +=  -I${HOME}/opt/gcw0-toolchain/usr/mipsel-gcw0-linux-uclibc/sysroot/usr/include/SDL
+CFLAGS +=  -I${HOME}/opt/gcw0-toolchain/usr/mipsel-gcw0-linux-uclibc/sysroot/usr/include/ -I${HOME}/opt/gcw0-toolchain/usr/mipsel-gcw0-linux-uclibc/sysroot/usr/include/SDL
 CFLAGS += -D_GNU_SOURCE=1 -D_REENTRANT -Wno-unused-result -fno-stack-protector
 ASFLAGS += 
-LDFLAGS += 
-LDLIBS += -B${HOME}/opt/gcw0-toolchain/usr/lib -Wl,-rpath-link=${HOME}/opt/gcw0-toolchain/usr/mipsel-gcw0-linux-uclibc/sysroot/usr/lib -Wl,-rpath-link=${HOME}/opt/gcw0-toolchain/usr/mipsel-gcw0-linux-uclibc/sysroot/lib -lSDL -lasound -lpng -lz -lm -lstdc++ -ldl
+LDFLAGS += --sysroot ${HOME}/opt/gcw0-toolchain/usr/mipsel-gcw0-linux-uclibc/sysroot
+LDLIBS += -lSDL -lasound -lpng -lz -lm -ldl
 
 ARCH = mipsel
 PLATFORM = opendingux
index 248d73a..84d2f93 100644 (file)
@@ -4,9 +4,9 @@ CC = arm-open2x-linux-gcc
 CXX = arm-open2x-linux-g++
 AS = arm-open2x-linux-as
 STRIP = arm-open2x-linux-strip
-CFLAGS += -msoft-float -mcpu=arm920t -mtune=arm920t -D__GP2X__
-CFLAGS += -I${HOME}/opt/open2x/gcc-4.1.1-glibc-2.3.6/arm-open2x-linux/include -I${HOME}/src/gp2x/armroot/include
-CFLAGS += -fno-gcse -funswitch-loops -fweb -ftree-loop-im #-fpredictive-commoning -ftree-loop-distribution -frename-registers
+CFLAGS += -I${HOME}/opt/open2x/gcc-4.1.1-glibc-2.3.6/arm-open2x-linux/include -I${HOME}/src/gp2x/armroot/include  -D__GP2X__ -Wno-unused-result
+CFLAGS += -msoft-float -mcpu=arm920t -mtune=arm920t
+CFLAGS += -finline-limit=42 -fipa-cp -fno-ipa-pure-const
 ASFLAGS += -mcpu=arm920t -mfloat-abi=soft
 LDFLAGS += --sysroot ${HOME}/opt/open2x/gcc-4.1.1-glibc-2.3.6/arm-open2x-linux -L${HOME}/opt/open2x/gcc-4.1.1-glibc-2.3.6/arm-open2x-linux/lib -L${HOME}/src/gp2x/armroot/lib -static
 LDLIBS += -lpng -lm -ldl
index 632515e..7ce3d9a 100644 (file)
@@ -4,12 +4,12 @@ CC = arm-linux-gnueabi-gcc
 CXX = arm-linux-gnueabi-g++
 AS = arm-linux-gnueabi-as
 STRIP = arm-linux-gnueabi-strip
+CFLAGS += -I${HOME}/opt/open2x/gcc-4.1.1-glibc-2.3.6/arm-open2x-linux/include -I${HOME}/src/gp2x/armroot/include -D__GP2X__ -Wno-unused-result
 CFLAGS += -mabi=apcs-gnu -mfloat-abi=soft -mfpu=fpa -mcpu=arm920t -mtune=arm920t
-CFLAGS += -Wno-unused-result -D__GP2X__ -mno-thumb-interwork -fno-stack-protector -fno-common
-CFLAGS += -I${HOME}/opt/open2x/gcc-4.1.1-glibc-2.3.6/arm-open2x-linux/include -I${HOME}/src/gp2x/armroot/include
+CFLAGS += -mno-thumb-interwork -fno-stack-protector -fno-common
 CFLAGS += -finline-limit=42 -fipa-pta -fno-ipa-sra -fno-ipa-pure-const
 ASFLAGS += -mabi=apcs-gnu -mfloat-abi=soft -mfpu=fpa -mcpu=arm920t
-LDFLAGS += -mabi=apcs-gnu -mfpu=fpa -B${HOME}/opt/open2x/gcc-4.1.1-glibc-2.3.6/lib/gcc/arm-open2x-linux/4.1.1 -B${HOME}/opt/open2x/gcc-4.1.1-glibc-2.3.6/arm-open2x-linux/lib -L${HOME}/opt/open2x/gcc-4.1.1-glibc-2.3.6/arm-open2x-linux/lib -L${HOME}/src/gp2x/armroot/lib -static
+LDFLAGS += -mabi=apcs-gnu -mfpu=fpa -B${HOME}/opt/open2x/gcc-4.1.1-glibc-2.3.6/lib/gcc/arm-open2x-linux/4.1.1 -B${HOME}/opt/open2x/gcc-4.1.1-glibc-2.3.6/arm-open2x-linux/lib -L${HOME}/opt/open2x/gcc-4.1.1-glibc-2.3.6/arm-open2x-linux/usr/lib -L${HOME}/src/gp2x/armroot/lib -static
 LDLIBS += -lpng -lm -ldl
 
 ARCH = arm
index ce07b10..9c8c2e6 100644 (file)
@@ -4,11 +4,11 @@ CC = gcc
 CXX = g++
 AS = as
 STRIP = strip
-CFLAGS +=  -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT -Wno-unused-result -m32 # -pg
+CFLAGS +=  -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT -Wno-unused-result -m32
 ASFLAGS += 
-LDFLAGS += -m32 #-pg
-LDLIBS += -L/usr/lib/i386-linux-gnu -L${HOME}/opt/lib32 -lSDL-1.2 -lasound -lpng -lz -lm -ldl
+LDFLAGS += -m32 -L/usr/lib/i386-linux-gnu -L${HOME}/opt/lib32
+LDLIBS += -lSDL-1.2 -lasound -lpng -lz -lm -ldl
 
 ARCH = i386
 PLATFORM = generic
-SOUND_DRIVERS =  oss alsa sdl
+SOUND_DRIVERS = oss alsa sdl
index 287b82d..4544001 100644 (file)
@@ -4,11 +4,11 @@ CC = gcc
 CXX = g++
 AS = as
 STRIP = strip
-CFLAGS +=  -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT -Wno-unused-result # -pg
+CFLAGS +=  -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT -Wno-unused-result
 ASFLAGS += 
-LDFLAGS += #-pg
-LDLIBS += -L/usr/lib/x86_64-linux-gnu -lSDL-1.2 -lasound -lpng -lz -lm -ldl
+LDFLAGS += -L/usr/lib/x86_64-linux-gnu
+LDLIBS += -lSDL-1.2 -lasound -lpng -lz -lm -ldl
 
 ARCH = x86_64
 PLATFORM = generic
-SOUND_DRIVERS =  oss alsa sdl
+SOUND_DRIVERS = oss alsa sdl
index e0cdcbe..f351d8e 100644 (file)
@@ -1,6 +1,7 @@
 @*
 @* PicoDrive
 @* (C) notaz, 2010
+@* (C) kub, 2019
 @*
 @* This work is licensed under the terms of MAME license.
 @* See COPYING file in the top-level directory.
index 8d5ca72..3e11cbc 100644 (file)
@@ -1,6 +1,7 @@
 /*
  * PicoDrive
  * (C) notaz, 2009,2010,2013
+ * (C) kub, 2019
  *
  * This work is licensed under the terms of MAME license.
  * See COPYING file in the top-level directory.
index 07d6a12..333780c 100644 (file)
@@ -1,6 +1,7 @@
 /*\r
  * PicoDrive\r
  * (C) notaz, 2006-2009\r
+ * (C) kub, 2019\r
  *\r
  * This work is licensed under the terms of MAME license.\r
  * See COPYING file in the top-level directory.\r
index 3b4c076..8f2d888 100755 (executable)
@@ -11,7 +11,10 @@ ENDIAN=
 # compile with target C compiler and extract value from .rodata section
 compile_rodata ()
 {
-       $CC $CFLAGS -I .. -shared /tmp/getoffs.c -o /tmp/getoffs.o || exit 1
+       # $CC $CFLAGS -I .. -shared /tmp/getoffs.c -o /tmp/getoffs.o || exit 1
+       echo 'void dummy(void) { asm(""::"r" (&val)); }' >> /tmp/getoffs.c
+       $CC $CFLAGS -I .. -nostdlib -Wl,-edummy /tmp/getoffs.c \
+                                               -o /tmp/getoffs.o || exit 1
        # find the name of the .rodata section (in case -fdata-sections is used)
        rosect=$(readelf -S /tmp/getoffs.o | grep '\.rodata' |
                                                sed 's/^[^.]*././;s/ .*//')
@@ -40,13 +43,13 @@ get_define () # prefix struct member member...
        name=$(echo $* | sed 's/ /_/g')
        echo '#include "pico/pico_int.h"' > /tmp/getoffs.c
        echo "static const struct $struct p;" >> /tmp/getoffs.c
-       echo "const int offs = (char *)&p.$field - (char*)&p;" >>/tmp/getoffs.c
+       echo "const int val = (char *)&p.$field - (char*)&p;" >>/tmp/getoffs.c
        compile_rodata
        line=$(printf "#define %-20s 0x%04x" $prefix$name $rodata)
 }
 
 # determine endianess
-echo "const int one = 1;" >/tmp/getoffs.c
+echo "const int val = 1;" >/tmp/getoffs.c
 compile_rodata
 ENDIAN=$(if [ "$rodata" -eq 1 ]; then echo be; else echo le; fi)
 # output header