From 906a1d182036a44d7821128d99b66c699baf0971 Mon Sep 17 00:00:00 2001 From: kub Date: Tue, 20 Aug 2019 22:26:39 +0200 Subject: [PATCH] cleanup config files, copyright stuff --- config.aarch64 | 9 ++++----- config.caanoo | 8 ++++---- config.caanoo47 | 8 ++++---- config.dingux | 7 +++---- config.dingux54 | 7 +++---- config.gcw0 | 7 +++---- config.gp2x | 6 +++--- config.gp2x47 | 6 +++--- config.i386 | 8 ++++---- config.x86 | 8 ++++---- pico/32x/draw_arm.S | 1 + pico/32x/memory.c | 1 + pico/memory_arm.S | 1 + tools/mkoffsets.sh | 9 ++++++--- 14 files changed, 44 insertions(+), 42 deletions(-) diff --git a/config.aarch64 b/config.aarch64 index 70a6fe30..9631d64e 100644 --- a/config.aarch64 +++ b/config.aarch64 @@ -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 diff --git a/config.caanoo b/config.caanoo index dd053bc5..1ffc54da 100644 --- a/config.caanoo +++ b/config.caanoo @@ -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 diff --git a/config.caanoo47 b/config.caanoo47 index 2c0ee5af..5bcf8608 100644 --- a/config.caanoo47 +++ b/config.caanoo47 @@ -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 diff --git a/config.dingux b/config.dingux index 8aca06a6..d1ec7fe5 100644 --- a/config.dingux +++ b/config.dingux @@ -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 diff --git a/config.dingux54 b/config.dingux54 index 5f292652..423cbd17 100644 --- a/config.dingux54 +++ b/config.dingux54 @@ -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 diff --git a/config.gcw0 b/config.gcw0 index 1d2ccef0..78f7c3a4 100644 --- a/config.gcw0 +++ b/config.gcw0 @@ -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 diff --git a/config.gp2x b/config.gp2x index 248d73aa..84d2f93d 100644 --- a/config.gp2x +++ b/config.gp2x @@ -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 diff --git a/config.gp2x47 b/config.gp2x47 index 632515ee..7ce3d9a9 100644 --- a/config.gp2x47 +++ b/config.gp2x47 @@ -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 diff --git a/config.i386 b/config.i386 index ce07b103..9c8c2e65 100644 --- a/config.i386 +++ b/config.i386 @@ -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 diff --git a/config.x86 b/config.x86 index 287b82d3..45440011 100644 --- a/config.x86 +++ b/config.x86 @@ -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 diff --git a/pico/32x/draw_arm.S b/pico/32x/draw_arm.S index e0cdcbe5..f351d8e0 100644 --- a/pico/32x/draw_arm.S +++ b/pico/32x/draw_arm.S @@ -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. diff --git a/pico/32x/memory.c b/pico/32x/memory.c index 8d5ca725..3e11cbcb 100644 --- a/pico/32x/memory.c +++ b/pico/32x/memory.c @@ -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. diff --git a/pico/memory_arm.S b/pico/memory_arm.S index 07d6a128..333780c1 100644 --- a/pico/memory_arm.S +++ b/pico/memory_arm.S @@ -1,6 +1,7 @@ /* * PicoDrive * (C) notaz, 2006-2009 + * (C) kub, 2019 * * This work is licensed under the terms of MAME license. * See COPYING file in the top-level directory. diff --git a/tools/mkoffsets.sh b/tools/mkoffsets.sh index 3b4c076d..8f2d888c 100755 --- a/tools/mkoffsets.sh +++ b/tools/mkoffsets.sh @@ -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 -- 2.39.5