From 30275ec7f1a8b126f884d33103632f1a364387ed Mon Sep 17 00:00:00 2001 From: John-Mark Bell Date: Thu, 2 Jun 2022 20:32:30 +0100 Subject: SDK build runes for arm-riscos-gnueabihf Follows the existing arm-unknown-riscos setup. --- sdk/Makefile | 8 +++++ .../openssl/Configurations-50-riscos.conf.p | 14 +++++++- sdk/recipes/patches/openssl/Configure.p | 3 +- .../patches/zlib/arm-riscos-gnueabihf/configure.p | 42 ++++++++++++++++++++++ 4 files changed, 65 insertions(+), 2 deletions(-) create mode 100644 sdk/recipes/patches/zlib/arm-riscos-gnueabihf/configure.p diff --git a/sdk/Makefile b/sdk/Makefile index 1cc3418..9146367 100644 --- a/sdk/Makefile +++ b/sdk/Makefile @@ -7,6 +7,7 @@ # GCCSDK_INSTALL_CROSSBIN -- /path/to/toolchain/bin # # supported targets are: +# arm-riscos-gnueabihf # arm-unknown-riscos # m68k-atari-mint # m5475-atari-mint @@ -116,6 +117,13 @@ FREETYPE_ENV := LIBPNG_CFLAGS=$$($(GCCSDK_INSTALL_ENV)/bin/libpng-config --cflag LIBJPEG_TURBO_BUILDDIR:=$(BUILDDIR)/libjpegturbo # Target Specific setup +ifeq ($(TARGET),arm-riscos-gnueabihf) + SDK_ITEMS := $(addprefix $(BUILDSTEPS)/, $(COMMON_SDK_ITEMS) libjpeg-turbo.d libwebp.d) + EXTRAARGS_LIBCARES := --disable-shared + EXTRAARGS_LIBCURL := --enable-nonblocking --enable-ares --with-random="/dev/urandom" $(LIBCURL_DISABLES) + EXTRAARGS_OPENSSL := no-asm +endif + ifeq ($(TARGET),arm-unknown-riscos) SDK_ITEMS := $(addprefix $(BUILDSTEPS)/, $(COMMON_SDK_ITEMS) libjpeg-turbo.d libwebp.d) EXTRAARGS_LIBCARES := --disable-shared diff --git a/sdk/recipes/patches/openssl/Configurations-50-riscos.conf.p b/sdk/recipes/patches/openssl/Configurations-50-riscos.conf.p index c05a4ad..f3d4dc1 100644 --- a/sdk/recipes/patches/openssl/Configurations-50-riscos.conf.p +++ b/sdk/recipes/patches/openssl/Configurations-50-riscos.conf.p @@ -1,6 +1,6 @@ --- /dev/null 2017-10-10 15:19:45.611896396 +0100 +++ Configurations/50-riscos.conf 2017-10-17 15:42:25.304921197 +0100 -@@ -0,0 +1,14 @@ +@@ -0,0 +1,26 @@ +my %targets = ( + + "arm-unknown-riscos" => { @@ -14,4 +14,16 @@ + sys_id => "RISCOS", + bn_ops => "BN_LLONG", + }, ++ ++ "arm-riscos-gnueabihf" => { ++ inherit_from => [ "BASE_unix" ], ++ cc => "arm-riscos-gnueabihf-gcc", ++ cflags => picker(default => "-DL_ENDIAN -DTERMIOS -DNO_SYS_UN_H", ++ debug => "-O0 -g", ++ release => "-O3 ", ++ threads("-D_REENTRANT")), ++ thread_scheme => "(unknown)", ++ sys_id => "RISCOS", ++ bn_ops => "BN_LLONG", ++ }, +); diff --git a/sdk/recipes/patches/openssl/Configure.p b/sdk/recipes/patches/openssl/Configure.p index 6b1a39e..f44d99d 100644 --- a/sdk/recipes/patches/openssl/Configure.p +++ b/sdk/recipes/patches/openssl/Configure.p @@ -1,9 +1,10 @@ --- Configure.orig 2017-10-17 14:53:18.369801491 +0100 +++ Configure 2017-10-17 15:11:04.312242542 +0100 -@@ -1329,6 +1329,7 @@ +@@ -1329,6 +1329,8 @@ $target{cxxflags}//=$target{cflags} if $target{CXX}; $target{exe_extension}=".exe" if ($config{target} eq "DJGPP"); $target{exe_extension}=".pm" if ($config{target} =~ /vos/); ++$target{exe_extension}=",e1f" if ($config{target} eq "arm-riscos-gnueabihf"); +$target{exe_extension}=",e1f" if ($config{target} eq "arm-unknown-riscos"); # Fill %config with values from %user, and in case those are undefined or diff --git a/sdk/recipes/patches/zlib/arm-riscos-gnueabihf/configure.p b/sdk/recipes/patches/zlib/arm-riscos-gnueabihf/configure.p new file mode 100644 index 0000000..24d7a7e --- /dev/null +++ b/sdk/recipes/patches/zlib/arm-riscos-gnueabihf/configure.p @@ -0,0 +1,42 @@ +--- configure.orig 2012-05-02 05:17:08.000000000 +0100 ++++ configure 2012-07-17 17:57:01.000000000 +0100 +@@ -423,18 +423,18 @@ + echo >> configure.log + + # check for large file support, and if none, check for fseeko() +-cat > $test.c < +-off64_t dummy = 0; +-EOF +-if try $CC -c $CFLAGS -D_LARGEFILE64_SOURCE=1 $test.c; then +- CFLAGS="${CFLAGS} -D_LARGEFILE64_SOURCE=1" +- SFLAGS="${SFLAGS} -D_LARGEFILE64_SOURCE=1" +- ALL="${ALL} all64" +- TEST="${TEST} test64" +- echo "Checking for off64_t... Yes." | tee -a configure.log +- echo "Checking for fseeko... Yes." | tee -a configure.log +-else ++#cat > $test.c < ++#off64_t dummy = 0; ++#EOF ++#if try $CC -c $CFLAGS -D_LARGEFILE64_SOURCE=1 $test.c; then ++# CFLAGS="${CFLAGS} -D_LARGEFILE64_SOURCE=1" ++# SFLAGS="${SFLAGS} -D_LARGEFILE64_SOURCE=1" ++# ALL="${ALL} all64" ++# TEST="${TEST} test64" ++# echo "Checking for off64_t... Yes." | tee -a configure.log ++# echo "Checking for fseeko... Yes." | tee -a configure.log ++#else + echo "Checking for off64_t... No." | tee -a configure.log + echo >> configure.log + cat > $test.c <> configure.log + -- cgit v1.2.3