diff options
Diffstat (limited to 'sdk')
80 files changed, 3331 insertions, 868 deletions
diff --git a/sdk/Makefile b/sdk/Makefile index 860a7d4..340be7d 100644 --- a/sdk/Makefile +++ b/sdk/Makefile @@ -7,11 +7,13 @@ # GCCSDK_INSTALL_CROSSBIN -- /path/to/toolchain/bin # # supported targets are: +# arm-riscos-gnueabi # arm-unknown-riscos # m68k-atari-mint # m5475-atari-mint # ppc-amigaos # i686-w64-mingw32 +# x86_64-w64-mingw32 # m68k-unknown-amigaos ifeq ($(GCCSDK_INSTALL_ENV),) @@ -23,23 +25,64 @@ ifeq ($(GCCSDK_INSTALL_CROSSBIN),) endif # Upstream package versions -VERSION_ZLIB := 1.2.11 -VERSION_LIBICONV := 1.15 +# https://zlib.net/ +VERSION_ZLIB := 1.2.13 +CKSUM_ZLIB := b3a24de97a8fdbc835b9833169501030b8977031bcb54b3b3ac13740f846ab30 +# https://www.gnu.org/software/libiconv/ +VERSION_LIBICONV := 1.17 +CKSUM_LIBICONV := 8f74213b56238c85a50a5329f77e06198771e70dd9a739779f4c02f65d971313 +# https://laurikari.net/tre/ VERSION_LIBTRE := 0.8.0 -VERSION_OPENSSL := 1.1.0f -VERSION_LIBPNG := 1.6.29 +CKSUM_LIBTRE := 8dc642c2cde02b2dac6802cdbe2cda201daf79c4ebcbb3ea133915edf1636658 +# https://www.openssl.org/ +VERSION_OPENSSL := 3.0.12 +CKSUM_OPENSSL := f93c9e8edde5e9166119de31755fc87b4aa34863662f67ddfcba14d0b6b69b61 +# http://www.libpng.org/pub/png/libpng.html +VERSION_LIBPNG := 1.6.40 +CKSUM_LIBPNG := 8f720b363aa08683c9bf2a563236f45313af2c55d542b5481ae17dd8d183bb42 +# http://libjpeg.sourceforge.net/ VERSION_LIBJPEG := 8d -VERSION_LIBJPEG_TURBO := 1.5.1 -VERSION_LIBCARES := 1.13.0 -VERSION_LIBCURL := 7.54.1 +CKSUM_LIBJPEG := 00029b1473f0f0ea72fbca3230e8cb25797fbb27e58ae2e46bb8bf5a806fe0b3 +# https://libjpeg-turbo.org/ +VERSION_LIBJPEG_TURBO := 3.0.1 +CKSUM_LIBJPEG_TURBO := 22429507714ae147b3acacd299e82099fce5d9f456882fc28e252e4579ba2a75 +# https://developers.google.com/speed/webp/ +VERSION_LIBWEBP := 1.3.2 +CKSUM_LIBWEBP := 2a499607df669e40258e53d0ade8035ba4ec0175244869d1025d460562aa09b4 +# https://c-ares.org/ +VERSION_LIBCARES := 1.23.0 +CKSUM_LIBCARES := cb614ecf78b477d35963ebffcf486fc9d55cc3d3216f00700e71b7d4868f79f5 +# https://curl.se/ +VERSION_LIBCURL := 8.5.0 +CKSUM_LIBCURL := ce4b6a6655431147624aaf582632a36fe1ade262d5fab385c60f78942dd8d87b +# VERSION_LIBGNURX := 2.5.1 +CKSUM_LIBGNURX := 7147b7f806ec3d007843b38e19f42a5b7c65894a57ffc297a76b0dcd5f675d76 +# http://mission-base.com/peter/source/ +# 1.7.0: https://github.com/peterGraf/pbl/releases VERSION_LIBPBL := 1_04 +CKSUM_LIBPBL := 20f0ab1af09a22a8f3cb3ce3832247a6b51d8db57211f6bb0794af9485229a67 +# Git-20170304 VERSION_LIBCF := CVS-20130415 -VERSION_LIBEXPAT := 2.2.1 -VERSION_LDG := 2.32 +CKSUM_LIBCF := 5d25c4faa2f5b7fc106bb47d093646f79d0fa72a34aaf8122110a2e4cf9eb6cc +# https://github.com/libexpat/libexpat +VERSION_LIBEXPAT := 2.5.0 +CKSUM_LIBEXPAT := 6f0e6e01f7b30025fa05c85fdad1e5d0ec7fd35d9f61b22f34998de11969ff67 +# +VERSION_LDG := SVN-20150827 +CKSUM_LDG := ca7959d31b46cb1e755005eddcc0daf6a91f7faad7d869d82e94d98d20650d94 +# VERSION_WINDOM := 2.0.1 +CKSUM_WINDOM := 2539c15c22f7b8ca48c015f0c3d33f3bd1666cc8aa56eef6f38de2cc98a3479e +# https://github.com/berkus/hermes-pixel-format/archive/refs/tags/v1.3.3.tar.gz VERSION_HERMES := 1.3.3 -VERSION_FREETYPE := 2.7.1 +CKSUM_HERMES := e86374606105d2a251d4406e5f9fca8d09e2fd971ebb0dfd342e40953676c46e +# https://www.freetype.org/ +VERSION_FREETYPE := 2.13.2 +CKSUM_FREETYPE := 1ac27e16c134a7f2ccea177faba19801131116fd682efc1f5737037c5db224b5 +# +VERSION_ROADSHOW := 7_64_0-amissl +CKSUM_ROADSHOW := 5af092c2319f184d49f5eda72d160231b3f3551f9884f8136c531521059a4ad2 # Path path__ := $(GCCSDK_INSTALL_CROSSBIN):$(PATH) @@ -49,6 +92,7 @@ cc__ := $(word 1,$(wildcard $(GCCSDK_INSTALL_CROSSBIN)/*gcc)) cxx__ := $(word 1,$(wildcard $(GCCSDK_INSTALL_CROSSBIN)/*g++)) ar__ := $(word 1,$(wildcard $(GCCSDK_INSTALL_CROSSBIN)/*ar)) ranlib__ := $(word 1,$(wildcard $(GCCSDK_INSTALL_CROSSBIN)/*ranlib)) +windres__ := $(word 1,$(wildcard $(GCCSDK_INSTALL_CROSSBIN)/*windres)) # Flags cflags__ := -I$(GCCSDK_INSTALL_ENV)/include @@ -59,11 +103,31 @@ pkg_config_libdir__ := $(GCCSDK_INSTALL_ENV)/lib/pkgconfig # Target TARGET := $(shell $(cc__) -dumpmachine) +ifeq ($(findstring -riscos,$(TARGET)),-riscos) + cflags__ := $(cflags__) -mpoke-function-name + ifeq ($(findstring -gnueabi,$(TARGET)),-gnueabi) + cflags__ := $(cflags__) -funwind-tables + endif +endif + # Environment # Newer autotools objects to -I appearing in CFLAGS cleanenv := PATH="$(path__)" CC="$(cc__)" CXX="$(cxx__)" AR="$(ar__)" RANLIB="$(ranlib__)" CPPFLAGS="$(cppflags__)" LDFLAGS="$(ldflags__)" PKG_CONFIG_LIBDIR="$(pkg_config_libdir__)" env := $(cleanenv) CFLAGS="$(cflags__)" +# Cross-compiling CMake invocation. +NS_SDK_CMAKE_CMD=cmake \ + -DCMAKE_INSTALL_PREFIX="$(GCCSDK_INSTALL_ENV)" \ + -DBUILD_SHARED_LIBS=OFF \ + -DCMAKE_COLOR_MAKEFILE=OFF \ + -DBUILD_DOC=OFF \ + -DBUILD_DOCS=OFF \ + -DBUILD_EXAMPLE=OFF \ + -DBUILD_EXAMPLES=OFF \ + -DBUILD_TEST=OFF \ + -DBUILD_TESTS=OFF \ + -DBUILD_TESTING=OFF \ + RECIPES := $(CURDIR)/recipes SOURCEDIR := $(CURDIR)/sources BUILDDIR := $(CURDIR)/builddir-$(TARGET) @@ -79,15 +143,26 @@ SDK_ITEMS := COMMON_SDK_ITEMS := zlib.d openssl.d libpng.d libcares.d libcurl.d libexpat.d -LIBCURL_DISABLES := $(patsubst %,--disable-%,ftp file dict ldap ldaps rtsp telnet gopher tftp pop3 imap smb smtp manual) +LIBCURL_SSL := openssl +LIBCURL_DISABLES := $(patsubst %,--disable-%,ftp file dict ldap ldaps mqtt rtsp telnet gopher tftp pop3 imap smb smtp manual) FREETYPE_ENV := LIBPNG_CFLAGS=$$($(GCCSDK_INSTALL_ENV)/bin/libpng-config --cflags) LIBPNG_LDFLAGS=$$($(GCCSDK_INSTALL_ENV)/bin/libpng-config --ldflags) # per target environments LIBJPEG_TURBO_BUILDDIR:=$(BUILDDIR)/libjpegturbo +# Openssl target has to alter for mingw +TARGET_OPENSSL:=$(TARGET) + # Target Specific setup +ifeq ($(TARGET),arm-riscos-gnueabi) + 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) + 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 @@ -113,25 +188,48 @@ endif ifeq ($(TARGET),ppc-amigaos) SDK_ITEMS := $(addprefix $(BUILDSTEPS)/, libiconv.d libtre.d libpbl.d $(COMMON_SDK_ITEMS) libjpeg-turbo.d) EXTRAARGS_LIBCARES := --disable-shared - EXTRAARGS_LIBCURL := --disable-ntlm-wb --without-random --enable-threaded-resolver LIBS=-lpthread + EXTRAARGS_LIBCURL := --disable-ntlm-wb --without-random --enable-threaded-resolver --disable-ipv6 LIBS=-lpthread endif ifeq ($(TARGET),i686-w64-mingw32) - SDK_ITEMS := $(addprefix $(BUILDSTEPS)/, libiconv.d libgnurx.d $(COMMON_SDK_ITEMS) libjpeg.d) + SDK_ITEMS := $(addprefix $(BUILDSTEPS)/, libiconv.d libgnurx.d $(COMMON_SDK_ITEMS) libjpeg.d libwebp.d) + EXTRAARGS_LIBCARES := --disable-shared + EXTRAARGS_LIBCURL := --enable-nonblocking --enable-ares --disable-ldap --without-random + LIBCURL_ENV := CFLAGS="-DCARES_STATICLIB" LIBS="-lgdi32 -lcrypt32 -liphlpapi" + TARGET_OPENSSL := mingw + ENV_OPENSSL := WINDRES="$(windres__)" + EXTRAARGS_OPENSSL := no-asm enable-capieng +endif + +ifeq ($(TARGET),x86_64-w64-mingw32) + SDK_ITEMS := $(addprefix $(BUILDSTEPS)/, libiconv.d libgnurx.d $(COMMON_SDK_ITEMS) libjpeg.d libwebp.d) EXTRAARGS_LIBCARES := --disable-shared EXTRAARGS_LIBCURL := --enable-nonblocking --enable-ares --disable-ldap --without-random - LIBCURL_ENV := CFLAGS="-DCARES_STATICLIB" LIBS="-lgdi32 -lcrypt32" + LIBCURL_ENV := CFLAGS="-DCARES_STATICLIB" LIBS="-lgdi32 -lcrypt32 -liphlpapi" + TARGET_OPENSSL := mingw64 EXTRAARGS_OPENSSL := no-asm enable-capieng endif ifeq ($(TARGET),m68k-unknown-amigaos) - SDK_ITEMS := $(addprefix $(BUILDSTEPS)/, libiconv.d libtre.d libpbl.d $(COMMON_SDK_ITEMS) libjpeg.d) + SDK_ITEMS := $(addprefix $(BUILDSTEPS)/, roadshow.d libiconv.d libtre.d libpbl.d $(COMMON_SDK_ITEMS) libjpeg.d) EXTRAARGS_LIBCARES := --disable-shared --without-random - EXTRAARGS_LIBCURL := --disable-ntlm-wb --without-random --disable-threaded-resolver --with-ssl --with-zlib - LIBICONV_ENV := CFLAGS="-DPATH_MAX=1024" + LIBCARES_ENV := LIBS="-lm" + LIBCURL_SSL := amissl + EXTRAARGS_LIBCURL := --disable-ntlm-wb --without-random --disable-threaded-resolver --with-zlib --disable-rt --disable-ipv6 + LIBICONV_ENV := CFLAGS="-DPATH_MAX=1024 -DRLIMIT_NOFILE=6" LIBJPEG_ENV := LDFLAGS="-lm" LIBJPEG_TURBO_ENV := LDFLAGS="-lm" - LIBCURL_ENV := LIBS="-lm" + # XXX: build openssl against bsdsocket.library? + # ENV_OPENSSL := CFLAGS="-I$(GCCSDK_INSTALL_ENV)/netinclude" CPPFLAGS="-D__NO_NET_API" + ifeq ($(LIBCURL_SSL),openssl) + LIBCURL_ENV := LIBS="-lm -lnet" + else + LIBCURL_ENV := CFLAGS="-I$(GCCSDK_INSTALL_ENV)/netinclude -D__NO_NET_API -DHAVE_IOCTLSOCKET_CAMEL_FIONBIO" LIBS="-lm" + endif + # XXX: libgcc is meant to be implied, but for some reason that + # results in ld evaluating it after libm and thus failing to find symbols. + # Hack around it by forcing the link order here. + LIBEXPAT_ENV := LDFLAGS="-lgcc -lm" endif ifeq ($(SDK_ITEMS),) @@ -173,7 +271,7 @@ endif touch $@ $(SOURCEDIR)/zlib-$(VERSION_ZLIB).tar.gz: - $(FETCHSRC) sdk $(subst $(SOURCEDIR)/,,$@) "http://zlib.net/$(subst $(SOURCEDIR)/,,$@)" $@ + $(FETCHSRC) sdk $(subst $(SOURCEDIR)/,,$@) "https://zlib.net/fossils/$(subst $(SOURCEDIR)/,,$@)" $(CKSUM_ZLIB) $@ # libiconv $(BUILDSTEPS)/libiconv.d: $(BUILDSTEPS)/builddir.d $(BUILDSTEPS)/libiconv-src.d @@ -191,7 +289,7 @@ $(BUILDSTEPS)/libiconv-src.d: $(BUILDSTEPS)/sourcedir.d $(SOURCEDIR)/libiconv-$( touch $@ $(SOURCEDIR)/libiconv-$(VERSION_LIBICONV).tar.gz: - $(FETCHSRC) sdk $(subst $(SOURCEDIR)/,,$@) "http://ftp.gnu.org/pub/gnu/libiconv/$(subst $(SOURCEDIR)/,,$@)" $@ + $(FETCHSRC) sdk $(subst $(SOURCEDIR)/,,$@) "https://ftp.gnu.org/pub/gnu/libiconv/$(subst $(SOURCEDIR)/,,$@)" $(CKSUM_LIBICONV) $@ # libgnurx $(BUILDSTEPS)/libgnurx.d: $(BUILDSTEPS)/builddir.d $(BUILDSTEPS)/libgnurx-src.d @@ -211,7 +309,7 @@ $(BUILDSTEPS)/libgnurx-src.d: $(BUILDSTEPS)/sourcedir.d $(SOURCEDIR)/libgnurx-$( touch $@ $(SOURCEDIR)/libgnurx-$(VERSION_LIBGNURX).tar.gz: - $(FETCHSRC) sdk $(subst $(SOURCEDIR)/,,$@) "http://downloads.sourceforge.net/project/mingw/Other/UserContributed/regex/mingw-regex-$(VERSION_LIBGNURX)/mingw-libgnurx-$(VERSION_LIBGNURX)-src.tar.gz" $@ + $(FETCHSRC) sdk $(subst $(SOURCEDIR)/,,$@) "https://downloads.sourceforge.net/project/mingw/Other/UserContributed/regex/mingw-regex-$(VERSION_LIBGNURX)/mingw-libgnurx-$(VERSION_LIBGNURX)-src.tar.gz" $(CKSUM_LIBGNURX) $@ # atari cf library $(BUILDSTEPS)/libcf.d: $(BUILDSTEPS)/builddir.d $(BUILDSTEPS)/libcf-src.d @@ -229,7 +327,7 @@ $(BUILDSTEPS)/libcf-src.d: $(BUILDSTEPS)/sourcedir.d $(SOURCEDIR)/libcf-$(VERSIO touch $@ $(SOURCEDIR)/libcf-$(VERSION_LIBCF).tar.bz2: - $(FETCHSRC) sdk $(subst $(SOURCEDIR)/,,$@) "http://vincent.riviere.free.fr/soft/m68k-atari-mint/archives/cflib-$(VERSION_LIBCF).tar.bz2" $@ + $(FETCHSRC) sdk $(subst $(SOURCEDIR)/,,$@) "http://vincent.riviere.free.fr/soft/m68k-atari-mint/archives/cflib-$(VERSION_LIBCF).tar.bz2" $(CKSUM_LIBCF) $@ # atari windom library $(BUILDSTEPS)/windom.d: $(BUILDSTEPS)/builddir.d $(BUILDSTEPS)/windom-src.d @@ -247,12 +345,12 @@ $(BUILDSTEPS)/windom-src.d: $(BUILDSTEPS)/sourcedir.d $(SOURCEDIR)/windom-$(VERS touch $@ $(SOURCEDIR)/windom-$(VERSION_WINDOM).zip: - $(FETCHSRC) sdk $(subst $(SOURCEDIR)/,,$@) "http://downloads.sourceforge.net/project/windom/windom/$(VERSION_WINDOM)/windom-$(VERSION_WINDOM)-1.zip" $@ + $(FETCHSRC) sdk $(subst $(SOURCEDIR)/,,$@) "https://downloads.sourceforge.net/project/windom/windom/$(VERSION_WINDOM)/windom-$(VERSION_WINDOM)-1.zip" $(CKSUM_WINDOM) $@ # atari ldg library $(BUILDSTEPS)/ldg.d: $(BUILDSTEPS)/builddir.d $(BUILDSTEPS)/ldg-src.d mkdir -p $(BUILDDIR)/ldg - cd $(BUILDDIR)/ldg && unzip $(SOURCEDIR)/ldg-$(VERSION_LDG).zip + cd $(BUILDDIR)/ldg && tar xjf $(SOURCEDIR)/ldg-$(VERSION_LDG).tar.bz2 $(env) make -C $(BUILDDIR)/ldg/ldg-$(VERSION_LDG)/src/devel -f gcc.mak CROSS=yes PREFIX=$(GCCSDK_INSTALL_ENV) CC=${TARGET}-gcc AR=${TARGET}-ar cp $(BUILDDIR)/ldg/ldg-$(VERSION_LDG)/lib/gcc/libldg.a $(GCCSDK_INSTALL_ENV)/lib/ cp $(BUILDDIR)/ldg/ldg-$(VERSION_LDG)/include/ldg.h $(GCCSDK_INSTALL_ENV)/include/ldg.h @@ -260,31 +358,31 @@ $(BUILDSTEPS)/ldg.d: $(BUILDSTEPS)/builddir.d $(BUILDSTEPS)/ldg-src.d cp $(BUILDDIR)/ldg/ldg-$(VERSION_LDG)/include/ldg/mem.h $(GCCSDK_INSTALL_ENV)/include/ldg/ touch $@ -$(BUILDSTEPS)/ldg-src.d: $(BUILDSTEPS)/sourcedir.d $(SOURCEDIR)/ldg-$(VERSION_LDG).zip +$(BUILDSTEPS)/ldg-src.d: $(BUILDSTEPS)/sourcedir.d $(SOURCEDIR)/ldg-$(VERSION_LDG).tar.bz2 touch $@ -$(SOURCEDIR)/ldg-$(VERSION_LDG).zip: - $(FETCHSRC) sdk $(subst $(SOURCEDIR)/,,$@) "http://ldg.org.free.fr/distrib/ldg-$(VERSION_LDG).zip" $@ +$(SOURCEDIR)/ldg-$(VERSION_LDG).tar.bz2: + $(FETCHSRC) sdk $(subst $(SOURCEDIR)/,,$@) "http://vincent.riviere.free.fr/soft/m68k-atari-mint/archives/ldg-$(VERSION_LDG).tar.bz2" $(CKSUM_LDG) $@ # hermes bitmap lib $(BUILDSTEPS)/hermes.d: $(BUILDSTEPS)/builddir.d $(BUILDSTEPS)/hermes-src.d - cd $(BUILDDIR)/hermes/Hermes-$(VERSION_HERMES) - for p in `ls $(RECIPES)/patches/hermes/*.p` ; do $(PATCH) -d $(BUILDDIR)/hermes/Hermes-$(VERSION_HERMES) -p0 <$$p ; done + cd $(BUILDDIR)/hermes/hermes-pixel-format-$(VERSION_HERMES) + for p in `ls $(RECIPES)/patches/hermes/*.p` ; do $(PATCH) -d $(BUILDDIR)/hermes/hermes-pixel-format-$(VERSION_HERMES) -p0 <$$p ; done ifneq ($(realpath $(RECIPES)/patches/hermes/$(TARGET)),) - for p in `ls $(RECIPES)/patches/hermes/$(TARGET)/*.p` ; do $(PATCH) -d $(BUILDDIR)/hermes/Hermes-$(VERSION_HERMES) -p0 <$$p ; done + for p in `ls $(RECIPES)/patches/hermes/$(TARGET)/*.p` ; do $(PATCH) -d $(BUILDDIR)/hermes/hermes-pixel-format-$(VERSION_HERMES) -p0 <$$p ; done endif - cd $(BUILDDIR)/hermes/Hermes-$(VERSION_HERMES) && $(env) ./configure --prefix=$(GCCSDK_INSTALL_ENV) --target=$(TARGET) --host=$(TARGET) --disable-shared --disable-x86asm - cd $(BUILDDIR)/hermes/Hermes-$(VERSION_HERMES) && $(env) make CFLAGS="-D__BIG_ENDIAN__" install + cd $(BUILDDIR)/hermes/hermes-pixel-format-$(VERSION_HERMES) && $(env) ./configure --prefix=$(GCCSDK_INSTALL_ENV) --target=$(TARGET) --host=$(TARGET) --disable-shared --disable-x86asm + cd $(BUILDDIR)/hermes/hermes-pixel-format-$(VERSION_HERMES) && $(env) make CFLAGS="-D__BIG_ENDIAN__" install touch $@ -$(BUILDSTEPS)/hermes-src.d: $(BUILDSTEPS)/sourcedir.d $(SOURCEDIR)/hermes-$(VERSION_HERMES).tar.bz2 +$(BUILDSTEPS)/hermes-src.d: $(BUILDSTEPS)/sourcedir.d $(SOURCEDIR)/hermes-$(VERSION_HERMES).tar.gz $(RM) -rf $(BUILDDIR)/hermes mkdir -p $(BUILDDIR)/hermes - cd $(BUILDDIR)/hermes && tar xaf $(SOURCEDIR)/hermes-$(VERSION_HERMES).tar.bz2 + cd $(BUILDDIR)/hermes && tar xaf $(SOURCEDIR)/hermes-$(VERSION_HERMES).tar.gz touch $@ -$(SOURCEDIR)/hermes-$(VERSION_HERMES).tar.bz2: - $(FETCHSRC) sdk $(subst $(SOURCEDIR)/,,$@) "http://clanlib.org/download/legacy/Hermes-$(VERSION_HERMES).tar.bz2" $@ +$(SOURCEDIR)/hermes-$(VERSION_HERMES).tar.gz: + $(FETCHSRC) sdk $(subst $(SOURCEDIR)/,,$@) "https://github.com/berkus/hermes-pixel-format/archive/refs/tags/v$(VERSION_HERMES).tar.gz" $(CKSUM_HERMES) $@ # freetype font lib $(BUILDSTEPS)/freetype.d: $(BUILDSTEPS)/builddir.d $(BUILDSTEPS)/freetype-src.d @@ -293,14 +391,31 @@ $(BUILDSTEPS)/freetype.d: $(BUILDSTEPS)/builddir.d $(BUILDSTEPS)/freetype-src.d cd $(BUILDDIR)/freetype/freetype-$(VERSION_FREETYPE) && $(env) make install touch $@ -$(BUILDSTEPS)/freetype-src.d: $(BUILDSTEPS)/sourcedir.d $(SOURCEDIR)/freetype-$(VERSION_FREETYPE).tar.bz2 +$(BUILDSTEPS)/freetype-src.d: $(BUILDSTEPS)/sourcedir.d $(SOURCEDIR)/freetype-$(VERSION_FREETYPE).tar.gz $(RM) -rf $(BUILDDIR)/freetype mkdir -p $(BUILDDIR)/freetype - cd $(BUILDDIR)/freetype && tar xaf $(SOURCEDIR)/freetype-$(VERSION_FREETYPE).tar.bz2 + cd $(BUILDDIR)/freetype && tar xaf $(SOURCEDIR)/freetype-$(VERSION_FREETYPE).tar.gz +ifneq ($(realpath $(RECIPES)/files/freetype/$(TARGET)),) + cp -r $(RECIPES)/files/freetype/$(TARGET)/* $(BUILDDIR)/freetype/freetype-$(VERSION_FREETYPE)/ +endif + touch $@ + +$(SOURCEDIR)/freetype-$(VERSION_FREETYPE).tar.gz: + $(FETCHSRC) sdk $(subst $(SOURCEDIR)/,,$@) "https://download.savannah.gnu.org/releases/freetype/freetype-$(VERSION_FREETYPE).tar.gz" $(CKSUM_FREETYPE) $@ + +# amiga roadshow sdk +$(BUILDSTEPS)/roadshow.d: $(BUILDSTEPS)/builddir.d $(BUILDSTEPS)/roadshow-src.d + mkdir -p $(BUILDDIR)/Roadshow-SDK + lha xw=$(BUILDDIR)/Roadshow-SDK $(SOURCEDIR)/Roadshow-SDK-NS-$(VERSION_ROADSHOW).lha + mkdir -p $(GCCSDK_INSTALL_ENV)/netinclude + cp -r $(BUILDDIR)/Roadshow-SDK/SDK/netinclude/* $(GCCSDK_INSTALL_ENV)/netinclude/ touch $@ -$(SOURCEDIR)/freetype-$(VERSION_FREETYPE).tar.bz2: - $(FETCHSRC) sdk $(subst $(SOURCEDIR)/,,$@) "http://download.savannah.gnu.org/releases/freetype/freetype-$(VERSION_FREETYPE).tar.bz2" $@ +$(BUILDSTEPS)/roadshow-src.d: $(BUILDSTEPS)/sourcedir.d $(SOURCEDIR)/Roadshow-SDK-NS-$(VERSION_ROADSHOW).lha + touch $@ + +$(SOURCEDIR)/Roadshow-SDK-NS-$(VERSION_ROADSHOW).lha: + $(FETCHSRC) sdk $(subst $(SOURCEDIR)/,,$@) "https://github.com/chris-y/curl/releases/download/curl-$(VERSION_ROADSHOW)/Roadshow-SDK-NS.lha" $(CKSUM_ROADSHOW) $@ # regex $(BUILDSTEPS)/libtre.d: $(BUILDSTEPS)/builddir.d $(BUILDSTEPS)/libtre-src.d @@ -315,7 +430,7 @@ $(BUILDSTEPS)/libtre-src.d: $(BUILDSTEPS)/sourcedir.d $(SOURCEDIR)/tre-$(VERSION touch $@ $(SOURCEDIR)/tre-$(VERSION_LIBTRE).tar.bz2: - $(FETCHSRC) sdk $(subst $(SOURCEDIR)/,,$@) "http://laurikari.net/tre/$(subst $(SOURCEDIR)/,,$@)" $@ + $(FETCHSRC) sdk $(subst $(SOURCEDIR)/,,$@) "https://laurikari.net/tre/$(subst $(SOURCEDIR)/,,$@)" $(CKSUM_LIBTRE) $@ # libpbl $(BUILDSTEPS)/libpbl.d: $(BUILDSTEPS)/builddir.d $(BUILDSTEPS)/libpbl-src.d @@ -332,28 +447,33 @@ $(BUILDSTEPS)/libpbl-src.d: $(BUILDSTEPS)/sourcedir.d $(SOURCEDIR)/pbl_$(VERSION touch $@ $(SOURCEDIR)/pbl_$(VERSION_LIBPBL).tar.gz: - $(FETCHSRC) sdk $(subst $(SOURCEDIR)/,,$@) "http://www.mission-base.com/peter/source/$(subst $(SOURCEDIR)/,,$@)" $@ + $(FETCHSRC) sdk $(subst $(SOURCEDIR)/,,$@) "https://www.mission-base.com/peter/source/$(subst $(SOURCEDIR)/,,$@)" $(CKSUM_LIBPBL) $@ # OpenSSL $(BUILDSTEPS)/openssl.d: $(BUILDSTEPS)/builddir.d $(BUILDSTEPS)/zlib.d $(BUILDSTEPS)/openssl-src.d +ifeq ($(LIBCURL_SSL),openssl) + cd $(BUILDDIR)/openssl/openssl-$(VERSION_OPENSSL) && $(env) $(ENV_OPENSSL) ./Configure --prefix=$(GCCSDK_INSTALL_ENV) $(TARGET_OPENSSL) no-shared no-threads $(EXTRAARGS_OPENSSL) + cd $(BUILDDIR)/openssl/openssl-$(VERSION_OPENSSL) && $(env) make install +endif + touch $@ + +# prepare the openssl source tree +$(BUILDSTEPS)/openssl-src.d: $(BUILDSTEPS)/sourcedir.d $(SOURCEDIR)/openssl-$(VERSION_OPENSSL).tar.gz + $(RM) -rf $(BUILDDIR)/openssl mkdir -p $(BUILDDIR)/openssl cd $(BUILDDIR)/openssl && tar xaf $(SOURCEDIR)/openssl-$(VERSION_OPENSSL).tar.gz - for p in `ls $(RECIPES)/patches/openssl/*.p` ; do $(PATCH) -d $(BUILDDIR)/openssl/openssl-$(VERSION_OPENSSL) -p0 <$$p ; done + for p in `ls $(RECIPES)/patches/openssl/*.p` ; do $(PATCH) -d $(BUILDDIR)/openssl/openssl-$(VERSION_OPENSSL) -p0 <$$p || exit $0 ; done ifneq ($(realpath $(RECIPES)/patches/openssl/$(TARGET)),) - for p in `ls $(RECIPES)/patches/openssl/$(TARGET)/*.p` ; do $(PATCH) -d $(BUILDDIR)/openssl/openssl-$(VERSION_OPENSSL) -p0 <$$p ; done + for p in `ls $(RECIPES)/patches/openssl/$(TARGET)/*.p` ; do $(PATCH) -d $(BUILDDIR)/openssl/openssl-$(VERSION_OPENSSL) -p0 <$$p || exit $0 ; done endif ifneq ($(realpath $(RECIPES)/files/openssl/$(TARGET)),) cp -r $(RECIPES)/files/openssl/$(TARGET)/* $(BUILDDIR)/openssl/openssl-$(VERSION_OPENSSL) endif - cd $(BUILDDIR)/openssl/openssl-$(VERSION_OPENSSL) && $(env) ./Configure --prefix=$(GCCSDK_INSTALL_ENV) $(TARGET) no-shared no-threads $(EXTRAARGS_OPENSSL) - cd $(BUILDDIR)/openssl/openssl-$(VERSION_OPENSSL) && $(env) make install - touch $@ - -$(BUILDSTEPS)/openssl-src.d: $(BUILDSTEPS)/sourcedir.d $(SOURCEDIR)/openssl-$(VERSION_OPENSSL).tar.gz touch $@ +# get the openssl source tar $(SOURCEDIR)/openssl-$(VERSION_OPENSSL).tar.gz: - $(FETCHSRC) sdk $(subst $(SOURCEDIR)/,,$@) "http://www.openssl.org/source/$(subst $(SOURCEDIR)/,,$@)" $@ + $(FETCHSRC) sdk $(subst $(SOURCEDIR)/,,$@) "https://www.openssl.org/source/$(subst $(SOURCEDIR)/,,$@)" $(CKSUM_OPENSSL) $@ # libPNG $(BUILDSTEPS)/libpng.d: $(BUILDSTEPS)/builddir.d $(BUILDSTEPS)/zlib.d $(BUILDSTEPS)/libpng-src.d @@ -370,7 +490,7 @@ $(BUILDSTEPS)/libpng-src.d: $(BUILDSTEPS)/sourcedir.d $(SOURCEDIR)/libpng-$(VERS touch $@ $(SOURCEDIR)/libpng-$(VERSION_LIBPNG).tar.gz: - $(FETCHSRC) sdk $(subst $(SOURCEDIR)/,,$@) "http://downloads.sourceforge.net/libpng/$(subst $(SOURCEDIR)/,,$@)" $@ + $(FETCHSRC) sdk $(subst $(SOURCEDIR)/,,$@) "https://downloads.sourceforge.net/libpng/$(subst $(SOURCEDIR)/,,$@)" $(CKSUM_LIBPNG) $@ # libjpeg @@ -389,8 +509,7 @@ $(BUILDSTEPS)/libjpeg-src.d: $(BUILDSTEPS)/sourcedir.d $(SOURCEDIR)/jpegsrc.v$(V touch $@ $(SOURCEDIR)/jpegsrc.v$(VERSION_LIBJPEG).tar.gz: - $(FETCHSRC) sdk $(subst $(SOURCEDIR)/,,$@) "http://ijg.org/files/$(subst $(SOURCEDIR)/,,$@)" $@ - + $(FETCHSRC) sdk $(subst $(SOURCEDIR)/,,$@) "https://ijg.org/files/$(subst $(SOURCEDIR)/,,$@)" $(CKSUM_LIBJPEG) $@ # libjpegturbo $(BUILDSTEPS)/libjpeg-turbo.d: $(BUILDSTEPS)/builddir.d $(BUILDSTEPS)/libjpeg-turbo-src.d @@ -400,15 +519,38 @@ $(BUILDSTEPS)/libjpeg-turbo.d: $(BUILDSTEPS)/builddir.d $(BUILDSTEPS)/libjpeg-tu ifneq ($(realpath $(RECIPES)/patches/libjpegturbo/$(TARGET)),) for p in `ls $(RECIPES)/patches/libjpegturbo/$(TARGET)/*.p` ; do $(PATCH) -d $(LIBJPEG_TURBO_BUILDDIR)/libjpeg-turbo-$(VERSION_LIBJPEG_TURBO) -p0 <$$p ; done endif - cd $(LIBJPEG_TURBO_BUILDDIR)/libjpeg-turbo-$(VERSION_LIBJPEG_TURBO) && $(env) $(LIBJPEG_TURBO_ENV) ./configure --prefix=$(GCCSDK_INSTALL_ENV) --target=$(TARGET) --host=$(TARGET) --disable-shared - cd $(LIBJPEG_TURBO_BUILDDIR)/libjpeg-turbo-$(VERSION_LIBJPEG_TURBO) && $(env) make install + mkdir -p $(LIBJPEG_TURBO_BUILDDIR)/libjpeg-turbo-$(VERSION_LIBJPEG_TURBO)/ns-sdk-build + cd $(LIBJPEG_TURBO_BUILDDIR)/libjpeg-turbo-$(VERSION_LIBJPEG_TURBO)/ns-sdk-build && $(env) $(LIBJPEG_TURBO_ENV) $(NS_SDK_CMAKE_CMD) \ + -DENABLE_STATIC=ON \ + -DENABLE_SHARED=OFF \ + .. + cd $(LIBJPEG_TURBO_BUILDDIR)/libjpeg-turbo-$(VERSION_LIBJPEG_TURBO)/ns-sdk-build && $(env) make install VERBOSE=1 touch $@ $(BUILDSTEPS)/libjpeg-turbo-src.d: $(BUILDSTEPS)/sourcedir.d $(SOURCEDIR)/libjpeg-turbo-src-$(VERSION_LIBJPEG_TURBO).tar.gz touch $@ $(SOURCEDIR)/libjpeg-turbo-src-$(VERSION_LIBJPEG_TURBO).tar.gz: - $(FETCHSRC) sdk $(subst $(SOURCEDIR)/,,$@) "http://sourceforge.net/projects/libjpeg-turbo/files/$(VERSION_LIBJPEG_TURBO)/libjpeg-turbo-$(VERSION_LIBJPEG_TURBO).tar.gz/download" $@ + $(FETCHSRC) sdk $(subst $(SOURCEDIR)/,,$@) "https://github.com/libjpeg-turbo/libjpeg-turbo/releases/download/$(VERSION_LIBJPEG_TURBO)/libjpeg-turbo-$(VERSION_LIBJPEG_TURBO).tar.gz" $(CKSUM_LIBJPEG_TURBO) $@ + + +# libwebp +$(BUILDSTEPS)/libwebp.d: $(BUILDSTEPS)/builddir.d $(BUILDSTEPS)/libwebp-src.d + mkdir -p $(BUILDDIR)/libwebp + cd $(BUILDDIR)/libwebp && tar xaf $(SOURCEDIR)/libwebp-$(VERSION_LIBWEBP).tar.gz + for p in `ls $(RECIPES)/patches/libwebp/*.p` ; do $(PATCH) -d $(BUILDDIR)/libwebp/libwebp-$(VERSION_LIBWEBP) -p0 <$$p ; done +ifneq ($(realpath $(RECIPES)/patches/libwebp/$(TARGET)),) + for p in `ls $(RECIPES)/patches/libwebp/$(TARGET)/*.p` ; do $(PATCH) -d $(BUILDDIR)/libwebp/libwebp-$(VERSION_LIBWEBP) -p0 <$$p ; done +endif + cd $(BUILDDIR)/libwebp/libwebp-$(VERSION_LIBWEBP) && $(env) $(LIBWEBP_ENV) ./configure --prefix=$(GCCSDK_INSTALL_ENV) --target=$(TARGET) --host=$(TARGET) --disable-shared $(EXTRAARGS_LIBWEBP) + cd $(BUILDDIR)/libwebp/libwebp-$(VERSION_LIBWEBP) && $(env) make install + touch $@ + +$(BUILDSTEPS)/libwebp-src.d: $(BUILDSTEPS)/sourcedir.d $(SOURCEDIR)/libwebp-$(VERSION_LIBWEBP).tar.gz + touch $@ + +$(SOURCEDIR)/libwebp-$(VERSION_LIBWEBP).tar.gz: + $(FETCHSRC) sdk $(subst $(SOURCEDIR)/,,$@) "https://storage.googleapis.com/downloads.webmproject.org/releases/webp/libwebp-$(VERSION_LIBWEBP).tar.gz" $(CKSUM_LIBWEBP) $@ # libcares @@ -419,7 +561,7 @@ $(BUILDSTEPS)/libcares.d: $(BUILDSTEPS)/builddir.d $(BUILDSTEPS)/libcares-src.d ifneq ($(realpath $(RECIPES)/patches/libcares/$(TARGET)),) for p in `ls $(RECIPES)/patches/libcares/$(TARGET)/*.p` ; do $(PATCH) -d $(BUILDDIR)/libcares/c-ares-$(VERSION_LIBCARES) -p0 <$$p ; done endif - cd $(BUILDDIR)/libcares/c-ares-$(VERSION_LIBCARES) && $(cleanenv) ./configure --prefix=$(GCCSDK_INSTALL_ENV) --target=$(TARGET) --host=$(TARGET) $(EXTRAARGS_LIBCARES) + cd $(BUILDDIR)/libcares/c-ares-$(VERSION_LIBCARES) && $(cleanenv) $(LIBCARES_ENV) ./configure --prefix=$(GCCSDK_INSTALL_ENV) --target=$(TARGET) --host=$(TARGET) $(EXTRAARGS_LIBCARES) cd $(BUILDDIR)/libcares/c-ares-$(VERSION_LIBCARES) && $(cleanenv) make install touch $@ @@ -427,12 +569,12 @@ $(BUILDSTEPS)/libcares-src.d: $(BUILDSTEPS)/sourcedir.d $(SOURCEDIR)/c-ares-$(VE touch $@ $(SOURCEDIR)/c-ares-$(VERSION_LIBCARES).tar.gz: - $(FETCHSRC) sdk $(subst $(SOURCEDIR)/,,$@) "http://c-ares.haxx.se/download/$(subst $(SOURCEDIR)/,,$@)" $@ + $(FETCHSRC) sdk $(subst $(SOURCEDIR)/,,$@) "https://c-ares.org/download/$(subst $(SOURCEDIR)/,,$@)" $(CKSUM_LIBCARES) $@ # libcurl $(BUILDSTEPS)/libcurl.d: $(BUILDSTEPS)/builddir.d $(BUILDSTEPS)/zlib.d $(BUILDSTEPS)/openssl.d $(BUILDSTEPS)/libcares.d $(BUILDSTEPS)/libcurl-src.d - cd $(BUILDDIR)/libcurl/curl-$(VERSION_LIBCURL) && $(env) CFLAGS="" $(LIBCURL_ENV) ./configure --prefix=$(GCCSDK_INSTALL_ENV) --target=$(TARGET) --host=$(TARGET) --disable-shared --without-libidn ${EXTRAARGS_LIBCURL} + cd $(BUILDDIR)/libcurl/curl-$(VERSION_LIBCURL) && $(env) CFLAGS="" $(LIBCURL_ENV) ./configure --prefix=$(GCCSDK_INSTALL_ENV) --target=$(TARGET) --host=$(TARGET) --disable-shared --with-$(LIBCURL_SSL) --without-libidn2 ${EXTRAARGS_LIBCURL} cd $(BUILDDIR)/libcurl/curl-$(VERSION_LIBCURL) && $(env) make install touch $@ @@ -446,20 +588,23 @@ endif touch $@ $(SOURCEDIR)/curl-$(VERSION_LIBCURL).tar.bz2: - $(FETCHSRC) sdk $(subst $(SOURCEDIR)/,,$@) "http://curl.haxx.se/download/$(subst $(SOURCEDIR)/,,$@)" $@ + $(FETCHSRC) sdk $(subst $(SOURCEDIR)/,,$@) "https://curl.se/download/$(subst $(SOURCEDIR)/,,$@)" $(CKSUM_LIBCURL) $@ # libexpat $(BUILDSTEPS)/libexpat.d: $(BUILDSTEPS)/builddir.d $(BUILDSTEPS)/libexpat-src.d - mkdir -p $(BUILDDIR)/libexpat - cd $(BUILDDIR)/libexpat && tar xaf $(SOURCEDIR)/expat-$(VERSION_LIBEXPAT).tar.bz2 - cd $(BUILDDIR)/libexpat/expat-$(VERSION_LIBEXPAT) && $(env) ./configure --prefix=$(GCCSDK_INSTALL_ENV) --target=$(TARGET) --host=$(TARGET) --disable-shared - cd $(BUILDDIR)/libexpat/expat-$(VERSION_LIBEXPAT) && $(env) make install + cd $(BUILDDIR)/libexpat/expat-$(VERSION_LIBEXPAT) && $(env) $(LIBEXPAT_ENV) ./configure --prefix=$(GCCSDK_INSTALL_ENV) --target=$(TARGET) --host=$(TARGET) --disable-shared + cd $(BUILDDIR)/libexpat/expat-$(VERSION_LIBEXPAT) && $(env) $(LIBEXPAT_ENV) make install touch $@ $(BUILDSTEPS)/libexpat-src.d: $(BUILDSTEPS)/sourcedir.d $(SOURCEDIR)/expat-$(VERSION_LIBEXPAT).tar.bz2 + mkdir -p $(BUILDDIR)/libexpat + cd $(BUILDDIR)/libexpat && tar xaf $(SOURCEDIR)/expat-$(VERSION_LIBEXPAT).tar.bz2 +ifneq ($(realpath $(RECIPES)/patches/libexpat/$(TARGET)),) + for p in `ls $(RECIPES)/patches/libexpat/$(TARGET)/*.p` ; do $(PATCH) -d $(BUILDDIR)/libexpat/expat-$(VERSION_LIBEXPAT) -p0 <$$p ; done +endif touch $@ $(SOURCEDIR)/expat-$(VERSION_LIBEXPAT).tar.bz2: - $(FETCHSRC) sdk $(subst $(SOURCEDIR)/,,$@) "http://downloads.sourceforge.net/project/expat/expat/$(VERSION_LIBEXPAT)/expat-$(VERSION_LIBEXPAT).tar.bz2" $@ + $(FETCHSRC) sdk $(subst $(SOURCEDIR)/,,$@) "https://github.com/libexpat/libexpat/releases/download/R_$(subst .,_,$(VERSION_LIBEXPAT))/expat-$(VERSION_LIBEXPAT).tar.bz2" $(CKSUM_LIBEXPAT) $@ diff --git a/sdk/fetchsrc b/sdk/fetchsrc index 46b72b0..6a7b3b8 100755 --- a/sdk/fetchsrc +++ b/sdk/fetchsrc @@ -4,15 +4,18 @@ set -x # script to fetch toolchain source tar using ci.netsurf-browser.org as a cache -# Usage fetchsrc <target> <source> <upstream> <output> +# Usage fetchsrc <target> <source> <upstream> <sha256sum> <output> -NSSRV="http://ci.netsurf-browser.org/toolchain/" +NSSRV="https://ci.netsurf-browser.org/toolchain/" -wget -q -O ${4} ${NSSRV}/${1}/${2} +wget -q -O ${5} ${NSSRV}/${1}/${2} if [ $? -ne 0 ];then - wget -q -O ${4} ${3} + wget -q -O ${5} ${3} if [ $? -ne 0 ];then - rm ${4} + rm ${5} exit 1 fi fi + +echo "${4} *${5}" | sha256sum --strict -c - +exit $? diff --git a/sdk/recipes/files/freetype/m5475-atari-mint/builds/unix/config.sub b/sdk/recipes/files/freetype/m5475-atari-mint/builds/unix/config.sub new file mode 100755 index 0000000..ba37cf9 --- /dev/null +++ b/sdk/recipes/files/freetype/m5475-atari-mint/builds/unix/config.sub @@ -0,0 +1,1805 @@ +#! /bin/sh +# Configuration validation subroutine script. +# Copyright 1992-2018 Free Software Foundation, Inc. + +timestamp='2018-04-24' + +# This file is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, see <https://www.gnu.org/licenses/>. +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that +# program. This Exception is an additional permission under section 7 +# of the GNU General Public License, version 3 ("GPLv3"). + + +# Please send patches to <config-patches@gnu.org>. +# +# Configuration subroutine to validate and canonicalize a configuration type. +# Supply the specified configuration type as an argument. +# If it is invalid, we print an error message on stderr and exit with code 1. +# Otherwise, we print the canonical config type on stdout and succeed. + +# You can get the latest version of this script from: +# https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub + +# This file is supposed to be the same for all GNU packages +# and recognize all the CPU types, system types and aliases +# that are meaningful with *any* GNU software. +# Each package is responsible for reporting which valid configurations +# it does not support. The user should be able to distinguish +# a failure to support a valid configuration from a meaningless +# configuration. + +# The goal of this file is to map all the various variations of a given +# machine specification into a single specification in the form: +# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM +# or in some cases, the newer four-part form: +# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM +# It is wrong to echo any other type of specification. + +me=`echo "$0" | sed -e 's,.*/,,'` + +usage="\ +Usage: $0 [OPTION] CPU-MFR-OPSYS or ALIAS + +Canonicalize a configuration name. + +Options: + -h, --help print this help, then exit + -t, --time-stamp print date of last modification, then exit + -v, --version print version number, then exit + +Report bugs and patches to <config-patches@gnu.org>." + +version="\ +GNU config.sub ($timestamp) + +Copyright 1992-2018 Free Software Foundation, Inc. + +This is free software; see the source for copying conditions. There is NO +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." + +help=" +Try \`$me --help' for more information." + +# Parse command line +while test $# -gt 0 ; do + case $1 in + --time-stamp | --time* | -t ) + echo "$timestamp" ; exit ;; + --version | -v ) + echo "$version" ; exit ;; + --help | --h* | -h ) + echo "$usage"; exit ;; + -- ) # Stop option processing + shift; break ;; + - ) # Use stdin as input. + break ;; + -* ) + echo "$me: invalid option $1$help" + exit 1 ;; + + *local*) + # First pass through any local machine types. + echo "$1" + exit ;; + + * ) + break ;; + esac +done + +case $# in + 0) echo "$me: missing argument$help" >&2 + exit 1;; + 1) ;; + *) echo "$me: too many arguments$help" >&2 + exit 1;; +esac + +# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). +# Here we must recognize all the valid KERNEL-OS combinations. +maybe_os=`echo "$1" | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` +case $maybe_os in + nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \ + linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ + knetbsd*-gnu* | netbsd*-gnu* | netbsd*-eabi* | \ + kopensolaris*-gnu* | cloudabi*-eabi* | \ + storm-chaos* | os2-emx* | rtmk-nova*) + os=-$maybe_os + basic_machine=`echo "$1" | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` + ;; + android-linux) + os=-linux-android + basic_machine=`echo "$1" | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown + ;; + *) + basic_machine=`echo "$1" | sed 's/-[^-]*$//'` + if [ "$basic_machine" != "$1" ] + then os=`echo "$1" | sed 's/.*-/-/'` + else os=; fi + ;; +esac + +### Let's recognize common machines as not being operating systems so +### that things like config.sub decstation-3100 work. We also +### recognize some manufacturers as not being operating systems, so we +### can provide default operating systems below. +case $os in + -sun*os*) + # Prevent following clause from handling this invalid input. + ;; + -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ + -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ + -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ + -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ + -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ + -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ + -apple | -axis | -knuth | -cray | -microblaze*) + os= + basic_machine=$1 + ;; + -bluegene*) + os=-cnk + ;; + -sim | -cisco | -oki | -wec | -winbond) + os= + basic_machine=$1 + ;; + -scout) + ;; + -wrs) + os=-vxworks + basic_machine=$1 + ;; + -chorusos*) + os=-chorusos + basic_machine=$1 + ;; + -chorusrdb) + os=-chorusrdb + basic_machine=$1 + ;; + -hiux*) + os=-hiuxwe2 + ;; + -sco6) + os=-sco5v6 + basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` + ;; + -sco5) + os=-sco3.2v5 + basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` + ;; + -sco4) + os=-sco3.2v4 + basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` + ;; + -sco3.2.[4-9]*) + os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` + basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` + ;; + -sco3.2v[4-9]*) + # Don't forget version if it is 3.2v4 or newer. + basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` + ;; + -sco5v6*) + # Don't forget version if it is 3.2v4 or newer. + basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` + ;; + -sco*) + os=-sco3.2v2 + basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` + ;; + -udk*) + basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` + ;; + -isc) + os=-isc2.2 + basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` + ;; + -clix*) + basic_machine=clipper-intergraph + ;; + -isc*) + basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` + ;; + -lynx*178) + os=-lynxos178 + ;; + -lynx*5) + os=-lynxos5 + ;; + -lynx*) + os=-lynxos + ;; + -ptx*) + basic_machine=`echo "$1" | sed -e 's/86-.*/86-sequent/'` + ;; + -psos*) + os=-psos + ;; + -mint | -mint[0-9]*) + basic_machine=m68k-atari + os=-mint + ;; +esac + +# Decode aliases for certain CPU-COMPANY combinations. +case $basic_machine in + # Recognize the basic CPU types without company name. + # Some are omitted here because they have special meanings below. + 1750a | 580 \ + | a29k \ + | aarch64 | aarch64_be \ + | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ + | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ + | am33_2.0 \ + | arc | arceb \ + | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv6m | armv[78][arm] \ + | avr | avr32 \ + | ba \ + | be32 | be64 \ + | bfin \ + | c4x | c8051 | clipper | csky \ + | d10v | d30v | dlx | dsp16xx \ + | e2k | epiphany \ + | fido | fr30 | frv | ft32 \ + | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ + | hexagon \ + | i370 | i860 | i960 | ia16 | ia64 \ + | ip2k | iq2000 \ + | k1om \ + | le32 | le64 \ + | lm32 \ + | m32c | m32r | m32rle | m68000 | m68k | m88k \ + | maxq | mb | microblaze | microblazeel | mcore | mep | metag \ + | mips | mipsbe | mipseb | mipsel | mipsle \ + | mips16 \ + | mips64 | mips64el \ + | mips64octeon | mips64octeonel \ + | mips64orion | mips64orionel \ + | mips64r5900 | mips64r5900el \ + | mips64vr | mips64vrel \ + | mips64vr4100 | mips64vr4100el \ + | mips64vr4300 | mips64vr4300el \ + | mips64vr5000 | mips64vr5000el \ + | mips64vr5900 | mips64vr5900el \ + | mipsisa32 | mipsisa32el \ + | mipsisa32r2 | mipsisa32r2el \ + | mipsisa32r6 | mipsisa32r6el \ + | mipsisa64 | mipsisa64el \ + | mipsisa64r2 | mipsisa64r2el \ + | mipsisa64r6 | mipsisa64r6el \ + | mipsisa64sb1 | mipsisa64sb1el \ + | mipsisa64sr71k | mipsisa64sr71kel \ + | mipsr5900 | mipsr5900el \ + | mipstx39 | mipstx39el \ + | mn10200 | mn10300 \ + | moxie \ + | mt \ + | msp430 \ + | nds32 | nds32le | nds32be \ + | nios | nios2 | nios2eb | nios2el \ + | ns16k | ns32k \ + | open8 | or1k | or1knd | or32 \ + | pdp10 | pj | pjl \ + | powerpc | powerpc64 | powerpc64le | powerpcle \ + | pru \ + | pyramid \ + | riscv32 | riscv64 \ + | rl78 | rx \ + | score \ + | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[234]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ + | sh64 | sh64le \ + | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ + | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ + | spu \ + | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \ + | ubicom32 \ + | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \ + | visium \ + | wasm32 \ + | x86 | xc16x | xstormy16 | xtensa \ + | z8k | z80) + basic_machine=$basic_machine-unknown + ;; + c54x) + basic_machine=tic54x-unknown + ;; + c55x) + basic_machine=tic55x-unknown + ;; + c6x) + basic_machine=tic6x-unknown + ;; + leon|leon[3-9]) + basic_machine=sparc-$basic_machine + ;; + m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip) + basic_machine=$basic_machine-unknown + os=-none + ;; + m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65) + ;; + m9s12z | m68hcs12z | hcs12z | s12z) + basic_machine=s12z-unknown + os=-none + ;; + ms1) + basic_machine=mt-unknown + ;; + + strongarm | thumb | xscale) + basic_machine=arm-unknown + ;; + xgate) + basic_machine=$basic_machine-unknown + os=-none + ;; + xscaleeb) + basic_machine=armeb-unknown + ;; + + xscaleel) + basic_machine=armel-unknown + ;; + + # We use `pc' rather than `unknown' + # because (1) that's what they normally are, and + # (2) the word "unknown" tends to confuse beginning users. + i*86 | x86_64) + basic_machine=$basic_machine-pc + ;; + # Object if more than one company name word. + *-*-*) + echo Invalid configuration \`"$1"\': machine \`"$basic_machine"\' not recognized 1>&2 + exit 1 + ;; + # Recognize the basic CPU types with company name. + 580-* \ + | a29k-* \ + | aarch64-* | aarch64_be-* \ + | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ + | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ + | alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \ + | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ + | avr-* | avr32-* \ + | ba-* \ + | be32-* | be64-* \ + | bfin-* | bs2000-* \ + | c[123]* | c30-* | [cjt]90-* | c4x-* \ + | c8051-* | clipper-* | craynv-* | csky-* | cydra-* \ + | d10v-* | d30v-* | dlx-* \ + | e2k-* | elxsi-* \ + | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ + | h8300-* | h8500-* \ + | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ + | hexagon-* \ + | i*86-* | i860-* | i960-* | ia16-* | ia64-* \ + | ip2k-* | iq2000-* \ + | k1om-* \ + | le32-* | le64-* \ + | lm32-* \ + | m32c-* | m32r-* | m32rle-* \ + | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ + | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \ + | microblaze-* | microblazeel-* \ + | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ + | mips16-* \ + | mips64-* | mips64el-* \ + | mips64octeon-* | mips64octeonel-* \ + | mips64orion-* | mips64orionel-* \ + | mips64r5900-* | mips64r5900el-* \ + | mips64vr-* | mips64vrel-* \ + | mips64vr4100-* | mips64vr4100el-* \ + | mips64vr4300-* | mips64vr4300el-* \ + | mips64vr5000-* | mips64vr5000el-* \ + | mips64vr5900-* | mips64vr5900el-* \ + | mipsisa32-* | mipsisa32el-* \ + | mipsisa32r2-* | mipsisa32r2el-* \ + | mipsisa32r6-* | mipsisa32r6el-* \ + | mipsisa64-* | mipsisa64el-* \ + | mipsisa64r2-* | mipsisa64r2el-* \ + | mipsisa64r6-* | mipsisa64r6el-* \ + | mipsisa64sb1-* | mipsisa64sb1el-* \ + | mipsisa64sr71k-* | mipsisa64sr71kel-* \ + | mipsr5900-* | mipsr5900el-* \ + | mipstx39-* | mipstx39el-* \ + | mmix-* \ + | mt-* \ + | msp430-* \ + | nds32-* | nds32le-* | nds32be-* \ + | nios-* | nios2-* | nios2eb-* | nios2el-* \ + | none-* | np1-* | ns16k-* | ns32k-* \ + | open8-* \ + | or1k*-* \ + | orion-* \ + | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ + | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \ + | pru-* \ + | pyramid-* \ + | riscv32-* | riscv64-* \ + | rl78-* | romp-* | rs6000-* | rx-* \ + | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ + | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ + | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ + | sparclite-* \ + | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx*-* \ + | tahoe-* \ + | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ + | tile*-* \ + | tron-* \ + | ubicom32-* \ + | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \ + | vax-* \ + | visium-* \ + | wasm32-* \ + | we32k-* \ + | x86-* | x86_64-* | xc16x-* | xps100-* \ + | xstormy16-* | xtensa*-* \ + | ymp-* \ + | z8k-* | z80-*) + ;; + # Recognize the basic CPU types without company name, with glob match. + xtensa*) + basic_machine=$basic_machine-unknown + ;; + # Recognize the various machine names and aliases which stand + # for a CPU type and a company and sometimes even an OS. + 386bsd) + basic_machine=i386-pc + os=-bsd + ;; + 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) + basic_machine=m68000-att + ;; + 3b*) + basic_machine=we32k-att + ;; + a29khif) + basic_machine=a29k-amd + os=-udi + ;; + abacus) + basic_machine=abacus-unknown + ;; + adobe68k) + basic_machine=m68010-adobe + os=-scout + ;; + alliant | fx80) + basic_machine=fx80-alliant + ;; + altos | altos3068) + basic_machine=m68k-altos + ;; + am29k) + basic_machine=a29k-none + os=-bsd + ;; + amd64) + basic_machine=x86_64-pc + ;; + amd64-*) + basic_machine=x86_64-`echo "$basic_machine" | sed 's/^[^-]*-//'` + ;; + amdahl) + basic_machine=580-amdahl + os=-sysv + ;; + amiga | amiga-*) + basic_machine=m68k-unknown + ;; + amigaos | amigados) + basic_machine=m68k-unknown + os=-amigaos + ;; + amigaunix | amix) + basic_machine=m68k-unknown + os=-sysv4 + ;; + apollo68) + basic_machine=m68k-apollo + os=-sysv + ;; + apollo68bsd) + basic_machine=m68k-apollo + os=-bsd + ;; + aros) + basic_machine=i386-pc + os=-aros + ;; + asmjs) + basic_machine=asmjs-unknown + ;; + aux) + basic_machine=m68k-apple + os=-aux + ;; + balance) + basic_machine=ns32k-sequent + os=-dynix + ;; + blackfin) + basic_machine=bfin-unknown + os=-linux + ;; + blackfin-*) + basic_machine=bfin-`echo "$basic_machine" | sed 's/^[^-]*-//'` + os=-linux + ;; + bluegene*) + basic_machine=powerpc-ibm + os=-cnk + ;; + c54x-*) + basic_machine=tic54x-`echo "$basic_machine" | sed 's/^[^-]*-//'` + ;; + c55x-*) + basic_machine=tic55x-`echo "$basic_machine" | sed 's/^[^-]*-//'` + ;; + c6x-*) + basic_machine=tic6x-`echo "$basic_machine" | sed 's/^[^-]*-//'` + ;; + c90) + basic_machine=c90-cray + os=-unicos + ;; + cegcc) + basic_machine=arm-unknown + os=-cegcc + ;; + convex-c1) + basic_machine=c1-convex + os=-bsd + ;; + convex-c2) + basic_machine=c2-convex + os=-bsd + ;; + convex-c32) + basic_machine=c32-convex + os=-bsd + ;; + convex-c34) + basic_machine=c34-convex + os=-bsd + ;; + convex-c38) + basic_machine=c38-convex + os=-bsd + ;; + cray | j90) + basic_machine=j90-cray + os=-unicos + ;; + craynv) + basic_machine=craynv-cray + os=-unicosmp + ;; + cr16 | cr16-*) + basic_machine=cr16-unknown + os=-elf + ;; + crds | unos) + basic_machine=m68k-crds + ;; + crisv32 | crisv32-* | etraxfs*) + basic_machine=crisv32-axis + ;; + cris | cris-* | etrax*) + basic_machine=cris-axis + ;; + crx) + basic_machine=crx-unknown + os=-elf + ;; + da30 | da30-*) + basic_machine=m68k-da30 + ;; + decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) + basic_machine=mips-dec + ;; + decsystem10* | dec10*) + basic_machine=pdp10-dec + os=-tops10 + ;; + decsystem20* | dec20*) + basic_machine=pdp10-dec + os=-tops20 + ;; + delta | 3300 | motorola-3300 | motorola-delta \ + | 3300-motorola | delta-motorola) + basic_machine=m68k-motorola + ;; + delta88) + basic_machine=m88k-motorola + os=-sysv3 + ;; + dicos) + basic_machine=i686-pc + os=-dicos + ;; + djgpp) + basic_machine=i586-pc + os=-msdosdjgpp + ;; + dpx20 | dpx20-*) + basic_machine=rs6000-bull + os=-bosx + ;; + dpx2*) + basic_machine=m68k-bull + os=-sysv3 + ;; + e500v[12]) + basic_machine=powerpc-unknown + os=$os"spe" + ;; + e500v[12]-*) + basic_machine=powerpc-`echo "$basic_machine" | sed 's/^[^-]*-//'` + os=$os"spe" + ;; + ebmon29k) + basic_machine=a29k-amd + os=-ebmon + ;; + elxsi) + basic_machine=elxsi-elxsi + os=-bsd + ;; + encore | umax | mmax) + basic_machine=ns32k-encore + ;; + es1800 | OSE68k | ose68k | ose | OSE) + basic_machine=m68k-ericsson + os=-ose + ;; + fx2800) + basic_machine=i860-alliant + ;; + genix) + basic_machine=ns32k-ns + ;; + gmicro) + basic_machine=tron-gmicro + os=-sysv + ;; + go32) + basic_machine=i386-pc + os=-go32 + ;; + h3050r* | hiux*) + basic_machine=hppa1.1-hitachi + os=-hiuxwe2 + ;; + h8300hms) + basic_machine=h8300-hitachi + os=-hms + ;; + h8300xray) + basic_machine=h8300-hitachi + os=-xray + ;; + h8500hms) + basic_machine=h8500-hitachi + os=-hms + ;; + harris) + basic_machine=m88k-harris + os=-sysv3 + ;; + hp300-*) + basic_machine=m68k-hp + ;; + hp300bsd) + basic_machine=m68k-hp + os=-bsd + ;; + hp300hpux) + basic_machine=m68k-hp + os=-hpux + ;; + hp3k9[0-9][0-9] | hp9[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; + hp9k2[0-9][0-9] | hp9k31[0-9]) + basic_machine=m68000-hp + ;; + hp9k3[2-9][0-9]) + basic_machine=m68k-hp + ;; + hp9k6[0-9][0-9] | hp6[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; + hp9k7[0-79][0-9] | hp7[0-79][0-9]) + basic_machine=hppa1.1-hp + ;; + hp9k78[0-9] | hp78[0-9]) + # FIXME: really hppa2.0-hp + basic_machine=hppa1.1-hp + ;; + hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) + # FIXME: really hppa2.0-hp + basic_machine=hppa1.1-hp + ;; + hp9k8[0-9][13679] | hp8[0-9][13679]) + basic_machine=hppa1.1-hp + ;; + hp9k8[0-9][0-9] | hp8[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; + hppaosf) + basic_machine=hppa1.1-hp + os=-osf + ;; + hppro) + basic_machine=hppa1.1-hp + os=-proelf + ;; + i370-ibm* | ibm*) + basic_machine=i370-ibm + ;; + i*86v32) + basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'` + os=-sysv32 + ;; + i*86v4*) + basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'` + os=-sysv4 + ;; + i*86v) + basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'` + os=-sysv + ;; + i*86sol2) + basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'` + os=-solaris2 + ;; + i386mach) + basic_machine=i386-mach + os=-mach + ;; + vsta) + basic_machine=i386-unknown + os=-vsta + ;; + iris | iris4d) + basic_machine=mips-sgi + case $os in + -irix*) + ;; + *) + os=-irix4 + ;; + esac + ;; + isi68 | isi) + basic_machine=m68k-isi + os=-sysv + ;; + leon-*|leon[3-9]-*) + basic_machine=sparc-`echo "$basic_machine" | sed 's/-.*//'` + ;; + m68knommu) + basic_machine=m68k-unknown + os=-linux + ;; + m68knommu-*) + basic_machine=m68k-`echo "$basic_machine" | sed 's/^[^-]*-//'` + os=-linux + ;; + magnum | m3230) + basic_machine=mips-mips + os=-sysv + ;; + merlin) + basic_machine=ns32k-utek + os=-sysv + ;; + microblaze*) + basic_machine=microblaze-xilinx + ;; + mingw64) + basic_machine=x86_64-pc + os=-mingw64 + ;; + mingw32) + basic_machine=i686-pc + os=-mingw32 + ;; + mingw32ce) + basic_machine=arm-unknown + os=-mingw32ce + ;; + miniframe) + basic_machine=m68000-convergent + ;; + *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) + basic_machine=m68k-atari + os=-mint + ;; + mips3*-*) + basic_machine=`echo "$basic_machine" | sed -e 's/mips3/mips64/'` + ;; + mips3*) + basic_machine=`echo "$basic_machine" | sed -e 's/mips3/mips64/'`-unknown + ;; + monitor) + basic_machine=m68k-rom68k + os=-coff + ;; + morphos) + basic_machine=powerpc-unknown + os=-morphos + ;; + moxiebox) + basic_machine=moxie-unknown + os=-moxiebox + ;; + msdos) + basic_machine=i386-pc + os=-msdos + ;; + ms1-*) + basic_machine=`echo "$basic_machine" | sed -e 's/ms1-/mt-/'` + ;; + msys) + basic_machine=i686-pc + os=-msys + ;; + mvs) + basic_machine=i370-ibm + os=-mvs + ;; + nacl) + basic_machine=le32-unknown + os=-nacl + ;; + ncr3000) + basic_machine=i486-ncr + os=-sysv4 + ;; + netbsd386) + basic_machine=i386-unknown + os=-netbsd + ;; + netwinder) + basic_machine=armv4l-rebel + os=-linux + ;; + news | news700 | news800 | news900) + basic_machine=m68k-sony + os=-newsos + ;; + news1000) + basic_machine=m68030-sony + os=-newsos + ;; + news-3600 | risc-news) + basic_machine=mips-sony + os=-newsos + ;; + necv70) + basic_machine=v70-nec + os=-sysv + ;; + next | m*-next) + basic_machine=m68k-next + case $os in + -nextstep* ) + ;; + -ns2*) + os=-nextstep2 + ;; + *) + os=-nextstep3 + ;; + esac + ;; + nh3000) + basic_machine=m68k-harris + os=-cxux + ;; + nh[45]000) + basic_machine=m88k-harris + os=-cxux + ;; + nindy960) + basic_machine=i960-intel + os=-nindy + ;; + mon960) + basic_machine=i960-intel + os=-mon960 + ;; + nonstopux) + basic_machine=mips-compaq + os=-nonstopux + ;; + np1) + basic_machine=np1-gould + ;; + neo-tandem) + basic_machine=neo-tandem + ;; + nse-tandem) + basic_machine=nse-tandem + ;; + nsr-tandem) + basic_machine=nsr-tandem + ;; + nsv-tandem) + basic_machine=nsv-tandem + ;; + nsx-tandem) + basic_machine=nsx-tandem + ;; + op50n-* | op60c-*) + basic_machine=hppa1.1-oki + os=-proelf + ;; + openrisc | openrisc-*) + basic_machine=or32-unknown + ;; + os400) + basic_machine=powerpc-ibm + os=-os400 + ;; + OSE68000 | ose68000) + basic_machine=m68000-ericsson + os=-ose + ;; + os68k) + basic_machine=m68k-none + os=-os68k + ;; + pa-hitachi) + basic_machine=hppa1.1-hitachi + os=-hiuxwe2 + ;; + paragon) + basic_machine=i860-intel + os=-osf + ;; + parisc) + basic_machine=hppa-unknown + os=-linux + ;; + parisc-*) + basic_machine=hppa-`echo "$basic_machine" | sed 's/^[^-]*-//'` + os=-linux + ;; + pbd) + basic_machine=sparc-tti + ;; + pbb) + basic_machine=m68k-tti + ;; + pc532 | pc532-*) + basic_machine=ns32k-pc532 + ;; + pc98) + basic_machine=i386-pc + ;; + pc98-*) + basic_machine=i386-`echo "$basic_machine" | sed 's/^[^-]*-//'` + ;; + pentium | p5 | k5 | k6 | nexgen | viac3) + basic_machine=i586-pc + ;; + pentiumpro | p6 | 6x86 | athlon | athlon_*) + basic_machine=i686-pc + ;; + pentiumii | pentium2 | pentiumiii | pentium3) + basic_machine=i686-pc + ;; + pentium4) + basic_machine=i786-pc + ;; + pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) + basic_machine=i586-`echo "$basic_machine" | sed 's/^[^-]*-//'` + ;; + pentiumpro-* | p6-* | 6x86-* | athlon-*) + basic_machine=i686-`echo "$basic_machine" | sed 's/^[^-]*-//'` + ;; + pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) + basic_machine=i686-`echo "$basic_machine" | sed 's/^[^-]*-//'` + ;; + pentium4-*) + basic_machine=i786-`echo "$basic_machine" | sed 's/^[^-]*-//'` + ;; + pn) + basic_machine=pn-gould + ;; + power) basic_machine=power-ibm + ;; + ppc | ppcbe) basic_machine=powerpc-unknown + ;; + ppc-* | ppcbe-*) + basic_machine=powerpc-`echo "$basic_machine" | sed 's/^[^-]*-//'` + ;; + ppcle | powerpclittle) + basic_machine=powerpcle-unknown + ;; + ppcle-* | powerpclittle-*) + basic_machine=powerpcle-`echo "$basic_machine" | sed 's/^[^-]*-//'` + ;; + ppc64) basic_machine=powerpc64-unknown + ;; + ppc64-*) basic_machine=powerpc64-`echo "$basic_machine" | sed 's/^[^-]*-//'` + ;; + ppc64le | powerpc64little) + basic_machine=powerpc64le-unknown + ;; + ppc64le-* | powerpc64little-*) + basic_machine=powerpc64le-`echo "$basic_machine" | sed 's/^[^-]*-//'` + ;; + ps2) + basic_machine=i386-ibm + ;; + pw32) + basic_machine=i586-unknown + os=-pw32 + ;; + rdos | rdos64) + basic_machine=x86_64-pc + os=-rdos + ;; + rdos32) + basic_machine=i386-pc + os=-rdos + ;; + rom68k) + basic_machine=m68k-rom68k + os=-coff + ;; + rm[46]00) + basic_machine=mips-siemens + ;; + rtpc | rtpc-*) + basic_machine=romp-ibm + ;; + s390 | s390-*) + basic_machine=s390-ibm + ;; + s390x | s390x-*) + basic_machine=s390x-ibm + ;; + sa29200) + basic_machine=a29k-amd + os=-udi + ;; + sb1) + basic_machine=mipsisa64sb1-unknown + ;; + sb1el) + basic_machine=mipsisa64sb1el-unknown + ;; + sde) + basic_machine=mipsisa32-sde + os=-elf + ;; + sei) + basic_machine=mips-sei + os=-seiux + ;; + sequent) + basic_machine=i386-sequent + ;; + sh5el) + basic_machine=sh5le-unknown + ;; + simso-wrs) + basic_machine=sparclite-wrs + os=-vxworks + ;; + sps7) + basic_machine=m68k-bull + os=-sysv2 + ;; + spur) + basic_machine=spur-unknown + ;; + st2000) + basic_machine=m68k-tandem + ;; + stratus) + basic_machine=i860-stratus + os=-sysv4 + ;; + strongarm-* | thumb-*) + basic_machine=arm-`echo "$basic_machine" | sed 's/^[^-]*-//'` + ;; + sun2) + basic_machine=m68000-sun + ;; + sun2os3) + basic_machine=m68000-sun + os=-sunos3 + ;; + sun2os4) + basic_machine=m68000-sun + os=-sunos4 + ;; + sun3os3) + basic_machine=m68k-sun + os=-sunos3 + ;; + sun3os4) + basic_machine=m68k-sun + os=-sunos4 + ;; + sun4os3) + basic_machine=sparc-sun + os=-sunos3 + ;; + sun4os4) + basic_machine=sparc-sun + os=-sunos4 + ;; + sun4sol2) + basic_machine=sparc-sun + os=-solaris2 + ;; + sun3 | sun3-*) + basic_machine=m68k-sun + ;; + sun4) + basic_machine=sparc-sun + ;; + sun386 | sun386i | roadrunner) + basic_machine=i386-sun + ;; + sv1) + basic_machine=sv1-cray + os=-unicos + ;; + symmetry) + basic_machine=i386-sequent + os=-dynix + ;; + t3e) + basic_machine=alphaev5-cray + os=-unicos + ;; + t90) + basic_machine=t90-cray + os=-unicos + ;; + tile*) + basic_machine=$basic_machine-unknown + os=-linux-gnu + ;; + tx39) + basic_machine=mipstx39-unknown + ;; + tx39el) + basic_machine=mipstx39el-unknown + ;; + toad1) + basic_machine=pdp10-xkl + os=-tops20 + ;; + tower | tower-32) + basic_machine=m68k-ncr + ;; + tpf) + basic_machine=s390x-ibm + os=-tpf + ;; + udi29k) + basic_machine=a29k-amd + os=-udi + ;; + ultra3) + basic_machine=a29k-nyu + os=-sym1 + ;; + v810 | necv810) + basic_machine=v810-nec + os=-none + ;; + vaxv) + basic_machine=vax-dec + os=-sysv + ;; + vms) + basic_machine=vax-dec + os=-vms + ;; + vpp*|vx|vx-*) + basic_machine=f301-fujitsu + ;; + vxworks960) + basic_machine=i960-wrs + os=-vxworks + ;; + vxworks68) + basic_machine=m68k-wrs + os=-vxworks + ;; + vxworks29k) + basic_machine=a29k-wrs + os=-vxworks + ;; + w65*) + basic_machine=w65-wdc + os=-none + ;; + w89k-*) + basic_machine=hppa1.1-winbond + os=-proelf + ;; + x64) + basic_machine=x86_64-pc + ;; + xbox) + basic_machine=i686-pc + os=-mingw32 + ;; + xps | xps100) + basic_machine=xps100-honeywell + ;; + xscale-* | xscalee[bl]-*) + basic_machine=`echo "$basic_machine" | sed 's/^xscale/arm/'` + ;; + ymp) + basic_machine=ymp-cray + os=-unicos + ;; + none) + basic_machine=none-none + os=-none + ;; + +# Here we handle the default manufacturer of certain CPU types. It is in +# some cases the only manufacturer, in others, it is the most popular. + w89k) + basic_machine=hppa1.1-winbond + ;; + op50n) + basic_machine=hppa1.1-oki + ;; + op60c) + basic_machine=hppa1.1-oki + ;; + romp) + basic_machine=romp-ibm + ;; + mmix) + basic_machine=mmix-knuth + ;; + rs6000) + basic_machine=rs6000-ibm + ;; + vax) + basic_machine=vax-dec + ;; + pdp11) + basic_machine=pdp11-dec + ;; + we32k) + basic_machine=we32k-att + ;; + sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele) + basic_machine=sh-unknown + ;; + cydra) + basic_machine=cydra-cydrome + ;; + orion) + basic_machine=orion-highlevel + ;; + orion105) + basic_machine=clipper-highlevel + ;; + mac | mpw | mac-mpw) + basic_machine=m68k-apple + ;; + pmac | pmac-mpw) + basic_machine=powerpc-apple + ;; + *-unknown) + # Make sure to match an already-canonicalized machine name. + ;; + *) + echo Invalid configuration \`"$1"\': machine \`"$basic_machine"\' not recognized 1>&2 + exit 1 + ;; +esac + +# Here we canonicalize certain aliases for manufacturers. +case $basic_machine in + *-digital*) + basic_machine=`echo "$basic_machine" | sed 's/digital.*/dec/'` + ;; + *-commodore*) + basic_machine=`echo "$basic_machine" | sed 's/commodore.*/cbm/'` + ;; + *) + ;; +esac + +# Decode manufacturer-specific aliases for certain operating systems. + +if [ x"$os" != x"" ] +then +case $os in + # First match some system type aliases that might get confused + # with valid system types. + # -solaris* is a basic system type, with this one exception. + -auroraux) + os=-auroraux + ;; + -solaris1 | -solaris1.*) + os=`echo $os | sed -e 's|solaris1|sunos4|'` + ;; + -solaris) + os=-solaris2 + ;; + -unixware*) + os=-sysv4.2uw + ;; + -gnu/linux*) + os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` + ;; + # es1800 is here to avoid being matched by es* (a different OS) + -es1800*) + os=-ose + ;; + # Now accept the basic system types. + # The portable systems comes first. + # Each alternative MUST end in a * to match a version number. + # -sysv* is not here because it comes later, after sysvr4. + -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ + | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ + | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ + | -sym* | -kopensolaris* | -plan9* \ + | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ + | -aos* | -aros* | -cloudabi* | -sortix* \ + | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ + | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ + | -hiux* | -knetbsd* | -mirbsd* | -netbsd* \ + | -bitrig* | -openbsd* | -solidbsd* | -libertybsd* \ + | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ + | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ + | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ + | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* | -hcos* \ + | -chorusos* | -chorusrdb* | -cegcc* | -glidix* \ + | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ + | -midipix* | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \ + | -linux-newlib* | -linux-musl* | -linux-uclibc* \ + | -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \ + | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* \ + | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ + | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ + | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ + | -morphos* | -superux* | -rtmk* | -windiss* \ + | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ + | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* \ + | -onefs* | -tirtos* | -phoenix* | -fuchsia* | -redox* | -bme* \ + | -midnightbsd*) + # Remember, each alternative MUST END IN *, to match a version number. + ;; + -qnx*) + case $basic_machine in + x86-* | i*86-*) + ;; + *) + os=-nto$os + ;; + esac + ;; + -nto-qnx*) + ;; + -nto*) + os=`echo $os | sed -e 's|nto|nto-qnx|'` + ;; + -sim | -xray | -os68k* | -v88r* \ + | -windows* | -osx | -abug | -netware* | -os9* \ + | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) + ;; + -mac*) + os=`echo "$os" | sed -e 's|mac|macos|'` + ;; + -linux-dietlibc) + os=-linux-dietlibc + ;; + -linux*) + os=`echo $os | sed -e 's|linux|linux-gnu|'` + ;; + -sunos5*) + os=`echo "$os" | sed -e 's|sunos5|solaris2|'` + ;; + -sunos6*) + os=`echo "$os" | sed -e 's|sunos6|solaris3|'` + ;; + -opened*) + os=-openedition + ;; + -os400*) + os=-os400 + ;; + -wince*) + os=-wince + ;; + -utek*) + os=-bsd + ;; + -dynix*) + os=-bsd + ;; + -acis*) + os=-aos + ;; + -atheos*) + os=-atheos + ;; + -syllable*) + os=-syllable + ;; + -386bsd) + os=-bsd + ;; + -ctix* | -uts*) + os=-sysv + ;; + -nova*) + os=-rtmk-nova + ;; + -ns2) + os=-nextstep2 + ;; + -nsk*) + os=-nsk + ;; + # Preserve the version number of sinix5. + -sinix5.*) + os=`echo $os | sed -e 's|sinix|sysv|'` + ;; + -sinix*) + os=-sysv4 + ;; + -tpf*) + os=-tpf + ;; + -triton*) + os=-sysv3 + ;; + -oss*) + os=-sysv3 + ;; + -svr4*) + os=-sysv4 + ;; + -svr3) + os=-sysv3 + ;; + -sysvr4) + os=-sysv4 + ;; + # This must come after -sysvr4. + -sysv*) + ;; + -ose*) + os=-ose + ;; + -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) + os=-mint + ;; + -zvmoe) + os=-zvmoe + ;; + -dicos*) + os=-dicos + ;; + -pikeos*) + # Until real need of OS specific support for + # particular features comes up, bare metal + # configurations are quite functional. + case $basic_machine in + arm*) + os=-eabi + ;; + *) + os=-elf + ;; + esac + ;; + -nacl*) + ;; + -ios) + ;; + -none) + ;; + *) + # Get rid of the `-' at the beginning of $os. + os=`echo $os | sed 's/[^-]*-//'` + echo Invalid configuration \`"$1"\': system \`"$os"\' not recognized 1>&2 + exit 1 + ;; +esac +else + +# Here we handle the default operating systems that come with various machines. +# The value should be what the vendor currently ships out the door with their +# machine or put another way, the most popular os provided with the machine. + +# Note that if you're going to try to match "-MANUFACTURER" here (say, +# "-sun"), then you have to tell the case statement up towards the top +# that MANUFACTURER isn't an operating system. Otherwise, code above +# will signal an error saying that MANUFACTURER isn't an operating +# system, and we'll never get to this point. + +case $basic_machine in + score-*) + os=-elf + ;; + spu-*) + os=-elf + ;; + *-acorn) + os=-riscix1.2 + ;; + arm*-rebel) + os=-linux + ;; + arm*-semi) + os=-aout + ;; + c4x-* | tic4x-*) + os=-coff + ;; + c8051-*) + os=-elf + ;; + hexagon-*) + os=-elf + ;; + tic54x-*) + os=-coff + ;; + tic55x-*) + os=-coff + ;; + tic6x-*) + os=-coff + ;; + # This must come before the *-dec entry. + pdp10-*) + os=-tops20 + ;; + pdp11-*) + os=-none + ;; + *-dec | vax-*) + os=-ultrix4.2 + ;; + m68*-apollo) + os=-domain + ;; + i386-sun) + os=-sunos4.0.2 + ;; + m68000-sun) + os=-sunos3 + ;; + m68*-cisco) + os=-aout + ;; + mep-*) + os=-elf + ;; + mips*-cisco) + os=-elf + ;; + mips*-*) + os=-elf + ;; + or32-*) + os=-coff + ;; + *-tti) # must be before sparc entry or we get the wrong os. + os=-sysv3 + ;; + sparc-* | *-sun) + os=-sunos4.1.1 + ;; + pru-*) + os=-elf + ;; + *-be) + os=-beos + ;; + *-ibm) + os=-aix + ;; + *-knuth) + os=-mmixware + ;; + *-wec) + os=-proelf + ;; + *-winbond) + os=-proelf + ;; + *-oki) + os=-proelf + ;; + *-hp) + os=-hpux + ;; + *-hitachi) + os=-hiux + ;; + i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) + os=-sysv + ;; + *-cbm) + os=-amigaos + ;; + *-dg) + os=-dgux + ;; + *-dolphin) + os=-sysv3 + ;; + m68k-ccur) + os=-rtu + ;; + m88k-omron*) + os=-luna + ;; + *-next) + os=-nextstep + ;; + *-sequent) + os=-ptx + ;; + *-crds) + os=-unos + ;; + *-ns) + os=-genix + ;; + i370-*) + os=-mvs + ;; + *-gould) + os=-sysv + ;; + *-highlevel) + os=-bsd + ;; + *-encore) + os=-bsd + ;; + *-sgi) + os=-irix + ;; + *-siemens) + os=-sysv4 + ;; + *-masscomp) + os=-rtu + ;; + f30[01]-fujitsu | f700-fujitsu) + os=-uxpv + ;; + *-rom68k) + os=-coff + ;; + *-*bug) + os=-coff + ;; + *-apple) + os=-macos + ;; + *-atari*) + os=-mint + ;; + *) + os=-none + ;; +esac +fi + +# Here we handle the case where we know the os, and the CPU type, but not the +# manufacturer. We pick the logical manufacturer. +vendor=unknown +case $basic_machine in + *-unknown) + case $os in + -riscix*) + vendor=acorn + ;; + -sunos*) + vendor=sun + ;; + -cnk*|-aix*) + vendor=ibm + ;; + -beos*) + vendor=be + ;; + -hpux*) + vendor=hp + ;; + -mpeix*) + vendor=hp + ;; + -hiux*) + vendor=hitachi + ;; + -unos*) + vendor=crds + ;; + -dgux*) + vendor=dg + ;; + -luna*) + vendor=omron + ;; + -genix*) + vendor=ns + ;; + -mvs* | -opened*) + vendor=ibm + ;; + -os400*) + vendor=ibm + ;; + -ptx*) + vendor=sequent + ;; + -tpf*) + vendor=ibm + ;; + -vxsim* | -vxworks* | -windiss*) + vendor=wrs + ;; + -aux*) + vendor=apple + ;; + -hms*) + vendor=hitachi + ;; + -mpw* | -macos*) + vendor=apple + ;; + -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) + vendor=atari + ;; + -vos*) + vendor=stratus + ;; + esac + basic_machine=`echo "$basic_machine" | sed "s/unknown/$vendor/"` + ;; +esac + +echo "$basic_machine$os" +exit + +# Local variables: +# eval: (add-hook 'before-save-hook 'time-stamp) +# time-stamp-start: "timestamp='" +# time-stamp-format: "%:y-%02m-%02d" +# time-stamp-end: "'" +# End: diff --git a/sdk/recipes/files/openssl/m68k-unknown-amigaos/crypto/rand/rand_amiga.c b/sdk/recipes/files/openssl/m68k-unknown-amigaos/crypto/rand/rand_amiga.c deleted file mode 100644 index 3c18b7d..0000000 --- a/sdk/recipes/files/openssl/m68k-unknown-amigaos/crypto/rand/rand_amiga.c +++ /dev/null @@ -1,189 +0,0 @@ -#include <openssl/rand.h> -#include <openssl/sha.h> -#include "rand_lcl.h" - -#if defined(OPENSSL_SYS_AMIGAOS3) || defined(OPENSSL_SYS_AMIGAOS4) -#define __USE_INLINE__ 1 - -#include <proto/exec.h> -#include <proto/timer.h> -#include <devices/timer.h> - -/* Maximum number of attempts to get a delay of 1 microsecond that is not equal to 0 */ -#define MAX_ATTEMPTS 1000 - -#ifdef __amigaos4__ - -#ifdef CreateMsgPort -#undef CreateMsgPort -#endif -#define CreateMsgPort() AllocSysObject(ASOT_PORT,NULL) -#ifdef DeleteMsgPort -#undef DeleteMsgPort -#endif -#define DeleteMsgPort(msgPort) FreeSysObject(ASOT_PORT,msgPort) -#ifdef CreateIORequest -#undef CreateIORequest -#endif -#define CreateIORequest(ioReplyPort,size) AllocSysObjectTags(ASOT_IOREQUEST,ASOIOR_ReplyPort,ioReplyPort,ASOIOR_Size,size,TAG_DONE) -#ifdef DeleteIORequest -#undef DeleteIORequest -#endif -#define DeleteIORequest(ioReq) FreeSysObject(ASOT_IOREQUEST,ioReq) - -#else - -#define GetInterface(a, b, c, d) 1 -#define DropInterface(x) - -/* OS3 has a different but compatible TimeVal definition */ -struct TimeVal -{ - ULONG Seconds; - ULONG Microseconds; -}; - -/* ...and ditto for TimeRequest */ -struct TimeRequest -{ - struct IORequest Request; - struct TimeVal Time; -}; - -#endif /* !__amigaos4__ */ - -int RAND_poll(void) -{ - unsigned char temp_buffer[SHA_DIGEST_LENGTH], data_buffer[SHA_DIGEST_LENGTH]; - struct MsgPort *port = NULL; - double entropy_added = 0; - struct TimeRequest *time_request = NULL; -#ifdef __amigaos4__ - struct IOStdReq *entropy_request = NULL; - - if ((port = CreateMsgPort()) - && (entropy_request = (struct IOStdReq *)CreateIORequest(port, sizeof(*entropy_request)))) - { - if (OpenDevice(TIMERNAME, UNIT_ENTROPY, (struct IORequest *)entropy_request, 0) == 0) - { - while(entropy_added < ENTROPY_NEEDED) - { - entropy_request->io_Command = TR_READENTROPY; - entropy_request->io_Data = &temp_buffer[0]; - entropy_request->io_Length = sizeof(temp_buffer); - - if (DoIO((struct IORequest *)entropy_request) == 0) - { - SHA1(&temp_buffer[0], sizeof(temp_buffer), &data_buffer[0]); - RAND_add(&data_buffer[0], sizeof(data_buffer), sizeof(data_buffer)); - entropy_added += sizeof(data_buffer); - } - else - break; - } - - CloseDevice((struct IORequest *)entropy_request); - } - } - - DeleteIORequest((struct IORequest *)entropy_request); -#endif /* __amigaos4__ */ - - /* The following block will be used on "classic" machines. It does not generate - * a high degree of randomness, but it does the job since RAND_poll is - * called only once by OpenSSL to generate a 32 byte seed. - */ - if (entropy_added < ENTROPY_NEEDED - && (port || (port = CreateMsgPort())) - && (time_request = (struct TimeRequest *)CreateIORequest(port, sizeof(*time_request)))) - { - if (OpenDevice(TIMERNAME, UNIT_VBLANK, (struct IORequest *)time_request, 0) == 0) - { - #if defined(__amigaos4__) - struct TimerIFace *ITimer = NULL; - #endif - struct Device *TimerBase; - - if ((TimerBase = time_request->Request.io_Device) - #if defined(__amigaos4__) - && (ITimer = (struct TimerIFace *)GetInterface((struct Library *)TimerBase, "main", 1, NULL)) - #endif - ) - { - struct EClockVal curr_eclock; - ULONG prev_ev_lo = 0; - struct TimeVal tv; - int i, attempt; - BOOL aborted; - - ReadEClock(&curr_eclock); - aborted = FALSE; - - while(!aborted && entropy_added < ENTROPY_NEEDED) - { - for(i = 0; - !aborted && i < (int)sizeof(temp_buffer) - (int)sizeof(ULONG); - i++) - { - attempt = 0; - - /* Ask for a one microsecond delay and measure the time - * the delay actually took. - */ - do - { - time_request->Request.io_Command = TR_ADDREQUEST; - time_request->Time.Seconds = 0; - time_request->Time.Microseconds = 1; - - if (DoIO((struct IORequest *)time_request) == 0) - { - prev_ev_lo = curr_eclock.ev_lo; - ReadEClock(&curr_eclock); - - attempt++; - } - else - aborted = TRUE; - } while(!aborted && prev_ev_lo == 0 && attempt < MAX_ATTEMPTS); - - if (attempt >= MAX_ATTEMPTS) - aborted = TRUE; - - /* Since we are going for randomness, ev_hi is irrelevant */ - temp_buffer[i] = (unsigned char)(curr_eclock.ev_lo - prev_ev_lo); - } - - GetSysTime(&tv); - - if (sizeof(temp_buffer) > sizeof(ULONG)) - *(ULONG *)&temp_buffer[sizeof(temp_buffer) - sizeof(ULONG)] - = tv.Microseconds; - - /* Shuffle the bits around and specify that about - * one fourth of it adds to the entropy. - */ - if (!aborted) - { - SHA1(&temp_buffer[0], sizeof(temp_buffer), &data_buffer[0]); - RAND_add(&data_buffer[0], sizeof(data_buffer), (double)sizeof(data_buffer) / 4); - entropy_added += sizeof(data_buffer) / 4; - } - } - } - - #if defined(__amigaos4__) - DropInterface((struct Interface *)ITimer); - #endif - CloseDevice((struct IORequest *)time_request); - } - } - - DeleteIORequest((struct IORequest *)time_request); - - DeleteMsgPort(port); - - return(entropy_added >= ENTROPY_NEEDED); -} - -#endif /* OPENSSL_SYS_AMIGA */ diff --git a/sdk/recipes/files/openssl/m68k-unknown-amigaos/providers/implementations/rands/seeding/rand_amiga.c b/sdk/recipes/files/openssl/m68k-unknown-amigaos/providers/implementations/rands/seeding/rand_amiga.c new file mode 100644 index 0000000..205d527 --- /dev/null +++ b/sdk/recipes/files/openssl/m68k-unknown-amigaos/providers/implementations/rands/seeding/rand_amiga.c @@ -0,0 +1,282 @@ +#include "internal/cryptlib.h" +#include <openssl/rand.h> +#include <openssl/sha.h> +#include "crypto/rand_pool.h" +#include "crypto/rand.h" +#include "prov/seeding.h" + +#if defined(OPENSSL_SYS_AMIGAOS3) || defined(OPENSSL_SYS_AMIGAOS4) + +# ifndef OPENSSL_RAND_SEED_OS +# error "Unsupported seeding method configured; must be os" +# endif + +#define __USE_INLINE__ 1 + +#include <sys/types.h> +#include <time.h> +#include <unistd.h> + +#include <proto/exec.h> +#include <proto/timer.h> +#include <devices/timer.h> + +/* Maximum number of attempts to get a delay of 1 microsecond that is not equal to 0 */ +#define MAX_ATTEMPTS 1000 + +#ifdef __amigaos4__ + +#ifdef CreateMsgPort +#undef CreateMsgPort +#endif +#define CreateMsgPort() AllocSysObject(ASOT_PORT,NULL) +#ifdef DeleteMsgPort +#undef DeleteMsgPort +#endif +#define DeleteMsgPort(msgPort) FreeSysObject(ASOT_PORT,msgPort) +#ifdef CreateIORequest +#undef CreateIORequest +#endif +#define CreateIORequest(ioReplyPort,size) AllocSysObjectTags(ASOT_IOREQUEST,ASOIOR_ReplyPort,ioReplyPort,ASOIOR_Size,size,TAG_DONE) +#ifdef DeleteIORequest +#undef DeleteIORequest +#endif +#define DeleteIORequest(ioReq) FreeSysObject(ASOT_IOREQUEST,ioReq) + +#else + +#define GetInterface(a, b, c, d) 1 +#define DropInterface(x) + +/* OS3 has a different but compatible TimeVal definition */ +struct TimeVal +{ + ULONG Seconds; + ULONG Microseconds; +}; + +/* ... and ditto for TimeRequest */ +struct TimeRequest +{ + struct IORequest Request; + struct TimeVal Time; +}; + +#endif /* !__amigaos4__ */ + +size_t ossl_pool_acquire_entropy(RAND_POOL *pool) +{ + unsigned char temp_buffer[SHA_DIGEST_LENGTH], data_buffer[SHA_DIGEST_LENGTH]; + struct MsgPort *port = NULL; + size_t bytes_needed; + size_t entropy_available = 0; + struct TimeRequest *time_request = NULL; +#ifdef __amigaos4__ + struct IOStdReq *entropy_request = NULL; + + bytes_needed = ossl_rand_pool_bytes_needed(pool, 1); + + if ((port = CreateMsgPort()) + && (entropy_request = (struct IOStdReq *)CreateIORequest(port, sizeof(*entropy_request)))) + { + if (OpenDevice(TIMERNAME, UNIT_ENTROPY, (struct IORequest *)entropy_request, 0) == 0) + { + while(bytes_needed > 0) + { + entropy_request->io_Command = TR_READENTROPY; + entropy_request->io_Data = &temp_buffer[0]; + entropy_request->io_Length = sizeof(temp_buffer); + + if (DoIO((struct IORequest *)entropy_request) == 0) + { + unsigned char *buffer; + size_t bytes = (bytes_needed < sizeof(data_buffer) ? bytes_needed : sizeof(data_buffer)); + + buffer = ossl_rand_pool_add_begin(pool, bytes_needed); + SHA1(&temp_buffer[0], sizeof(temp_buffer), &data_buffer[0]); + memcpy(buffer, data_buffer, bytes); + ossl_rand_pool_add_end(pool, bytes, 8 * bytes); + bytes_needed -= bytes; + } + else + break; + } + + CloseDevice((struct IORequest *)entropy_request); + } + } + + DeleteIORequest((struct IORequest *)entropy_request); + + entropy_available = ossl_rand_pool_entropy_available(pool); + if (entropy_available > 0) + return entropy_available; +#endif /* __amigaos4__ */ + + /* The following block will be used on "classic" machines. It does not generate + * a high degree of randomness, but it does the job since RAND_poll is + * called only once by OpenSSL to generate a 32 byte seed. + */ + + bytes_needed = ossl_rand_pool_bytes_needed(pool, 1); + + if (bytes_needed > 0 + && (port || (port = CreateMsgPort())) + && (time_request = (struct TimeRequest *)CreateIORequest(port, sizeof(*time_request)))) + { + if (OpenDevice(TIMERNAME, UNIT_VBLANK, (struct IORequest *)time_request, 0) == 0) + { + #if defined(__amigaos4__) + struct TimerIFace *ITimer = NULL; + #endif + struct Device *TimerBase; + + if ((TimerBase = time_request->Request.io_Device) + #if defined(__amigaos4__) + && (ITimer = (struct TimerIFace *)GetInterface((struct Library *)TimerBase, "main", 1, NULL)) + #endif + ) + { + struct EClockVal curr_eclock; + ULONG prev_ev_lo = 0; + struct TimeVal tv; + int i, attempt; + BOOL aborted; + + ReadEClock(&curr_eclock); + aborted = FALSE; + + while(!aborted && bytes_needed > 0) + { + for(i = 0; + !aborted && i < (int)sizeof(temp_buffer) - (int)sizeof(ULONG); + i++) + { + attempt = 0; + + /* Ask for a one microsecond delay and measure the time + * the delay actually took. + */ + do + { + time_request->Request.io_Command = TR_ADDREQUEST; + time_request->Time.Seconds = 0; + time_request->Time.Microseconds = 1; + + if (DoIO((struct IORequest *)time_request) == 0) + { + prev_ev_lo = curr_eclock.ev_lo; + ReadEClock(&curr_eclock); + + attempt++; + } + else + aborted = TRUE; + } while(!aborted && prev_ev_lo == 0 && attempt < MAX_ATTEMPTS); + + if (attempt >= MAX_ATTEMPTS) + aborted = TRUE; + + /* Since we are going for randomness, ev_hi is irrelevant */ + temp_buffer[i] = (unsigned char)(curr_eclock.ev_lo - prev_ev_lo); + } + + GetSysTime(&tv); + + if (sizeof(temp_buffer) > sizeof(ULONG)) + *(ULONG *)&temp_buffer[sizeof(temp_buffer) - sizeof(ULONG)] + = tv.Microseconds; + + /* Shuffle the bits around and specify that about + * one fourth of it adds to the entropy. + */ + if (!aborted) + { + unsigned char *buffer; + size_t bytes = (bytes_needed < sizeof(data_buffer) ? bytes_needed : sizeof(data_buffer)); + + SHA1(&temp_buffer[0], sizeof(temp_buffer), &data_buffer[0]); + + ossl_rand_pool_add_end(pool, bytes, (sizeof(data_buffer) / 4) * 8); + bytes_needed -= bytes; + } + } + } + + #if defined(__amigaos4__) + DropInterface((struct Interface *)ITimer); + #endif + CloseDevice((struct IORequest *)time_request); + } + } + + DeleteIORequest((struct IORequest *)time_request); + + DeleteMsgPort(port); + + return ossl_rand_pool_entropy_available(pool); +} + +int ossl_pool_add_nonce_data(RAND_POOL *pool) +{ + struct { + pid_t pid; + CRYPTO_THREAD_ID tid; + uint64_t time; + } data; + + /* Erase the entire structure including any padding */ + memset(&data, 0, sizeof(data)); + + /* + * Add process id, thread id, and a high resolution timestamp to + * ensure that the nonce is unique with high probability for + * different process instances. + */ + data.pid = getpid(); + data.tid = CRYPTO_THREAD_get_current_id(); + /*XXX: can this be improved? */ + data.time = time(NULL); + + return ossl_rand_pool_add(pool, (unsigned char *)&data, sizeof(data), 0); +} + +int ossl_rand_pool_add_additional_data(RAND_POOL *pool) +{ + struct { + int fork_id; + CRYPTO_THREAD_ID tid; + uint64_t time; + } data; + + /* Erase the entire structure including any padding */ + memset(&data, 0, sizeof(data)); + + /* + * Add some noise from the thread id and a high resolution timer. + * The fork_id adds some extra fork-safety. + * The thread id adds a little randomness if the drbg is accessed + * concurrently (which is the case for the <master> drbg). + */ + data.fork_id = openssl_get_fork_id(); + data.tid = CRYPTO_THREAD_get_current_id(); + /*XXX: can this be improved? */ + data.time = (uint64_t) time(NULL); + + return ossl_rand_pool_add(pool, (unsigned char *)&data, sizeof(data), 0); +} + +int ossl_rand_pool_init(void) +{ + return 1; +} + +void ossl_rand_pool_cleanup(void) +{ +} + +void ossl_rand_pool_keep_random_devices_open(int keep) +{ +} + +#endif /* OPENSSL_SYS_AMIGA */ diff --git a/sdk/recipes/files/openssl/ppc-amigaos/crypto/rand/rand_amiga.c b/sdk/recipes/files/openssl/ppc-amigaos/crypto/rand/rand_amiga.c deleted file mode 100644 index cd3f236..0000000 --- a/sdk/recipes/files/openssl/ppc-amigaos/crypto/rand/rand_amiga.c +++ /dev/null @@ -1,182 +0,0 @@ -#include <openssl/rand.h> -#include <openssl/sha.h> -#include "rand_lcl.h" - -#if defined(OPENSSL_SYS_AMIGAOS3) || defined(OPENSSL_SYS_AMIGAOS4) -#define __USE_INLINE__ 1 - -#include <proto/exec.h> -#include <proto/timer.h> -#include <devices/timer.h> - -/* Maximum number of attempts to get a delay of 1 microsecond that is not equal to 0 */ -#define MAX_ATTEMPTS 1000 - -#ifdef __amigaos4__ - -#ifdef CreateMsgPort -#undef CreateMsgPort -#endif -#define CreateMsgPort() AllocSysObject(ASOT_PORT,NULL) -#ifdef DeleteMsgPort -#undef DeleteMsgPort -#endif -#define DeleteMsgPort(msgPort) FreeSysObject(ASOT_PORT,msgPort) -#ifdef CreateIORequest -#undef CreateIORequest -#endif -#define CreateIORequest(ioReplyPort,size) AllocSysObjectTags(ASOT_IOREQUEST,ASOIOR_ReplyPort,ioReplyPort,ASOIOR_Size,size,TAG_DONE) -#ifdef DeleteIORequest -#undef DeleteIORequest -#endif -#define DeleteIORequest(ioReq) FreeSysObject(ASOT_IOREQUEST,ioReq) - -#else - -#define GetInterface(a, b, c, d) 1 -#define DropInterface(x) - -/* OS3 has a different but compatible TimeVal definition */ -struct TimeVal -{ - uint32 Seconds; - uint32 Microseconds; -}; - -#endif /* !__amigaos4__ */ - -int RAND_poll(void) -{ - unsigned char temp_buffer[SHA_DIGEST_LENGTH], data_buffer[SHA_DIGEST_LENGTH]; - struct MsgPort *port = NULL; - double entropy_added = 0; - struct TimeRequest *time_request = NULL; -#ifdef __amigaos4__ - struct IOStdReq *entropy_request = NULL; - - if ((port = CreateMsgPort()) - && (entropy_request = (struct IOStdReq *)CreateIORequest(port, sizeof(*entropy_request)))) - { - if (OpenDevice(TIMERNAME, UNIT_ENTROPY, (struct IORequest *)entropy_request, 0) == 0) - { - while(entropy_added < ENTROPY_NEEDED) - { - entropy_request->io_Command = TR_READENTROPY; - entropy_request->io_Data = &temp_buffer[0]; - entropy_request->io_Length = sizeof(temp_buffer); - - if (DoIO((struct IORequest *)entropy_request) == 0) - { - SHA1(&temp_buffer[0], sizeof(temp_buffer), &data_buffer[0]); - RAND_add(&data_buffer[0], sizeof(data_buffer), sizeof(data_buffer)); - entropy_added += sizeof(data_buffer); - } - else - break; - } - - CloseDevice((struct IORequest *)entropy_request); - } - } - - DeleteIORequest((struct IORequest *)entropy_request); -#endif /* __amigaos4__ */ - - /* The following block will be used on "classic" machines. It does not generate - * a high degree of randomness, but it does the job since RAND_poll is - * called only once by OpenSSL to generate a 32 byte seed. - */ - if (entropy_added < ENTROPY_NEEDED - && (port || (port = CreateMsgPort())) - && (time_request = (struct TimeRequest *)CreateIORequest(port, sizeof(*time_request)))) - { - if (OpenDevice(TIMERNAME, UNIT_VBLANK, (struct IORequest *)time_request, 0) == 0) - { - #if defined(__amigaos4__) - struct TimerIFace *ITimer = NULL; - #endif - struct Device *TimerBase; - - if ((TimerBase = time_request->Request.io_Device) - #if defined(__amigaos4__) - && (ITimer = (struct TimerIFace *)GetInterface((struct Library *)TimerBase, "main", 1, NULL)) - #endif - ) - { - struct EClockVal curr_eclock; - ULONG prev_ev_lo = 0; - struct TimeVal tv; - int i, attempt; - BOOL aborted; - - ReadEClock(&curr_eclock); - aborted = FALSE; - - while(!aborted && entropy_added < ENTROPY_NEEDED) - { - for(i = 0; - !aborted && i < (int)sizeof(temp_buffer) - (int)sizeof(ULONG); - i++) - { - attempt = 0; - - /* Ask for a one microsecond delay and measure the time - * the delay actually took. - */ - do - { - time_request->Request.io_Command = TR_ADDREQUEST; - time_request->Time.Seconds = 0; - time_request->Time.Microseconds = 1; - - if (DoIO((struct IORequest *)time_request) == 0) - { - prev_ev_lo = curr_eclock.ev_lo; - ReadEClock(&curr_eclock); - - attempt++; - } - else - aborted = TRUE; - } while(!aborted && prev_ev_lo == 0 && attempt < MAX_ATTEMPTS); - - if (attempt >= MAX_ATTEMPTS) - aborted = TRUE; - - /* Since we are going for randomness, ev_hi is irrelevant */ - temp_buffer[i] = (unsigned char)(curr_eclock.ev_lo - prev_ev_lo); - } - - GetSysTime(&tv); - - if (sizeof(temp_buffer) > sizeof(ULONG)) - *(ULONG *)&temp_buffer[sizeof(temp_buffer) - sizeof(ULONG)] - = tv.Microseconds; - - /* Shuffle the bits around and specify that about - * one fourth of it adds to the entropy. - */ - if (!aborted) - { - SHA1(&temp_buffer[0], sizeof(temp_buffer), &data_buffer[0]); - RAND_add(&data_buffer[0], sizeof(data_buffer), (double)sizeof(data_buffer) / 4); - entropy_added += sizeof(data_buffer) / 4; - } - } - } - - #if defined(__amigaos4__) - DropInterface((struct Interface *)ITimer); - #endif - CloseDevice((struct IORequest *)time_request); - } - } - - DeleteIORequest((struct IORequest *)time_request); - - DeleteMsgPort(port); - - return(entropy_added >= ENTROPY_NEEDED); -} - -#endif /* OPENSSL_SYS_AMIGA */ diff --git a/sdk/recipes/files/openssl/ppc-amigaos/providers/implementations/rands/seeding/rand_amiga.c b/sdk/recipes/files/openssl/ppc-amigaos/providers/implementations/rands/seeding/rand_amiga.c new file mode 100644 index 0000000..ed315ed --- /dev/null +++ b/sdk/recipes/files/openssl/ppc-amigaos/providers/implementations/rands/seeding/rand_amiga.c @@ -0,0 +1,275 @@ +#include "internal/cryptlib.h" +#include <openssl/rand.h> +#include <openssl/sha.h> +#include "crypto/rand_pool.h" +#include "crypto/rand.h" +#include "prov/seeding.h" + +#if defined(OPENSSL_SYS_AMIGAOS3) || defined(OPENSSL_SYS_AMIGAOS4) + +# ifndef OPENSSL_RAND_SEED_OS +# error "Unsupported seeding method configured; must be os" +# endif + +#define __USE_INLINE__ 1 + +#include <sys/types.h> +#include <time.h> +#include <unistd.h> + +#include <proto/exec.h> +#include <proto/timer.h> +#include <devices/timer.h> + +/* Maximum number of attempts to get a delay of 1 microsecond that is not equal to 0 */ +#define MAX_ATTEMPTS 1000 + +#ifdef __amigaos4__ + +#ifdef CreateMsgPort +#undef CreateMsgPort +#endif +#define CreateMsgPort() AllocSysObject(ASOT_PORT,NULL) +#ifdef DeleteMsgPort +#undef DeleteMsgPort +#endif +#define DeleteMsgPort(msgPort) FreeSysObject(ASOT_PORT,msgPort) +#ifdef CreateIORequest +#undef CreateIORequest +#endif +#define CreateIORequest(ioReplyPort,size) AllocSysObjectTags(ASOT_IOREQUEST,ASOIOR_ReplyPort,ioReplyPort,ASOIOR_Size,size,TAG_DONE) +#ifdef DeleteIORequest +#undef DeleteIORequest +#endif +#define DeleteIORequest(ioReq) FreeSysObject(ASOT_IOREQUEST,ioReq) + +#else + +#define GetInterface(a, b, c, d) 1 +#define DropInterface(x) + +/* OS3 has a different but compatible TimeVal definition */ +struct TimeVal +{ + uint32 Seconds; + uint32 Microseconds; +}; + +#endif /* !__amigaos4__ */ + +size_t ossl_pool_acquire_entropy(RAND_POOL *pool) +{ + unsigned char temp_buffer[SHA_DIGEST_LENGTH], data_buffer[SHA_DIGEST_LENGTH]; + struct MsgPort *port = NULL; + size_t bytes_needed; + size_t entropy_available = 0; + struct TimeRequest *time_request = NULL; +#ifdef __amigaos4__ + struct IOStdReq *entropy_request = NULL; + + bytes_needed = ossl_rand_pool_bytes_needed(pool, 1); + + if ((port = CreateMsgPort()) + && (entropy_request = (struct IOStdReq *)CreateIORequest(port, sizeof(*entropy_request)))) + { + if (OpenDevice(TIMERNAME, UNIT_ENTROPY, (struct IORequest *)entropy_request, 0) == 0) + { + while(bytes_needed > 0) + { + entropy_request->io_Command = TR_READENTROPY; + entropy_request->io_Data = &temp_buffer[0]; + entropy_request->io_Length = sizeof(temp_buffer); + + if (DoIO((struct IORequest *)entropy_request) == 0) + { + unsigned char *buffer; + size_t bytes = (bytes_needed < sizeof(data_buffer) ? bytes_needed : sizeof(data_buffer)); + + buffer = ossl_rand_pool_add_begin(pool, bytes_needed); + SHA1(&temp_buffer[0], sizeof(temp_buffer), &data_buffer[0]); + memcpy(buffer, data_buffer, bytes); + ossl_rand_pool_add_end(pool, bytes, 8 * bytes); + bytes_needed -= bytes; + } + else + break; + } + + CloseDevice((struct IORequest *)entropy_request); + } + } + + DeleteIORequest((struct IORequest *)entropy_request); + + entropy_available = ossl_rand_pool_entropy_available(pool); + if (entropy_available > 0) + return entropy_available; +#endif /* __amigaos4__ */ + + /* The following block will be used on "classic" machines. It does not generate + * a high degree of randomness, but it does the job since RAND_poll is + * called only once by OpenSSL to generate a 32 byte seed. + */ + + bytes_needed = ossl_rand_pool_bytes_needed(pool, 1); + + if (bytes_needed > 0 + && (port || (port = CreateMsgPort())) + && (time_request = (struct TimeRequest *)CreateIORequest(port, sizeof(*time_request)))) + { + if (OpenDevice(TIMERNAME, UNIT_VBLANK, (struct IORequest *)time_request, 0) == 0) + { + #if defined(__amigaos4__) + struct TimerIFace *ITimer = NULL; + #endif + struct Device *TimerBase; + + if ((TimerBase = time_request->Request.io_Device) + #if defined(__amigaos4__) + && (ITimer = (struct TimerIFace *)GetInterface((struct Library *)TimerBase, "main", 1, NULL)) + #endif + ) + { + struct EClockVal curr_eclock; + ULONG prev_ev_lo = 0; + struct TimeVal tv; + int i, attempt; + BOOL aborted; + + ReadEClock(&curr_eclock); + aborted = FALSE; + + while(!aborted && bytes_needed > 0) + { + for(i = 0; + !aborted && i < (int)sizeof(temp_buffer) - (int)sizeof(ULONG); + i++) + { + attempt = 0; + + /* Ask for a one microsecond delay and measure the time + * the delay actually took. + */ + do + { + time_request->Request.io_Command = TR_ADDREQUEST; + time_request->Time.Seconds = 0; + time_request->Time.Microseconds = 1; + + if (DoIO((struct IORequest *)time_request) == 0) + { + prev_ev_lo = curr_eclock.ev_lo; + ReadEClock(&curr_eclock); + + attempt++; + } + else + aborted = TRUE; + } while(!aborted && prev_ev_lo == 0 && attempt < MAX_ATTEMPTS); + + if (attempt >= MAX_ATTEMPTS) + aborted = TRUE; + + /* Since we are going for randomness, ev_hi is irrelevant */ + temp_buffer[i] = (unsigned char)(curr_eclock.ev_lo - prev_ev_lo); + } + + GetSysTime(&tv); + + if (sizeof(temp_buffer) > sizeof(ULONG)) + *(ULONG *)&temp_buffer[sizeof(temp_buffer) - sizeof(ULONG)] + = tv.Microseconds; + + /* Shuffle the bits around and specify that about + * one fourth of it adds to the entropy. + */ + if (!aborted) + { + unsigned char *buffer; + size_t bytes = (bytes_needed < sizeof(data_buffer) ? bytes_needed : sizeof(data_buffer)); + + SHA1(&temp_buffer[0], sizeof(temp_buffer), &data_buffer[0]); + + ossl_rand_pool_add_end(pool, bytes, (sizeof(data_buffer) / 4) * 8); + bytes_needed -= bytes; + } + } + } + + #if defined(__amigaos4__) + DropInterface((struct Interface *)ITimer); + #endif + CloseDevice((struct IORequest *)time_request); + } + } + + DeleteIORequest((struct IORequest *)time_request); + + DeleteMsgPort(port); + + return ossl_rand_pool_entropy_available(pool); +} + +int ossl_pool_add_nonce_data(RAND_POOL *pool) +{ + struct { + pid_t pid; + CRYPTO_THREAD_ID tid; + uint64_t time; + } data; + + /* Erase the entire structure including any padding */ + memset(&data, 0, sizeof(data)); + + /* + * Add process id, thread id, and a high resolution timestamp to + * ensure that the nonce is unique with high probability for + * different process instances. + */ + data.pid = getpid(); + data.tid = CRYPTO_THREAD_get_current_id(); + /*XXX: can this be improved? */ + data.time = time(NULL); + + return ossl_rand_pool_add(pool, (unsigned char *)&data, sizeof(data), 0); +} + +int ossl_rand_pool_add_additional_data(RAND_POOL *pool) +{ + struct { + int fork_id; + CRYPTO_THREAD_ID tid; + uint64_t time; + } data; + + /* Erase the entire structure including any padding */ + memset(&data, 0, sizeof(data)); + + /* + * Add some noise from the thread id and a high resolution timer. + * The fork_id adds some extra fork-safety. + * The thread id adds a little randomness if the drbg is accessed + * concurrently (which is the case for the <master> drbg). + */ + data.fork_id = openssl_get_fork_id(); + data.tid = CRYPTO_THREAD_get_current_id(); + /*XXX: can this be improved? */ + data.time = (uint64_t) time(NULL); + + return ossl_rand_pool_add(pool, (unsigned char *)&data, sizeof(data), 0); +} + +int ossl_rand_pool_init(void) +{ + return 1; +} + +void ossl_rand_pool_cleanup(void) +{ +} + +void ossl_rand_pool_keep_random_devices_open(int keep) +{ +} + +#endif /* OPENSSL_SYS_AMIGA */ diff --git a/sdk/recipes/patches/libcares/m5475-atari-mint/config.sub.p b/sdk/recipes/patches/libcares/m5475-atari-mint/config.sub.p new file mode 100644 index 0000000..a681d0a --- /dev/null +++ b/sdk/recipes/patches/libcares/m5475-atari-mint/config.sub.p @@ -0,0 +1,11 @@ +--- config.sub.orig 2023-10-01 08:53:00.740777146 +0100 ++++ config.sub 2023-10-01 08:59:22.657161841 +0100 +@@ -1209,7 +1209,7 @@ + | lm32 \ + | loongarch32 | loongarch64 | loongarchx32 \ + | m32c | m32r | m32rle \ +- | m5200 | m68000 | m680[012346]0 | m68360 | m683?2 | m68k \ ++ | m5200 | m5475 | m68000 | m680[012346]0 | m68360 | m683?2 | m68k \ + | m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x \ + | m88110 | m88k | maxq | mb | mcore | mep | metag \ + | microblaze | microblazeel \ diff --git a/sdk/recipes/patches/libcares/m68k-atari-mint/configure.p b/sdk/recipes/patches/libcares/m68k-atari-mint/configure.p deleted file mode 100644 index 254a483..0000000 --- a/sdk/recipes/patches/libcares/m68k-atari-mint/configure.p +++ /dev/null @@ -1,11 +0,0 @@ ---- configure.orig 2011-03-08 23:18:37.000000000 +0000 -+++ configure 2011-03-08 23:18:59.000000000 +0000 -@@ -18503,8 +18503,6 @@ - stdbool.h \ - time.h \ - limits.h \ -- arpa/nameser.h \ -- arpa/nameser_compat.h \ - arpa/inet.h - do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` diff --git a/sdk/recipes/patches/libcares/m68k-unknown-amigaos/ipv6-support.p b/sdk/recipes/patches/libcares/m68k-unknown-amigaos/ipv6-support.p new file mode 100644 index 0000000..ce60c44 --- /dev/null +++ b/sdk/recipes/patches/libcares/m68k-unknown-amigaos/ipv6-support.p @@ -0,0 +1,71 @@ +--- src/lib/ares_ipv6.h.orig 2017-10-10 15:19:45.611896396 +0100 ++++ src/lib/ares_ipv6.h 2017-10-17 15:42:25.304921197 +0100 +@@ -32,6 +32,11 @@ + #endif + ++#ifndef INET6_ADDRSTRLEN ++#define INET6_ADDRSTRLEN 46 ++#endif ++ + #ifndef HAVE_STRUCT_SOCKADDR_IN6 ++#define s6_addr _S6_un._S6_u8 + struct sockaddr_in6 { + unsigned short sin6_family; + unsigned short sin6_port; +--- src/lib/ares__sortaddrinfo.c.orig 2017-10-10 15:19:45.611896396 +0100 ++++ src/lib/ares__sortaddrinfo.c 2017-10-17 15:42:25.304921197 +0100 +@@ -73,6 +73,40 @@ + #define ARES_IN_LOOPBACK(a) \ + ((((long unsigned int)(a)) & 0xff000000) == 0x7f000000) + ++#include <inttypes.h> ++#ifndef IN6_IS_ADDR_LINKLOCAL ++#define IN6_IS_ADDR_LINKLOCAL(a) \ ++ ((((__const uint32_t *) (a))[0] & htonl (0xffc00000)) \ ++ == htonl (0xfe800000)) ++#endif ++#ifndef IN6_IS_ADDR_LOOPBACK ++#define IN6_IS_ADDR_LOOPBACK(a) \ ++ (((__const uint32_t *) (a))[0] == 0 \ ++ && ((__const uint32_t *) (a))[1] == 0 \ ++ && ((__const uint32_t *) (a))[2] == 0 \ ++ && ((__const uint32_t *) (a))[3] == htonl (1)) ++#endif ++#ifndef IN6_IS_ADDR_MULTICAST ++#define IN6_IS_ADDR_MULTICAST(a) (((__const uint8_t *) (a))[0] == 0xff) ++#endif ++#ifndef IN6_IS_ADDR_SITELOCAL ++#define IN6_IS_ADDR_SITELOCAL(a) \ ++ ((((__const uint32_t *) (a))[0] & htonl (0xffc00000)) \ ++ == htonl (0xfec00000)) ++#endif ++#ifndef IN6_IS_ADDR_V4COMPAT ++#define IN6_IS_ADDR_V4COMPAT(a) \ ++ ((((__const uint32_t *) (a))[0] == 0) \ ++ && (((__const uint32_t *) (a))[1] == 0) \ ++ && (((__const uint32_t *) (a))[2] == 0) \ ++ && (ntohl (((__const uint32_t *) (a))[3]) > 1)) ++#endif ++#ifndef IN6_IS_ADDR_V4MAPPED ++#define IN6_IS_ADDR_V4MAPPED(a) \ ++ ((((__const uint32_t *) (a))[0] == 0) \ ++ && (((__const uint32_t *) (a))[1] == 0) \ ++ && (((__const uint32_t *) (a))[2] == htonl (0xffff))) ++#endif + /* RFC 4193. */ + #define ARES_IN6_IS_ADDR_ULA(a) (((a)->s6_addr[0] & 0xfe) == 0xfc) + +@@ -205,8 +239,13 @@ + /* + * Find number of matching initial bits between the two addresses a1 and a2. + */ ++#ifndef HAVE_STRUCT_SOCKADDR_IN6 ++static size_t common_prefix_len(const struct ares_in6_addr *a1, ++ const struct ares_in6_addr *a2) ++#else + static size_t common_prefix_len(const struct in6_addr *a1, + const struct in6_addr *a2) ++#endif + { + const unsigned char *p1 = (const unsigned char *)a1; + const unsigned char *p2 = (const unsigned char *)a2; diff --git a/sdk/recipes/patches/libcares/ppc-amigaos/configure.p b/sdk/recipes/patches/libcares/ppc-amigaos/configure.p deleted file mode 100644 index 254a483..0000000 --- a/sdk/recipes/patches/libcares/ppc-amigaos/configure.p +++ /dev/null @@ -1,11 +0,0 @@ ---- configure.orig 2011-03-08 23:18:37.000000000 +0000 -+++ configure 2011-03-08 23:18:59.000000000 +0000 -@@ -18503,8 +18503,6 @@ - stdbool.h \ - time.h \ - limits.h \ -- arpa/nameser.h \ -- arpa/nameser_compat.h \ - arpa/inet.h - do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` diff --git a/sdk/recipes/patches/libcares/ppc-amigaos/ipv6-support.p b/sdk/recipes/patches/libcares/ppc-amigaos/ipv6-support.p new file mode 100644 index 0000000..f34fb45 --- /dev/null +++ b/sdk/recipes/patches/libcares/ppc-amigaos/ipv6-support.p @@ -0,0 +1,70 @@ +--- src/lib/ares_ipv6.h.orig 2017-10-10 15:19:45.611896396 +0100 ++++ src/lib/ares_ipv6.h 2017-10-17 15:42:25.304921197 +0100 +@@ -32,6 +32,11 @@ + #endif + ++#ifndef INET6_ADDRSTRLEN ++#define INET6_ADDRSTRLEN 46 ++#endif ++ + #ifndef HAVE_STRUCT_SOCKADDR_IN6 ++#define s6_addr _S6_un._S6_u8 + struct sockaddr_in6 { + unsigned short sin6_family; + unsigned short sin6_port; +--- src/lib/ares__sortaddrinfo.c.orig 2017-10-10 15:19:45.611896396 +0100 ++++ src/lib/ares__sortaddrinfo.c 2017-10-17 15:42:25.304921197 +0100 +@@ -73,6 +73,39 @@ + #define ARES_IN_LOOPBACK(a) \ + ((((long unsigned int)(a)) & 0xff000000) == 0x7f000000) + ++#ifndef IN6_IS_ADDR_LINKLOCAL ++#define IN6_IS_ADDR_LINKLOCAL(a) \ ++ ((((__const uint32_t *) (a))[0] & htonl (0xffc00000)) \ ++ == htonl (0xfe800000)) ++#endif ++#ifndef IN6_IS_ADDR_LOOPBACK ++#define IN6_IS_ADDR_LOOPBACK(a) \ ++ (((__const uint32_t *) (a))[0] == 0 \ ++ && ((__const uint32_t *) (a))[1] == 0 \ ++ && ((__const uint32_t *) (a))[2] == 0 \ ++ && ((__const uint32_t *) (a))[3] == htonl (1)) ++#endif ++#ifndef IN6_IS_ADDR_MULTICAST ++#define IN6_IS_ADDR_MULTICAST(a) (((__const uint8_t *) (a))[0] == 0xff) ++#endif ++#ifndef IN6_IS_ADDR_SITELOCAL ++#define IN6_IS_ADDR_SITELOCAL(a) \ ++ ((((__const uint32_t *) (a))[0] & htonl (0xffc00000)) \ ++ == htonl (0xfec00000)) ++#endif ++#ifndef IN6_IS_ADDR_V4COMPAT ++#define IN6_IS_ADDR_V4COMPAT(a) \ ++ ((((__const uint32_t *) (a))[0] == 0) \ ++ && (((__const uint32_t *) (a))[1] == 0) \ ++ && (((__const uint32_t *) (a))[2] == 0) \ ++ && (ntohl (((__const uint32_t *) (a))[3]) > 1)) ++#endif ++#ifndef IN6_IS_ADDR_V4MAPPED ++#define IN6_IS_ADDR_V4MAPPED(a) \ ++ ((((__const uint32_t *) (a))[0] == 0) \ ++ && (((__const uint32_t *) (a))[1] == 0) \ ++ && (((__const uint32_t *) (a))[2] == htonl (0xffff))) ++#endif + /* RFC 4193. */ + #define ARES_IN6_IS_ADDR_ULA(a) (((a)->s6_addr[0] & 0xfe) == 0xfc) + +@@ -205,8 +238,13 @@ + /* + * Find number of matching initial bits between the two addresses a1 and a2. + */ ++#ifndef HAVE_STRUCT_SOCKADDR_IN6 ++static size_t common_prefix_len(const struct ares_in6_addr *a1, ++ const struct ares_in6_addr *a2) ++#else + static size_t common_prefix_len(const struct in6_addr *a1, + const struct in6_addr *a2) ++#endif + { + const unsigned char *p1 = (const unsigned char *)a1; + const unsigned char *p2 = (const unsigned char *)a2; diff --git a/sdk/recipes/patches/libcurl/m5475-atari-mint/config.sub.p b/sdk/recipes/patches/libcurl/m5475-atari-mint/config.sub.p new file mode 100644 index 0000000..a681d0a --- /dev/null +++ b/sdk/recipes/patches/libcurl/m5475-atari-mint/config.sub.p @@ -0,0 +1,11 @@ +--- config.sub.orig 2023-10-01 08:53:00.740777146 +0100 ++++ config.sub 2023-10-01 08:59:22.657161841 +0100 +@@ -1209,7 +1209,7 @@ + | lm32 \ + | loongarch32 | loongarch64 | loongarchx32 \ + | m32c | m32r | m32rle \ +- | m5200 | m68000 | m680[012346]0 | m68360 | m683?2 | m68k \ ++ | m5200 | m5475 | m68000 | m680[012346]0 | m68360 | m683?2 | m68k \ + | m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x \ + | m88110 | m88k | maxq | mb | mcore | mep | metag \ + | microblaze | microblazeel \ diff --git a/sdk/recipes/patches/libcurl/m68k-unknown-amigaos/lib.amigaos.c.p b/sdk/recipes/patches/libcurl/m68k-unknown-amigaos/lib.amigaos.c.p deleted file mode 100644 index 5b6c913..0000000 --- a/sdk/recipes/patches/libcurl/m68k-unknown-amigaos/lib.amigaos.c.p +++ /dev/null @@ -1,11 +0,0 @@ ---- lib/amigaos.c 2014-06-11 18:52:29.000000000 +0100 -+++ lib/amigaos.c 2014-12-20 21:34:06.686013103 +0000 -@@ -22,7 +22,7 @@ - - #include "curl_setup.h" - --#if defined(__AMIGA__) && !defined(__ixemul__) -+#if 0 - - #include <amitcp/socketbasetags.h> - diff --git a/sdk/recipes/patches/libcurl/m68k-unknown-amigaos/lib.amigaos.h.p b/sdk/recipes/patches/libcurl/m68k-unknown-amigaos/lib.amigaos.h.p deleted file mode 100644 index de22d82..0000000 --- a/sdk/recipes/patches/libcurl/m68k-unknown-amigaos/lib.amigaos.h.p +++ /dev/null @@ -1,11 +0,0 @@ ---- lib/amigaos.h 2014-06-11 18:52:29.000000000 +0100 -+++ lib/amigaos.h 2014-12-20 21:34:20.390013061 +0000 -@@ -23,7 +23,7 @@ - ***************************************************************************/ - #include "curl_setup.h" - --#if defined(__AMIGA__) && !defined(__ixemul__) -+#if 0 - - bool Curl_amiga_init(); - void Curl_amiga_cleanup(); diff --git a/sdk/recipes/patches/libcurl/m68k-unknown-amigaos/lib.curl_setup.h.p b/sdk/recipes/patches/libcurl/m68k-unknown-amigaos/lib.curl_setup.h.p index c9b9af3..ba595ca 100644 --- a/sdk/recipes/patches/libcurl/m68k-unknown-amigaos/lib.curl_setup.h.p +++ b/sdk/recipes/patches/libcurl/m68k-unknown-amigaos/lib.curl_setup.h.p @@ -1,10 +1,10 @@ ---- lib/curl_setup.h 2014-08-25 22:45:11.000000000 +0100 -+++ lib/curl_setup.h 2014-12-20 21:35:26.494012868 +0000 -@@ -311,7 +311,6 @@ - # include <exec/execbase.h> - # include <proto/exec.h> - # include <proto/dos.h> --# define select(a,b,c,d,e) WaitSelect(a,b,c,d,e,0) - # endif +--- lib/curl_setup.h.orig 2017-10-10 15:19:45.611896396 +0100 ++++ lib/curl_setup.h 2017-10-17 15:42:25.304921197 +0100 +@@ -314,7 +314,6 @@ + * In clib2 arpa/inet.h warns that some prototypes may clash + * with bsdsocket.library. This avoids the definition of those. + */ +-# define __NO_NET_API #endif + #include <stdio.h> diff --git a/sdk/recipes/patches/libcurl/m68k-unknown-amigaos/src.tool_getpass.c.p b/sdk/recipes/patches/libcurl/m68k-unknown-amigaos/src.tool_getpass.c.p deleted file mode 100644 index 7de5cba..0000000 --- a/sdk/recipes/patches/libcurl/m68k-unknown-amigaos/src.tool_getpass.c.p +++ /dev/null @@ -1,13 +0,0 @@ ---- ./tool_getpass.c 2014-06-11 18:52:29.000000000 +0100 -+++ src/tool_getpass.c 2015-01-05 21:42:31.826011647 +0000 -@@ -24,6 +24,10 @@ - #ifndef HAVE_GETPASS_R - /* this file is only for systems without getpass_r() */ - -+#ifdef __AMIGA__ -+#undef HAVE_TERMIOS_H -+#endif -+ - #ifdef HAVE_FCNTL_H - # include <fcntl.h> - #endif diff --git a/sdk/recipes/patches/libcurl/m68k-unknown-amigaos/src.tool_operate.c.p b/sdk/recipes/patches/libcurl/m68k-unknown-amigaos/src.tool_operate.c.p deleted file mode 100644 index b0feb48..0000000 --- a/sdk/recipes/patches/libcurl/m68k-unknown-amigaos/src.tool_operate.c.p +++ /dev/null @@ -1,18 +0,0 @@ ---- src/tool_operate.c 2017-02-23 22:14:58.000000000 +0000 -+++ src/tool_operate.c 2017-03-26 23:54:19.624614960 +0100 -@@ -1742,15 +1742,6 @@ static CURLcode operate_do(struct Global - } - } - --#ifdef __AMIGA__ -- if(!result && outs.s_isreg && outs.filename) { -- /* Set the url (up to 80 chars) as comment for the file */ -- if(strlen(url) > 78) -- url[79] = '\0'; -- SetComment(outs.filename, url); -- } --#endif -- - #if defined(HAVE_UTIME) || \ - (defined(WIN32) && (CURL_SIZEOF_CURL_OFF_T >= 8)) - /* File time can only be set _after_ the file has been closed */ diff --git a/sdk/recipes/patches/libcurl/ppc-amigaos/lib.amigaos.c.p b/sdk/recipes/patches/libcurl/ppc-amigaos/lib.amigaos.c.p index 9833c94..384bcd5 100644 --- a/sdk/recipes/patches/libcurl/ppc-amigaos/lib.amigaos.c.p +++ b/sdk/recipes/patches/libcurl/ppc-amigaos/lib.amigaos.c.p @@ -1,11 +1,12 @@ ---- lib/amigaos.c.old 2012-10-19 21:37:45.000000000 +0100 -+++ lib/amigaos.c 2012-10-19 21:38:09.000000000 +0100 -@@ -22,7 +22,7 @@ - - #include "curl_setup.h" - --#if defined(__AMIGA__) && !defined(__ixemul__) -+#if defined(__AMIGA__) && !(defined(__ixemul__) || defined(__amigaos4__)) - - #include <amitcp/socketbasetags.h> - +--- lib/amigaos.c.orig 2017-10-10 15:19:45.611896396 +0100 ++++ lib/amigaos.c 2017-10-17 15:42:25.304921197 +0100 +@@ -86,7 +86,9 @@ + ULONG enabled = 0; + + SocketBaseTags(SBTM_SETVAL(SBTC_CAN_SHARE_LIBRARY_BASES), TRUE, ++#ifdef SBTC_HAVE_GETHOSTADDR_R_API + SBTM_GETREF(SBTC_HAVE_GETHOSTADDR_R_API), (ULONG)&enabled, ++#endif + TAG_DONE); + + if(enabled) { diff --git a/sdk/recipes/patches/libcurl/ppc-amigaos/lib.amigaos.h.p b/sdk/recipes/patches/libcurl/ppc-amigaos/lib.amigaos.h.p deleted file mode 100644 index 050bea7..0000000 --- a/sdk/recipes/patches/libcurl/ppc-amigaos/lib.amigaos.h.p +++ /dev/null @@ -1,11 +0,0 @@ ---- lib/amigaos.h.old 2012-10-19 21:36:23.000000000 +0100 -+++ lib/amigaos.h 2012-10-19 21:37:26.000000000 +0100 -@@ -23,7 +23,7 @@ - ***************************************************************************/ - #include "curl_setup.h" - --#if defined(__AMIGA__) && !defined(__ixemul__) -+#if defined(__AMIGA__) && !(defined(__ixemul__) || defined(__amigaos4__)) - - bool Curl_amiga_init(); - void Curl_amiga_cleanup(); diff --git a/sdk/recipes/patches/libcurl/ppc-amigaos/lib.curl_setup.h.p b/sdk/recipes/patches/libcurl/ppc-amigaos/lib.curl_setup.h.p deleted file mode 100644 index 7e47a50..0000000 --- a/sdk/recipes/patches/libcurl/ppc-amigaos/lib.curl_setup.h.p +++ /dev/null @@ -1,23 +0,0 @@ ---- lib/curl_setup.h.old 2012-10-19 21:58:12.000000000 +0100 -+++ lib/curl_setup.h 2012-10-19 21:59:17.000000000 +0100 -@@ -323,11 +323,15 @@ - - #ifdef __AMIGA__ - # ifndef __ixemul__ --# include <exec/types.h> --# include <exec/execbase.h> --# include <proto/exec.h> --# include <proto/dos.h> --# define select(a,b,c,d,e) WaitSelect(a,b,c,d,e,0) -+# ifdef __amigaos4__ -+# include <unistd.h> -+# else -+# include <exec/types.h> -+# include <exec/execbase.h> -+# include <proto/exec.h> -+# include <proto/dos.h> -+# define select(a,b,c,d,e) WaitSelect(a,b,c,d,e,0) -+# endif - # endif - #endif - diff --git a/sdk/recipes/patches/libcurl/ppc-amigaos/lib.hostip4.c.p b/sdk/recipes/patches/libcurl/ppc-amigaos/lib.hostip4.c.p deleted file mode 100644 index b6287ca..0000000 --- a/sdk/recipes/patches/libcurl/ppc-amigaos/lib.hostip4.c.p +++ /dev/null @@ -1,60 +0,0 @@ ---- lib/hostip4.c 2017-03-26 23:41:52.304617207 +0100 -+++ lib/hostip4.c 2017-03-26 23:41:11.000000000 +0100 -@@ -119,6 +119,10 @@ Curl_addrinfo *Curl_getaddrinfo(struct c - * implying that only threadsafe code and function calls may be used. - * - */ -+#ifdef __amigaos4__ -+#include <proto/exec.h> -+#include <proto/bsdsocket.h> -+#endif - Curl_addrinfo *Curl_ipv4_resolve_r(const char *hostname, - int port) - { -@@ -129,6 +133,9 @@ Curl_addrinfo *Curl_ipv4_resolve_r(const - struct hostent *h = NULL; - struct in_addr in; - struct hostent *buf = NULL; -+#ifdef __amigaos4__ -+ struct SocketIFace *ISocket = NULL; -+#endif - - if(Curl_inet_pton(AF_INET, hostname, &in) > 0) - /* This is a dotted IP address 123.123.123.123-style */ -@@ -291,7 +298,20 @@ Curl_addrinfo *Curl_ipv4_resolve_r(const - * gethostbyname() is the preferred one. - */ - else { -+#ifdef __amigaos4__ -+ struct Library *SocketBase = IExec->OpenLibrary("bsdsocket.library", 4); -+ if (SocketBase) -+ { -+ ISocket = (struct SocketIFace *)IExec->GetInterface(SocketBase, "main", 1, NULL); -+ } -+ -+ if (ISocket) -+ { -+ h = ISocket->gethostbyname((void*)hostname); -+ } -+#else - h = gethostbyname((void *)hostname); -+#endif - #endif /* HAVE_GETADDRINFO_THREADSAFE || HAVE_GETHOSTBYNAME_R */ - } - -@@ -301,7 +321,14 @@ Curl_addrinfo *Curl_ipv4_resolve_r(const - if(buf) /* used a *_r() function */ - free(buf); - } -- -+#ifdef __amigaos4__ -+ if (ISocket) -+ { -+ struct Library *SocketBase = ISocket->Data.LibBase; -+ IExec->DropInterface((struct Interface *)ISocket); -+ IExec->CloseLibrary(SocketBase); -+ } -+#endif - return ai; - } - #endif /* defined(CURLRES_IPV4) && !defined(CURLRES_ARES) */ diff --git a/sdk/recipes/patches/libcurl/ppc-amigaos/src.tool_operate.c.p b/sdk/recipes/patches/libcurl/ppc-amigaos/src.tool_operate.c.p deleted file mode 100644 index b0feb48..0000000 --- a/sdk/recipes/patches/libcurl/ppc-amigaos/src.tool_operate.c.p +++ /dev/null @@ -1,18 +0,0 @@ ---- src/tool_operate.c 2017-02-23 22:14:58.000000000 +0000 -+++ src/tool_operate.c 2017-03-26 23:54:19.624614960 +0100 -@@ -1742,15 +1742,6 @@ static CURLcode operate_do(struct Global - } - } - --#ifdef __AMIGA__ -- if(!result && outs.s_isreg && outs.filename) { -- /* Set the url (up to 80 chars) as comment for the file */ -- if(strlen(url) > 78) -- url[79] = '\0'; -- SetComment(outs.filename, url); -- } --#endif -- - #if defined(HAVE_UTIME) || \ - (defined(WIN32) && (CURL_SIZEOF_CURL_OFF_T >= 8)) - /* File time can only be set _after_ the file has been closed */ diff --git a/sdk/recipes/patches/libexpat/m5475-atari-mint/conftools.config.sub.p b/sdk/recipes/patches/libexpat/m5475-atari-mint/conftools.config.sub.p new file mode 100644 index 0000000..90e61b1 --- /dev/null +++ b/sdk/recipes/patches/libexpat/m5475-atari-mint/conftools.config.sub.p @@ -0,0 +1,11 @@ +--- conftools/config.sub.orig 2023-10-01 08:53:00.740777146 +0100 ++++ conftools/config.sub 2023-10-01 08:59:22.657161841 +0100 +@@ -1209,7 +1209,7 @@ + | lm32 \ + | loongarch32 | loongarch64 | loongarchx32 \ + | m32c | m32r | m32rle \ +- | m5200 | m68000 | m680[012346]0 | m68360 | m683?2 | m68k \ ++ | m5200 | m5475 | m68000 | m680[012346]0 | m68360 | m683?2 | m68k \ + | m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x \ + | m88110 | m88k | maxq | mb | mcore | mep | metag \ + | microblaze | microblazeel \ diff --git a/sdk/recipes/patches/libexpat/m68k-unknown-amigaos/xmlwf.xmltchar.h.p b/sdk/recipes/patches/libexpat/m68k-unknown-amigaos/xmlwf.xmltchar.h.p new file mode 100644 index 0000000..c9da0e8 --- /dev/null +++ b/sdk/recipes/patches/libexpat/m68k-unknown-amigaos/xmlwf.xmltchar.h.p @@ -0,0 +1,9 @@ +--- xmlwf/xmltchar.h.orig 2017-10-10 15:19:45.611896396 +0100 ++++ xmlwf/xmltchar.h 2017-10-17 15:42:25.304921197 +0100 +@@ -75,5 +75,5 @@ + # define tremove remove + # define tchar char + # define tcstof strtof +-# define tcstoull strtoull ++# define tcstoull strtoul + #endif /* not XML_UNICODE */ diff --git a/sdk/recipes/patches/libiconv/libcharset.lib.localcharset.c.p b/sdk/recipes/patches/libiconv/libcharset.lib.localcharset.c.p index b456c94..3296a6e 100644 --- a/sdk/recipes/patches/libiconv/libcharset.lib.localcharset.c.p +++ b/sdk/recipes/patches/libiconv/libcharset.lib.localcharset.c.p @@ -1,6 +1,6 @@ --- libcharset/lib/localcharset.c.old 2010-12-29 19:12:21.000000000 +0000 +++ libcharset/lib/localcharset.c 2010-12-29 19:12:49.000000000 +0000 -@@ -352,9 +352,6 @@ +@@ -824,9 +824,6 @@ If the canonical name cannot be determined, the result is a non-canonical name. */ diff --git a/sdk/recipes/patches/libiconv/m5475-atari-mint/build-aux.config.sub.p b/sdk/recipes/patches/libiconv/m5475-atari-mint/build-aux.config.sub.p new file mode 100644 index 0000000..9bacbb8 --- /dev/null +++ b/sdk/recipes/patches/libiconv/m5475-atari-mint/build-aux.config.sub.p @@ -0,0 +1,11 @@ +--- build-aux/config.sub.orig 2023-10-01 08:53:00.740777146 +0100 ++++ build-aux/config.sub 2023-10-01 08:59:22.657161841 +0100 +@@ -1209,7 +1209,7 @@ + | lm32 \ + | loongarch32 | loongarch64 | loongarchx32 \ + | m32c | m32r | m32rle \ +- | m5200 | m68000 | m680[012346]0 | m68360 | m683?2 | m68k \ ++ | m5200 | m5475 | m68000 | m680[012346]0 | m68360 | m683?2 | m68k \ + | m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x \ + | m88110 | m88k | maxq | mb | mcore | mep | metag \ + | microblaze | microblazeel \ diff --git a/sdk/recipes/patches/libiconv/m5475-atari-mint/libcharset.build-aux.config.sub.p b/sdk/recipes/patches/libiconv/m5475-atari-mint/libcharset.build-aux.config.sub.p new file mode 100644 index 0000000..d615e13 --- /dev/null +++ b/sdk/recipes/patches/libiconv/m5475-atari-mint/libcharset.build-aux.config.sub.p @@ -0,0 +1,11 @@ +--- libcharset/build-aux/config.sub.orig 2023-10-01 08:53:00.740777146 +0100 ++++ libcharset/build-aux/config.sub 2023-10-01 08:59:22.657161841 +0100 +@@ -1209,7 +1209,7 @@ + | lm32 \ + | loongarch32 | loongarch64 | loongarchx32 \ + | m32c | m32r | m32rle \ +- | m5200 | m68000 | m680[012346]0 | m68360 | m683?2 | m68k \ ++ | m5200 | m5475 | m68000 | m680[012346]0 | m68360 | m683?2 | m68k \ + | m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x \ + | m88110 | m88k | maxq | mb | mcore | mep | metag \ + | microblaze | microblazeel \ diff --git a/sdk/recipes/patches/libiconv/m68k-unknown-amigaos/srclib.getprogname.c.p b/sdk/recipes/patches/libiconv/m68k-unknown-amigaos/srclib.getprogname.c.p index 3d7938d..ac19b03 100644 --- a/sdk/recipes/patches/libiconv/m68k-unknown-amigaos/srclib.getprogname.c.p +++ b/sdk/recipes/patches/libiconv/m68k-unknown-amigaos/srclib.getprogname.c.p @@ -1,11 +1,11 @@ ---- srclib/getprogname.c 2017-01-01 23:02:21.000000000 +0000 -+++ srclib/getprogname.c 2017-03-26 23:21:25.532012988 +0100 -@@ -144,7 +144,7 @@ getprogname (void) +--- srclib/getprogname.c 2019-04-26 19:29:00.000000000 +0100 ++++ srclib/getprogname.c 2020-03-06 19:32:44.157018596 +0000 +@@ -288,7 +288,7 @@ getprogname (void) } - return p; + return "?"; # else -# error "getprogname module not ported to this OS" -+ const char *p = ""; /* this is never used for anything important */ ++ return ""; /* this is never used for anything important */ # endif } diff --git a/sdk/recipes/patches/libiconv/m68k-unknown-amigaos/srclib.signal.in.h.p b/sdk/recipes/patches/libiconv/m68k-unknown-amigaos/srclib.signal.in.h.p index 8647b83..0102857 100644 --- a/sdk/recipes/patches/libiconv/m68k-unknown-amigaos/srclib.signal.in.h.p +++ b/sdk/recipes/patches/libiconv/m68k-unknown-amigaos/srclib.signal.in.h.p @@ -1,6 +1,6 @@ --- srclib/signal.in.h 2017-01-01 23:02:22.000000000 +0000 +++ srclib/signal.in.h 2017-03-26 22:56:18.360017409 +0100 -@@ -211,69 +211,6 @@ typedef int verify_NSIG_constraint[NSIG +@@ -223,69 +223,6 @@ typedef int verify_NSIG_constraint[NSIG # undef sigismember #endif diff --git a/sdk/recipes/patches/libiconv/m68k-unknown-amigaos/srclib.sigprocmask.c.p b/sdk/recipes/patches/libiconv/m68k-unknown-amigaos/srclib.sigprocmask.c.p index a811881..fbf554a 100644 --- a/sdk/recipes/patches/libiconv/m68k-unknown-amigaos/srclib.sigprocmask.c.p +++ b/sdk/recipes/patches/libiconv/m68k-unknown-amigaos/srclib.sigprocmask.c.p @@ -1,6 +1,6 @@ --- srclib/sigprocmask.c.orig 2011-08-07 14:42:06.000000000 +0100 +++ srclib/sigprocmask.c 2014-01-15 00:59:33.130968152 +0000 -@@ -83,77 +83,6 @@ +@@ -110,77 +110,6 @@ # define signal ext_signal #endif diff --git a/sdk/recipes/patches/libiconv/m68k-unknown-amigaos/srclib.time.in.h.p b/sdk/recipes/patches/libiconv/m68k-unknown-amigaos/srclib.time.in.h.p new file mode 100644 index 0000000..0d10bce --- /dev/null +++ b/sdk/recipes/patches/libiconv/m68k-unknown-amigaos/srclib.time.in.h.p @@ -0,0 +1,11 @@ +--- srclib/time.in.h 2019-01-06 08:51:41.000000000 +0000 ++++ srclib/time.in.h 2020-03-06 19:46:37.429016156 +0000 +@@ -76,7 +76,7 @@ extern "C" { + # define timespec rpl_timespec + struct timespec + { +- time_t tv_sec; ++ time_t tv_secs; + long int tv_nsec; + }; + # define GNULIB_defined_struct_timespec 1 diff --git a/sdk/recipes/patches/libiconv/m68k-unknown-amigaos/srclib.unistd.in.h.p b/sdk/recipes/patches/libiconv/m68k-unknown-amigaos/srclib.unistd.in.h.p index 2e1cf5e..a70f0b5 100644 --- a/sdk/recipes/patches/libiconv/m68k-unknown-amigaos/srclib.unistd.in.h.p +++ b/sdk/recipes/patches/libiconv/m68k-unknown-amigaos/srclib.unistd.in.h.p @@ -1,6 +1,6 @@ --- srclib/unistd.in.h.orig 2017-03-27 23:12:52.149619622 +0100 +++ srclib/unistd.in.h 2017-03-27 23:13:12.582243962 +0100 -@@ -1262,40 +1262,6 @@ +@@ -1873,44 +1873,6 @@ #endif @@ -9,24 +9,28 @@ - bytes of it into BUF. Return the number of bytes placed into BUF if - successful, otherwise -1 and errno set. - See the POSIX:2008 specification -- <http://pubs.opengroup.org/onlinepubs/9699919799/functions/readlink.html>. */ +- <https://pubs.opengroup.org/onlinepubs/9699919799/functions/readlink.html>. */ -# if @REPLACE_READLINK@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define readlink rpl_readlink -# endif -_GL_FUNCDECL_RPL (readlink, ssize_t, -- (const char *file, char *buf, size_t bufsize) +- (const char *restrict file, +- char *restrict buf, size_t bufsize) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (readlink, ssize_t, -- (const char *file, char *buf, size_t bufsize)); +- (const char *restrict file, +- char *restrict buf, size_t bufsize)); -# else -# if !@HAVE_READLINK@ -_GL_FUNCDECL_SYS (readlink, ssize_t, -- (const char *file, char *buf, size_t bufsize) +- (const char *restrict file, +- char *restrict buf, size_t bufsize) - _GL_ARG_NONNULL ((1, 2))); -# endif -_GL_CXXALIAS_SYS (readlink, ssize_t, -- (const char *file, char *buf, size_t bufsize)); +- (const char *restrict file, +- char *restrict buf, size_t bufsize)); -# endif -_GL_CXXALIASWARN (readlink); -#elif defined GNULIB_POSIXCHECK diff --git a/sdk/recipes/patches/libiconv/ppc-amigaos/srclib.getprogname.c.p b/sdk/recipes/patches/libiconv/ppc-amigaos/srclib.getprogname.c.p index 3d7938d..ac19b03 100644 --- a/sdk/recipes/patches/libiconv/ppc-amigaos/srclib.getprogname.c.p +++ b/sdk/recipes/patches/libiconv/ppc-amigaos/srclib.getprogname.c.p @@ -1,11 +1,11 @@ ---- srclib/getprogname.c 2017-01-01 23:02:21.000000000 +0000 -+++ srclib/getprogname.c 2017-03-26 23:21:25.532012988 +0100 -@@ -144,7 +144,7 @@ getprogname (void) +--- srclib/getprogname.c 2019-04-26 19:29:00.000000000 +0100 ++++ srclib/getprogname.c 2020-03-06 19:32:44.157018596 +0000 +@@ -288,7 +288,7 @@ getprogname (void) } - return p; + return "?"; # else -# error "getprogname module not ported to this OS" -+ const char *p = ""; /* this is never used for anything important */ ++ return ""; /* this is never used for anything important */ # endif } diff --git a/sdk/recipes/patches/libiconv/ppc-amigaos/srclib.signal.in.h.p b/sdk/recipes/patches/libiconv/ppc-amigaos/srclib.signal.in.h.p index 8647b83..0102857 100644 --- a/sdk/recipes/patches/libiconv/ppc-amigaos/srclib.signal.in.h.p +++ b/sdk/recipes/patches/libiconv/ppc-amigaos/srclib.signal.in.h.p @@ -1,6 +1,6 @@ --- srclib/signal.in.h 2017-01-01 23:02:22.000000000 +0000 +++ srclib/signal.in.h 2017-03-26 22:56:18.360017409 +0100 -@@ -211,69 +211,6 @@ typedef int verify_NSIG_constraint[NSIG +@@ -223,69 +223,6 @@ typedef int verify_NSIG_constraint[NSIG # undef sigismember #endif diff --git a/sdk/recipes/patches/libiconv/ppc-amigaos/srclib.sigprocmask.c.p b/sdk/recipes/patches/libiconv/ppc-amigaos/srclib.sigprocmask.c.p index a811881..fbf554a 100644 --- a/sdk/recipes/patches/libiconv/ppc-amigaos/srclib.sigprocmask.c.p +++ b/sdk/recipes/patches/libiconv/ppc-amigaos/srclib.sigprocmask.c.p @@ -1,6 +1,6 @@ --- srclib/sigprocmask.c.orig 2011-08-07 14:42:06.000000000 +0100 +++ srclib/sigprocmask.c 2014-01-15 00:59:33.130968152 +0000 -@@ -83,77 +83,6 @@ +@@ -110,77 +110,6 @@ # define signal ext_signal #endif diff --git a/sdk/recipes/patches/libjpegturbo/ppc-amigaos/jmemmgr.c.p b/sdk/recipes/patches/libjpegturbo/ppc-amigaos/jmemmgr.c.p deleted file mode 100644 index f0bf615..0000000 --- a/sdk/recipes/patches/libjpegturbo/ppc-amigaos/jmemmgr.c.p +++ /dev/null @@ -1,10 +0,0 @@ ---- jmemmgr.c.old 2016-10-05 22:58:26.559475774 +0000 -+++ jmemmgr.c 2016-10-05 23:00:00.731473878 +0000 -@@ -32,6 +32,7 @@ - #include "jinclude.h" - #include "jpeglib.h" - #include "jmemsys.h" /* import the system-dependent declarations */ -+#include <limits.h> - #include <stdint.h> - - #ifndef NO_GETENV diff --git a/sdk/recipes/patches/libjpegturbo/ppc-amigaos/simd.jsimd_powerpc.c.p b/sdk/recipes/patches/libjpegturbo/ppc-amigaos/simd.jsimd_powerpc.c.p deleted file mode 100644 index 4220c5d..0000000 --- a/sdk/recipes/patches/libjpegturbo/ppc-amigaos/simd.jsimd_powerpc.c.p +++ /dev/null @@ -1,26 +0,0 @@ ---- simd/jsimd_powerpc.c -+++ simd/jsimd_powerpc.c -@@ -14,6 +14,10 @@ - * PowerPC architecture. - */ - -+#ifdef __amigaos4__ -+#include <proto/exec.h> -+#endif -+ - #define JPEG_INTERNALS - #include "../jinclude.h" - #include "../jpeglib.h" -@@ -116,6 +120,11 @@ init_simd (void) - if (bufsize > SOMEWHAT_SANE_PROC_CPUINFO_SIZE_LIMIT) - break; - } -+#elif defined(__amigaos4__) -+ uint32 altivec = 0; -+ IExec->GetCPUInfoTags(GCIT_VectorUnit, &altivec, TAG_DONE); -+ if(altivec == VECTORTYPE_ALTIVEC) -+ simd_support |= JSIMD_ALTIVEC; - #endif - - /* Force different settings through environment variables */ - diff --git a/sdk/recipes/patches/libpng/m5475-atari-mint/config.sub.p b/sdk/recipes/patches/libpng/m5475-atari-mint/config.sub.p new file mode 100644 index 0000000..a681d0a --- /dev/null +++ b/sdk/recipes/patches/libpng/m5475-atari-mint/config.sub.p @@ -0,0 +1,11 @@ +--- config.sub.orig 2023-10-01 08:53:00.740777146 +0100 ++++ config.sub 2023-10-01 08:59:22.657161841 +0100 +@@ -1209,7 +1209,7 @@ + | lm32 \ + | loongarch32 | loongarch64 | loongarchx32 \ + | m32c | m32r | m32rle \ +- | m5200 | m68000 | m680[012346]0 | m68360 | m683?2 | m68k \ ++ | m5200 | m5475 | m68000 | m680[012346]0 | m68360 | m683?2 | m68k \ + | m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x \ + | m88110 | m88k | maxq | mb | mcore | mep | metag \ + | microblaze | microblazeel \ diff --git a/sdk/recipes/patches/libwebp/configure.ac.p b/sdk/recipes/patches/libwebp/configure.ac.p new file mode 100644 index 0000000..30150d1 --- /dev/null +++ b/sdk/recipes/patches/libwebp/configure.ac.p @@ -0,0 +1,11 @@ +--- configure.ac.orig 2019-07-04 20:32:37.000000000 +0100 ++++ configure.ac 2019-08-26 01:10:45.539132422 +0100 +@@ -485,7 +485,7 @@ + libpng12-config]) + if test -n "$LIBPNG_CONFIG"; then + PNG_INCLUDES=`$LIBPNG_CONFIG --cflags` +- PNG_LIBS="`$LIBPNG_CONFIG --ldflags`" ++ PNG_LIBS="`$LIBPNG_CONFIG --static --ldflags`" + fi + + WITHLIB_OPTION([png], [PNG]) diff --git a/sdk/recipes/patches/libwebp/configure.p b/sdk/recipes/patches/libwebp/configure.p new file mode 100644 index 0000000..02dc813 --- /dev/null +++ b/sdk/recipes/patches/libwebp/configure.p @@ -0,0 +1,11 @@ +--- configure.orig 2019-07-04 20:43:58.000000000 +0100 ++++ configure 2019-08-26 01:11:13.365038420 +0100 +@@ -14312,7 +14312,7 @@ + + if test -n "$LIBPNG_CONFIG"; then + PNG_INCLUDES=`$LIBPNG_CONFIG --cflags` +- PNG_LIBS="`$LIBPNG_CONFIG --ldflags`" ++ PNG_LIBS="`$LIBPNG_CONFIG --static --ldflags`" + fi + + diff --git a/sdk/recipes/patches/openssl/Configurations-50-amigaos.conf.p b/sdk/recipes/patches/openssl/Configurations-50-amigaos.conf.p index 9641a5e..26bb873 100644 --- a/sdk/recipes/patches/openssl/Configurations-50-amigaos.conf.p +++ b/sdk/recipes/patches/openssl/Configurations-50-amigaos.conf.p @@ -1,16 +1,17 @@ --- /dev/null 2017-10-10 15:19:45.611896396 +0100 +++ Configurations/50-amigaos.conf 2017-10-17 15:42:25.304921197 +0100 -@@ -0,0 +1,30 @@ -+%targets = ( +@@ -0,0 +1,32 @@ ++my %targets = ( + + "ppc-amigaos" => { -+ inherit_from => [ "BASE_unix", asm("ppc32_asm") ], ++ inherit_from => [ "BASE_unix" ], + cc => "ppc-amigaos-gcc", + cflags => picker(default => "-DB_ENDIAN -DTERMIOS -DNO_SYS_UN_H -DNO_SYSLOG", + debug => "-O0 -g", + release => "-O3 -fomit-frame-pointer", -+ threads("-D_REENTRANT")), ++ threads("-D_REENTRANT")), + thread_scheme => "(unknown)", ++ asm_arch => "ppc32", + perlasm_scheme => "linux32", + sys_id => "AMIGAOS4", + bn_ops => "THIRTY_TWO_BIT BN_LLONG RC4_CHAR", @@ -20,14 +21,15 @@ + "m68k-unknown-amigaos" => { + inherit_from => [ "BASE_unix" ], + cc => "m68k-unknown-amigaos-gcc", -+ cflags => picker(default => "-DB_ENDIAN -DTERMIOS -DNO_SYS_UN_H -DNO_SYS_PARAM_H -DNO_SYSLOG -m68020 -std=c99", ++ cflags => picker(default => "-DB_ENDIAN -DTERMIOS -DNO_SYS_UN_H -DNO_SYS_PARAM_H -DNO_SYSLOG -m68020 -std=gnu99", + debug => "-O0 -g", + release => "-O3 -fomit-frame-pointer", -+ threads("-D_REENTRANT")), ++ threads("-D_REENTRANT")), + thread_scheme => "(unknown)", + ex_libs => add("-lm -lnet"), + sys_id => "AMIGAOS3", + bn_ops => "THIRTY_TWO_BIT BN_LLONG", ++ bn_asm_src => "asm/bn_m68k.s", + ranlib => "m68k-unknown-amigaos-ranlib", + }, +); diff --git a/sdk/recipes/patches/openssl/Configurations-50-atari.conf.p b/sdk/recipes/patches/openssl/Configurations-50-atari.conf.p new file mode 100644 index 0000000..d9c51be --- /dev/null +++ b/sdk/recipes/patches/openssl/Configurations-50-atari.conf.p @@ -0,0 +1,45 @@ +--- /dev/null 2018-06-01 10:46:49.956110101 +0200 ++++ Configurations/50-atari.conf 2018-06-03 03:10:55.000000000 +0200 +@@ -0,0 +1,42 @@ ++my %targets = ( ++ "atari-common" => { ++ inherit_from => [ "BASE_unix" ], ++ template => 1, ++ cc => "m68k-atari-mint-gcc", ++ cflags => add_before(picker(default => "-DB_ENDIAN -DTERMIOS -DNO_SYSLOG -DNO_SYS_UN_H -DOPENSSL_USE_IPV6=0 -Wall", ++ debug => "-g -O0", ++ release => "-O3 -fomit-frame-pointer")), ++ sys_id => "MINT", ++ ranlib => "m68k-atari-mint-ranlib", ++# ? bn_ops => "THIRTY_TWO_BIT BN_LLONG", ++ bn_ops => "BN_LLONG", ++# ex_libs => "-lnetwork", ++# perlasm_scheme => "elf", ++ thread_scheme => "(unknown)", ++# dso_scheme => "dlfcn", ++# shared_target => "gnu-shared", ++# shared_cflag => "-fPIC", ++# shared_ldflag => "-shared", ++# shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", ++ }, ++ ++ "m68k-atari-mint000" => { ++ inherit_from => [ "atari-common" ], ++# XXX: does it work on 68000? ++# bn_asm_src => "asm/bn_m68k.s", ++ }, ++ ++ "m68k-atari-mint" => { ++ inherit_from => [ "atari-common" ], ++ cflags => add(picker(release => "-m68020-60")), ++ bn_asm_src => "asm/bn_m68k.s", ++ }, ++ ++ "m5475-atari-mint" => { ++ inherit_from => [ "atari-common" ], ++ cc => "m5475-atari-mint-gcc", ++# bn_asm_src => "asm/bn_m68k.s", ++ bn_ops => "BN_LLONG DES_RISC1", ++ ranlib => "m5475-atari-mint-ranlib", ++ }, ++); diff --git a/sdk/recipes/patches/openssl/Configurations-50-riscos.conf.p b/sdk/recipes/patches/openssl/Configurations-50-riscos.conf.p index 128d400..c3f2fe5 100644 --- a/sdk/recipes/patches/openssl/Configurations-50-riscos.conf.p +++ b/sdk/recipes/patches/openssl/Configurations-50-riscos.conf.p @@ -1,7 +1,7 @@ --- /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 @@ -+%targets = ( +@@ -0,0 +1,26 @@ ++my %targets = ( + + "arm-unknown-riscos" => { + inherit_from => [ "BASE_unix" ], @@ -14,4 +14,16 @@ + sys_id => "RISCOS", + bn_ops => "BN_LLONG", + }, ++ ++ "arm-riscos-gnueabi" => { ++ inherit_from => [ "BASE_unix" ], ++ cc => "arm-riscos-gnueabi-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/Configurations-50-windows.conf.p b/sdk/recipes/patches/openssl/Configurations-50-windows.conf.p index c492c01..fafa6cf 100644 --- a/sdk/recipes/patches/openssl/Configurations-50-windows.conf.p +++ b/sdk/recipes/patches/openssl/Configurations-50-windows.conf.p @@ -1,20 +1,21 @@ --- /dev/null 2017-10-10 15:19:45.611896396 +0100 +++ Configurations/50-windows.conf 2017-10-17 15:42:25.304921197 +0100 -@@ -0,0 +1,25 @@ -+%targets = ( +@@ -0,0 +1,26 @@ ++my %targets = ( + + "i686-w64-mingw32" => { -+ inherit_from => [ "BASE_unix", asm("x86_asm"), -+ sub { $disabled{shared} ? () : "x86_uplink" } ], ++ inherit_from => [ "BASE_unix", ++ sub { $disabled{shared} ? () : "x86_uplink" } ], + cc => "gcc", + cflags => combine(picker(default => "-DL_ENDIAN -DWIN32_LEAN_AND_MEAN -DUNICODE -D_UNICODE -m32 -Wall", -+ debug => "-g -O0", ++ debug => "-g -O0", + release => "-O3 -fomit-frame-pointer"), + threads("-D_MT")), + sys_id => "MINGW32", + ex_libs => add("-lws2_32 -lgdi32 -lcrypt32"), + bn_ops => "BN_LLONG EXPORT_VAR_AS_FN", + thread_scheme => "winthreads", ++ asm_arch => "x86", + perlasm_scheme => "coff", + dso_scheme => "win32", + shared_target => "mingw-shared", diff --git a/sdk/recipes/patches/openssl/Configure.p b/sdk/recipes/patches/openssl/Configure.p index c26e08b..aff7878 100644 --- a/sdk/recipes/patches/openssl/Configure.p +++ b/sdk/recipes/patches/openssl/Configure.p @@ -1,10 +1,11 @@ --- Configure.orig 2017-10-17 14:53:18.369801491 +0100 +++ Configure 2017-10-17 15:11:04.312242542 +0100 -@@ -946,6 +946,7 @@ - $target{exe_extension}=".exe" if ($config{target} eq "DJGPP" - || $config{target} =~ /^(?:Cygwin|mingw)/); +@@ -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-gnueabi"); +$target{exe_extension}=",e1f" if ($config{target} eq "arm-unknown-riscos"); - ($target{shared_extension_simple}=$target{shared_extension}) - =~ s|\.\$\(SHLIB_MAJOR\)\.\$\(SHLIB_MINOR\)||; + # Fill %config with values from %user, and in case those are undefined or + # empty, use values from %target (acting as a default). diff --git a/sdk/recipes/patches/openssl/apps.speed.c.p b/sdk/recipes/patches/openssl/apps.speed.c.p index 88ae1c3..132d473 100644 --- a/sdk/recipes/patches/openssl/apps.speed.c.p +++ b/sdk/recipes/patches/openssl/apps.speed.c.p @@ -1,7 +1,7 @@ ---- apps/speed.c.orig 2017-11-22 08:07:53.851790744 +0000 -+++ apps/speed.c 2017-11-22 08:15:49.608768064 +0000 -@@ -111,6 +111,12 @@ - #endif +--- apps/speed.c.orig 2017-11-21 22:49:00.185608040 +0000 ++++ apps/speed.c 2017-11-21 22:49:21.488219518 +0000 +@@ -62,6 +62,12 @@ + #include "./testdsa.h" #include <openssl/modes.h> + @@ -11,18 +11,24 @@ +#endif + #ifndef HAVE_FORK - # if defined(OPENSSL_SYS_VMS) || defined(OPENSSL_SYS_WINDOWS) + # if defined(OPENSSL_SYS_VMS) || defined(OPENSSL_SYS_WINDOWS) || defined(OPENSSL_SYS_VXWORKS) # define HAVE_FORK 0 ---- apps/speed.c.orig 2017-11-22 08:33:02.137445746 +0000 -+++ apps/speed.c 2017-11-22 08:36:00.833790589 +0000 -@@ -345,8 +345,10 @@ - static double Time_F(int s) - { - double ret = app_tminterval(s, usertime); -+ #ifdef SIGALRM - if (s == STOP) - alarm(0); -+ #endif +@@ -186,6 +192,18 @@ + return ret; } ++#elif defined(OPENSSL_SYS_AMIGAOS3) || defined(OPENSSL_SYS_AMIGAOS4) ++static void alarm_aos(unsigned int secs) ++{ ++ (void) secs; ++} ++#define alarm alarm_aos ++ ++static double Time_F(int s) ++{ ++ double ret = app_tminterval(s, usertime); ++ return ret; ++} + #else + # error "SIGALRM not defined and the platform is not Windows" #endif diff --git a/sdk/recipes/patches/openssl/aps.opt.c.p b/sdk/recipes/patches/openssl/aps.opt.c.p deleted file mode 100644 index 531cf76..0000000 --- a/sdk/recipes/patches/openssl/aps.opt.c.p +++ /dev/null @@ -1,14 +0,0 @@ ---- apps/opt.c.orig 2017-11-22 08:42:07.605882648 +0000 -+++ apps/opt.c 2017-11-22 08:48:31.712843519 +0000 -@@ -353,6 +353,11 @@ - #if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L && \ - defined(INTMAX_MAX) && defined(UINTMAX_MAX) - -+#if defined(OPENSSL_SYS_AMIGAOS3) || defined(OPENSSL_SYS_AMIGAOS4) -+# define strtoimax strtol -+# define strtoumax strtoul -+#endif -+ - /* Parse an intmax_t, put it into *result; return 0 on failure, else 1. */ - int opt_imax(const char *value, intmax_t *result) - { diff --git a/sdk/recipes/patches/openssl/crypto.arm_arch.h.p b/sdk/recipes/patches/openssl/crypto.arm_arch.h.p new file mode 100644 index 0000000..093e4de --- /dev/null +++ b/sdk/recipes/patches/openssl/crypto.arm_arch.h.p @@ -0,0 +1,11 @@ +--- crypto/arm_arch.h 2015-07-09 12:21:24.000000000 +0000 ++++ crypto/arm_arch.h 2015-11-13 13:47:02.386910047 +0000 +@@ -51,6 +51,8 @@ + # define __ARM_ARCH__ 5 + # elif defined(__ARM_ARCH_4__) || defined(__ARM_ARCH_4T__) + # define __ARM_ARCH__ 4 ++# elif defined(__ARM_ARCH_3__) ++# define __ARM_ARCH__ 3 + # else + # error "unsupported ARM architecture" + # endif diff --git a/sdk/recipes/patches/openssl/bio_lcl.h.p b/sdk/recipes/patches/openssl/crypto.bio.bio_local.h.p index feae76f..e811d8b 100644 --- a/sdk/recipes/patches/openssl/bio_lcl.h.p +++ b/sdk/recipes/patches/openssl/crypto.bio.bio_local.h.p @@ -1,5 +1,5 @@ ---- crypto/bio/bio_lcl.h.orig 2017-10-17 16:19:36.908150231 +0100 -+++ crypto/bio/bio_lcl.h 2017-10-17 16:19:52.056631064 +0100 +--- crypto/bio/bio_local.h.orig 2017-10-17 16:19:36.908150231 +0100 ++++ crypto/bio/bio_local.h 2017-10-17 16:19:52.056631064 +0100 @@ -36,7 +36,7 @@ /* * Undefine AF_UNIX on systems that define it but don't support it. diff --git a/sdk/recipes/patches/openssl/crypto.rand.rand_unix.c.p b/sdk/recipes/patches/openssl/crypto.rand.rand_unix.c.p index a4513f2..366cd19 100644 --- a/sdk/recipes/patches/openssl/crypto.rand.rand_unix.c.p +++ b/sdk/recipes/patches/openssl/crypto.rand.rand_unix.c.p @@ -1,11 +1,12 @@ ---- crypto/rand/rand_unix.c.orig 2017-11-22 11:25:03.096636507 +0000 -+++ crypto/rand/rand_unix.c 2017-11-22 11:25:52.649406308 +0000 -@@ -15,7 +15,7 @@ - #include <openssl/rand.h> - #include "rand_lcl.h" +--- providers/implementations/rands/seeding/rand_unix.c.orig 2017-11-22 11:25:03.096636507 +0000 ++++ providers/implementations/rands/seeding/rand_unix.c 2017-11-22 11:25:52.649406308 +0000 +@@ -109,7 +109,8 @@ --#if !(defined(OPENSSL_SYS_WINDOWS) || defined(OPENSSL_SYS_WIN32) || defined(OPENSSL_SYS_VMS) || defined(OPENSSL_SYS_VXWORKS) || defined(OPENSSL_SYS_UEFI)) -+#if !(defined(OPENSSL_SYS_WINDOWS) || defined(OPENSSL_SYS_WIN32) || defined(OPENSSL_SYS_VMS) || defined(OPENSSL_SYS_VXWORKS) || defined(OPENSSL_SYS_UEFI) || defined(OPENSSL_SYS_AMIGAOS3) || defined(OPENSSL_SYS_AMIGAOS4)) + #if !(defined(OPENSSL_SYS_WINDOWS) || defined(OPENSSL_SYS_WIN32) \ + || defined(OPENSSL_SYS_VMS) || defined(OPENSSL_SYS_VXWORKS) \ +- || defined(OPENSSL_SYS_UEFI)) ++ || defined(OPENSSL_SYS_UEFI) || defined(OPENSSL_SYS_AMIGAOS3) \ ++ || defined(OPENSSL_SYS_AMIGAOS4)) + + # if defined(OPENSSL_SYS_VOS) - # include <sys/types.h> - # include <sys/time.h> diff --git a/sdk/recipes/patches/openssl/e_os.h.p b/sdk/recipes/patches/openssl/e_os.h.p new file mode 100644 index 0000000..07ed97e --- /dev/null +++ b/sdk/recipes/patches/openssl/e_os.h.p @@ -0,0 +1,13 @@ +--- e_os.h.orig 2019-02-13 14:25:17.725058588 +0000 ++++ e_os.h 2019-02-13 14:35:39.790029062 +0000 +@@ -399,6 +399,10 @@ + # ifndef OPENSSL_NO_SECURE_MEMORY + /* unistd.h defines _POSIX_VERSION */ + # if (defined(OPENSSL_SYS_UNIX) \ ++ && !defined(OPENSSL_SYS_RISCOS) \ ++ && !defined(OPENSSL_SYS_AMIGAOS3) \ ++ && !defined(OPENSSL_SYS_AMIGAOS4) \ ++ && !defined(OPENSSL_SYS_MINT) \ + && ( (defined(_POSIX_VERSION) && _POSIX_VERSION >= 200112L) \ + || defined(__sun) || defined(__hpux) || defined(__sgi) \ + || defined(__osf__) )) \ diff --git a/sdk/recipes/patches/openssl/m5475-atari-mint/apps.lib.s_socket.c.p b/sdk/recipes/patches/openssl/m5475-atari-mint/apps.lib.s_socket.c.p new file mode 100644 index 0000000..d659de7 --- /dev/null +++ b/sdk/recipes/patches/openssl/m5475-atari-mint/apps.lib.s_socket.c.p @@ -0,0 +1,12 @@ +--- apps/lib/s_socket.c.orig 2018-06-03 03:19:29.000000000 +0200 ++++ apps/lib/s_socket.c 2018-06-03 03:19:36.000000000 +0200 +@@ -179,7 +179,9 @@ + BIO_ADDRINFO_family(res) == AF_INET6 ? "IPv6 " : + #endif + BIO_ADDRINFO_family(res) == AF_INET ? "IPv4 " : ++#ifdef AF_UNIX + BIO_ADDRINFO_family(res) == AF_UNIX ? "unix " : "", ++#endif + bindhost != NULL ? bindhost : "", + bindport != NULL ? ":" : "", + bindport != NULL ? bindport : ""); diff --git a/sdk/recipes/patches/openssl/m5475-atari-mint/include.internal.sockets.h.p b/sdk/recipes/patches/openssl/m5475-atari-mint/include.internal.sockets.h.p new file mode 100644 index 0000000..5ad3a7b --- /dev/null +++ b/sdk/recipes/patches/openssl/m5475-atari-mint/include.internal.sockets.h.p @@ -0,0 +1,19 @@ +--- include/internal/sockets.h.orig 2018-06-03 03:19:29.000000000 +0200 ++++ include/internal/sockets.h 2018-06-03 03:19:36.000000000 +0200 +@@ -124,6 +124,16 @@ + # define OPENSSL_USE_IPV6 0 + # endif + # endif ++/* ++ * We mean it ++ */ ++# if (OPENSSL_USE_IPV6 == 0) ++# undef AF_INET6 ++# warning undef AF_INET6 ++# undef AF_UNIX ++# warning undef AF_UNIX ++# undef IPV6_V6ONLY ++# endif + + # define get_last_socket_error() errno + # define clear_socket_error() errno=0 diff --git a/sdk/recipes/patches/openssl/m5475-atari-mint/include.openssl.e_os2.h.p b/sdk/recipes/patches/openssl/m5475-atari-mint/include.openssl.e_os2.h.p new file mode 100644 index 0000000..8a47b6b --- /dev/null +++ b/sdk/recipes/patches/openssl/m5475-atari-mint/include.openssl.e_os2.h.p @@ -0,0 +1,14 @@ +--- include/openssl/e_os2.h.orig 2018-06-03 03:39:16.000000000 +0200 ++++ include/openssl/e_os2.h 2018-06-03 03:43:34.000000000 +0200 +@@ -212,6 +212,11 @@ + # endif + # endif + ++# ifdef __MINT__ ++# define ossl_ssize_t int ++# define OSSL_SSIZE_MAX INT_MAX ++# endif ++ + # if defined(OPENSSL_SYS_UEFI) && !defined(ossl_ssize_t) + # define ossl_ssize_t INTN + # define OSSL_SSIZE_MAX MAX_INTN diff --git a/sdk/recipes/patches/openssl/m68k-atari-mint/apps.lib.s_socket.c.p b/sdk/recipes/patches/openssl/m68k-atari-mint/apps.lib.s_socket.c.p new file mode 100644 index 0000000..d659de7 --- /dev/null +++ b/sdk/recipes/patches/openssl/m68k-atari-mint/apps.lib.s_socket.c.p @@ -0,0 +1,12 @@ +--- apps/lib/s_socket.c.orig 2018-06-03 03:19:29.000000000 +0200 ++++ apps/lib/s_socket.c 2018-06-03 03:19:36.000000000 +0200 +@@ -179,7 +179,9 @@ + BIO_ADDRINFO_family(res) == AF_INET6 ? "IPv6 " : + #endif + BIO_ADDRINFO_family(res) == AF_INET ? "IPv4 " : ++#ifdef AF_UNIX + BIO_ADDRINFO_family(res) == AF_UNIX ? "unix " : "", ++#endif + bindhost != NULL ? bindhost : "", + bindport != NULL ? ":" : "", + bindport != NULL ? bindport : ""); diff --git a/sdk/recipes/patches/openssl/m68k-atari-mint/crypto.bn.Makefile.p b/sdk/recipes/patches/openssl/m68k-atari-mint/crypto.bn.Makefile.p deleted file mode 100644 index 8d3bfc6..0000000 --- a/sdk/recipes/patches/openssl/m68k-atari-mint/crypto.bn.Makefile.p +++ /dev/null @@ -1,12 +0,0 @@ ---- crypto/bn/Makefile 2017-01-26 13:22:03.000000000 +0000 -+++ crypto/bn/Makefile 2017-02-11 15:24:31.133017711 +0000 -@@ -60,6 +60,9 @@ lib: $(LIBOBJ) - $(RANLIB) $(LIB) || echo Never mind. - @touch lib - -+bn_m68k.o: asm/bn_m68k.s -+ $(CC) $(CFLAGS) -c -o $@ asm/bn_m68k.s -+ - bn-586.s: asm/bn-586.pl ../perlasm/x86asm.pl - $(PERL) asm/bn-586.pl $(PERLASM_SCHEME) $(CFLAGS) $(PROCESSOR) > $@ - co-586.s: asm/co-586.pl ../perlasm/x86asm.pl diff --git a/sdk/recipes/patches/openssl/m68k-atari-mint/include.internal.sockets.h.p b/sdk/recipes/patches/openssl/m68k-atari-mint/include.internal.sockets.h.p new file mode 100644 index 0000000..5ad3a7b --- /dev/null +++ b/sdk/recipes/patches/openssl/m68k-atari-mint/include.internal.sockets.h.p @@ -0,0 +1,19 @@ +--- include/internal/sockets.h.orig 2018-06-03 03:19:29.000000000 +0200 ++++ include/internal/sockets.h 2018-06-03 03:19:36.000000000 +0200 +@@ -124,6 +124,16 @@ + # define OPENSSL_USE_IPV6 0 + # endif + # endif ++/* ++ * We mean it ++ */ ++# if (OPENSSL_USE_IPV6 == 0) ++# undef AF_INET6 ++# warning undef AF_INET6 ++# undef AF_UNIX ++# warning undef AF_UNIX ++# undef IPV6_V6ONLY ++# endif + + # define get_last_socket_error() errno + # define clear_socket_error() errno=0 diff --git a/sdk/recipes/patches/openssl/m68k-atari-mint/include.openssl.e_os2.h.p b/sdk/recipes/patches/openssl/m68k-atari-mint/include.openssl.e_os2.h.p new file mode 100644 index 0000000..8a47b6b --- /dev/null +++ b/sdk/recipes/patches/openssl/m68k-atari-mint/include.openssl.e_os2.h.p @@ -0,0 +1,14 @@ +--- include/openssl/e_os2.h.orig 2018-06-03 03:39:16.000000000 +0200 ++++ include/openssl/e_os2.h 2018-06-03 03:43:34.000000000 +0200 +@@ -212,6 +212,11 @@ + # endif + # endif + ++# ifdef __MINT__ ++# define ossl_ssize_t int ++# define OSSL_SSIZE_MAX INT_MAX ++# endif ++ + # if defined(OPENSSL_SYS_UEFI) && !defined(ossl_ssize_t) + # define ossl_ssize_t INTN + # define OSSL_SSIZE_MAX MAX_INTN diff --git a/sdk/recipes/patches/openssl/m68k-unknown-amigaos/apps.apps.c.p b/sdk/recipes/patches/openssl/m68k-unknown-amigaos/apps.apps.c.p index 947eeca..1e677d2 100644 --- a/sdk/recipes/patches/openssl/m68k-unknown-amigaos/apps.apps.c.p +++ b/sdk/recipes/patches/openssl/m68k-unknown-amigaos/apps.apps.c.p @@ -1,6 +1,6 @@ ---- apps.c 2014-10-15 13:53:39.000000000 +0100 -+++ apps/apps.c 2015-01-05 21:02:13.650018727 +0000 -@@ -2872,10 +2872,11 @@ double app_tminterval(int stop, int user +--- apps/lib/apps.c.orig 2014-10-15 13:53:39.000000000 +0100 ++++ apps/lib/apps.c 2015-01-05 21:02:13.650018727 +0000 +@@ -2797,10 +2797,11 @@ double app_tminterval(int stop, int user struct rusage rus; struct timeval now; static struct timeval tmstart; diff --git a/sdk/recipes/patches/openssl/m68k-unknown-amigaos/apps.include.http_server.h.p b/sdk/recipes/patches/openssl/m68k-unknown-amigaos/apps.include.http_server.h.p new file mode 100644 index 0000000..8d9684e --- /dev/null +++ b/sdk/recipes/patches/openssl/m68k-unknown-amigaos/apps.include.http_server.h.p @@ -0,0 +1,11 @@ +--- apps/include/http_server.h.orig 2017-11-21 22:49:00.185608040 +0000 ++++ apps/include/http_server.h 2017-11-21 22:49:21.488219518 +0000 +@@ -27,7 +27,7 @@ + # endif + + # if !defined(NO_FORK) && !defined(OPENSSL_NO_SOCK) \ +- && !defined(OPENSSL_NO_POSIX_IO) ++ && !defined(OPENSSL_NO_POSIX_IO) && !defined(NO_SYSLOG) + # define HTTP_DAEMON + # include <sys/types.h> + # include <sys/wait.h> diff --git a/sdk/recipes/patches/openssl/m68k-unknown-amigaos/crypto.bio.b_sock2.c.p b/sdk/recipes/patches/openssl/m68k-unknown-amigaos/crypto.bio.b_sock2.c.p index 1d506af..93db04c 100644 --- a/sdk/recipes/patches/openssl/m68k-unknown-amigaos/crypto.bio.b_sock2.c.p +++ b/sdk/recipes/patches/openssl/m68k-unknown-amigaos/crypto.bio.b_sock2.c.p @@ -1,14 +1,14 @@ ---- crypto/bio/b_sock2.c.orig 2017-11-23 12:39:17.912640213 +0000 -+++ crypto/bio/b_sock2.c 2017-11-23 12:41:56.350294762 +0000 -@@ -94,6 +94,7 @@ +--- crypto/bio/bio_sock2.c.orig 2019-02-15 10:07:24.181612545 +0000 ++++ crypto/bio/bio_sock2.c 2019-02-15 10:07:15.637654488 +0000 +@@ -98,6 +98,7 @@ } } +#if defined(TCP_NODELAY) if (options & BIO_SOCK_NODELAY) { - if (setsockopt(sock, IPPROTO_TCP, TCP_NODELAY, &on, sizeof(on)) != 0) { - SYSerr(SYS_F_SETSOCKOPT, get_last_socket_error()); -@@ -101,6 +102,7 @@ + if (setsockopt(sock, IPPROTO_TCP, TCP_NODELAY, + (const void *)&on, sizeof(on)) != 0) { +@@ -107,6 +108,7 @@ return 0; } } @@ -16,21 +16,19 @@ if (connect(sock, BIO_ADDR_sockaddr(addr), BIO_ADDR_sockaddr_size(addr)) == -1) { ---- crypto/bio/b_sock2.c.orig 2017-11-23 12:43:56.318461652 +0000 -+++ crypto/bio/b_sock2.c 2017-11-23 12:44:36.139861658 +0000 -@@ -193,6 +193,7 @@ +@@ -252,6 +254,7 @@ } } +#if defined(TCP_NODELAY) if (options & BIO_SOCK_NODELAY) { - if (setsockopt(sock, IPPROTO_TCP, TCP_NODELAY, &on, sizeof(on)) != 0) { - SYSerr(SYS_F_SETSOCKOPT, get_last_socket_error()); -@@ -200,6 +201,7 @@ + if (setsockopt(sock, IPPROTO_TCP, TCP_NODELAY, + (const void *)&on, sizeof(on)) != 0) { +@@ -261,6 +264,7 @@ return 0; } } +#endif - # ifdef IPV6_V6ONLY - if ((options & BIO_SOCK_V6_ONLY) && BIO_ADDR_family(addr) == AF_INET6) { + /* On OpenBSD it is always ipv6 only with ipv6 sockets thus read-only */ + # if defined(IPV6_V6ONLY) && !defined(__OpenBSD__) diff --git a/sdk/recipes/patches/openssl/m68k-unknown-amigaos/crypto.bn.bn_div.c b/sdk/recipes/patches/openssl/m68k-unknown-amigaos/crypto.bn.bn_div.c.p index 0d5492f..3fa3a53 100644 --- a/sdk/recipes/patches/openssl/m68k-unknown-amigaos/crypto.bn.bn_div.c +++ b/sdk/recipes/patches/openssl/m68k-unknown-amigaos/crypto.bn.bn_div.c.p @@ -1,6 +1,6 @@ --- crypto/bn/bn_div.c 2017-01-26 13:22:03.000000000 +0000 +++ crypto/bn/bn_div.c 2017-02-11 16:06:29.437010335 +0000 -@@ -175,6 +175,22 @@ int BN_div(BIGNUM *dv, BIGNUM *rem, cons +@@ -194,6 +194,22 @@ int BN_div(BIGNUM *dv, BIGNUM *rem, cons q; \ }) # define REMAINDER_IS_ALREADY_CALCULATED diff --git a/sdk/recipes/patches/openssl/m68k-unknown-amigaos/crypto.rand.build.info.p b/sdk/recipes/patches/openssl/m68k-unknown-amigaos/crypto.rand.build.info.p deleted file mode 100644 index 58b672f..0000000 --- a/sdk/recipes/patches/openssl/m68k-unknown-amigaos/crypto.rand.build.info.p +++ /dev/null @@ -1,9 +0,0 @@ ---- crypto/rand/build.info.orig 2017-11-22 11:36:06.585363219 +0000 -+++ crypto/rand/build.info 2017-11-22 11:36:39.267232034 +0000 -@@ -1,4 +1,4 @@ - LIBS=../../libcrypto - SOURCE[../../libcrypto]=\ -- md_rand.c randfile.c rand_lib.c rand_err.c rand_egd.c \ -- rand_win.c rand_unix.c rand_vms.c -+ md_rand.c randfile.c rand_lib.c rand_err.c rand_amiga.c \ -+ rand_egd.c rand_win.c rand_unix.c rand_vms.c diff --git a/sdk/recipes/patches/openssl/m68k-unknown-amigaos/crypto.ui.ui_openssl.c.p b/sdk/recipes/patches/openssl/m68k-unknown-amigaos/crypto.ui.ui_openssl.c.p index 0448499..3407a48 100644 --- a/sdk/recipes/patches/openssl/m68k-unknown-amigaos/crypto.ui.ui_openssl.c.p +++ b/sdk/recipes/patches/openssl/m68k-unknown-amigaos/crypto.ui.ui_openssl.c.p @@ -1,21 +1,21 @@ --- crypto/ui/ui_openssl.c.orig 2017-11-23 13:22:15.760078583 +0000 +++ crypto/ui/ui_openssl.c 2017-11-23 13:21:40.534382076 +0000 -@@ -99,6 +99,18 @@ +@@ -103,6 +103,18 @@ + # undef SGTTY + # endif - #endif - -+#if defined(OPENSSL_SYS_AMIGAOS3) -+#undef TERMIOS -+#undef TERMIO -+#undef SGTTY ++# if defined(OPENSSL_SYS_AMIGAOS3) ++# undef TERMIOS ++# undef TERMIO ++# undef SGTTY +struct termios { int foo; }; -+# define TTY_STRUCT struct termios -+# define TTY_FLAGS foo -+# define TTY_get(tty,data) /* tcgetattr(tty,data) */ -1 -+# define TTY_set(tty,data) /* tcsetattr(tty,TCSANOW,data) */ 0 -+# define ECHO 0 -+#endif ++# define TTY_STRUCT struct termios ++# define TTY_FLAGS foo ++# define TTY_get(tty,data) /* tcgetattr(tty,data) */ -1 ++# define TTY_set(tty,data) /* tcsetattr(tty,TCSANOW,data) */ 0 ++# define ECHO 0 ++# endif + - #ifdef TERMIOS - # include <termios.h> - # define TTY_STRUCT struct termios + # ifdef TERMIOS + # include <termios.h> + # define TTY_STRUCT struct termios diff --git a/sdk/recipes/patches/openssl/m68k-unknown-amigaos/include.openssl.e_os2.h.p b/sdk/recipes/patches/openssl/m68k-unknown-amigaos/include.openssl.e_os2.h.p deleted file mode 100644 index 6ea1ec8..0000000 --- a/sdk/recipes/patches/openssl/m68k-unknown-amigaos/include.openssl.e_os2.h.p +++ /dev/null @@ -1,11 +0,0 @@ ---- include/openssl/e_os2.h.orig 2017-11-21 23:09:39.684814614 +0000 -+++ include/openssl/e_os2.h 2017-11-21 23:10:32.501369938 +0000 -@@ -223,6 +223,8 @@ - # define OSSL_SSIZE_MAX SSIZE_MAX - # elif defined(_POSIX_SSIZE_MAX) - # define OSSL_SSIZE_MAX _POSIX_SSIZE_MAX -+# else -+# define OSSL_SSIZE_MAX INT_MAX - # endif - # endif - diff --git a/sdk/recipes/patches/openssl/m68k-unknown-amigaos/providers.implementations.rands.seeding.build.info.p b/sdk/recipes/patches/openssl/m68k-unknown-amigaos/providers.implementations.rands.seeding.build.info.p new file mode 100644 index 0000000..c887eff --- /dev/null +++ b/sdk/recipes/patches/openssl/m68k-unknown-amigaos/providers.implementations.rands.seeding.build.info.p @@ -0,0 +1,12 @@ +--- providers/implementations/rands/seeding/build.info.orig 2017-11-21 22:49:00.185608040 +0000 ++++ providers/implementations/rands/seeding/build.info 2017-11-21 22:49:21.488219518 +0000 +@@ -5,6 +5,9 @@ + IF[{- $config{target} =~ /vms/i -}] + $COMMON=$COMMON rand_vms.c + ENDIF ++IF[{- $config{target} =~ /amiga/i -}] ++ $COMMON=$COMMON rand_amiga.c ++ENDIF + + SOURCE[../../../libdefault.a]=$COMMON + diff --git a/sdk/recipes/patches/openssl/mem_sec.c.p b/sdk/recipes/patches/openssl/mem_sec.c.p deleted file mode 100644 index 156cc93..0000000 --- a/sdk/recipes/patches/openssl/mem_sec.c.p +++ /dev/null @@ -1,11 +0,0 @@ ---- crypto/mem_sec.c.orig 2017-10-17 16:46:24.923285526 +0100 -+++ crypto/mem_sec.c 2017-10-17 16:48:00.358325267 +0100 -@@ -24,7 +24,7 @@ - - #include <string.h> - --#if defined(OPENSSL_SYS_LINUX) || defined(OPENSSL_SYS_UNIX) -+#if ! defined(OPENSSL_SYS_RISCOS) && ! defined(OPENSSL_SYS_AMIGAOS3) && ! defined(OPENSSL_SYS_AMIGAOS4) && (defined(OPENSSL_SYS_LINUX) || defined(OPENSSL_SYS_UNIX)) - # define IMPLEMENTED - # include <stdlib.h> - # include <assert.h> diff --git a/sdk/recipes/patches/openssl/newlib-no-strtoiumax.p b/sdk/recipes/patches/openssl/newlib-no-strtoiumax.p new file mode 100644 index 0000000..27f6a9d --- /dev/null +++ b/sdk/recipes/patches/openssl/newlib-no-strtoiumax.p @@ -0,0 +1,22 @@ +--- apps/lib/opt.c.orig 2017-10-10 15:19:45.611896396 +0100 ++++ apps/lib/opt.c 2017-10-17 15:42:25.304921197 +0100 +@@ -562,7 +562,7 @@ + + #if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L && \ + defined(INTMAX_MAX) && defined(UINTMAX_MAX) && \ +- !defined(OPENSSL_NO_INTTYPES_H) ++ !defined(OPENSSL_NO_INTTYPES_H) && !defined(OPENSSL_SYS_AMIGAOS3) && !defined(OPENSSL_SYS_AMIGAOS4) + + /* Parse an intmax_t, put it into *result; return 0 on failure, else 1. */ + int opt_intmax(const char *value, ossl_intmax_t *result) +--- test/params_conversion_test.c.orig 2017-10-10 15:19:45.611896396 +0100 ++++ test/params_conversion_test.c 2017-10-17 15:42:25.304921197 +0100 +@@ -15,7 +15,7 @@ + /* On machines that dont support <inttypes.h> just disable the tests */ + #if !defined(OPENSSL_NO_INTTYPES_H) + +-# ifdef OPENSSL_SYS_VMS ++# if defined(OPENSSL_SYS_VMS) || defined(OPENSSL_SYS_AMIGAOS3) || defined(OPENSSL_SYS_AMIGAOS4) + # define strtoumax strtoull + # define strtoimax strtoll + # endif diff --git a/sdk/recipes/patches/openssl/ppc-amigaos/apps.include.http_server.h.p b/sdk/recipes/patches/openssl/ppc-amigaos/apps.include.http_server.h.p new file mode 100644 index 0000000..8d9684e --- /dev/null +++ b/sdk/recipes/patches/openssl/ppc-amigaos/apps.include.http_server.h.p @@ -0,0 +1,11 @@ +--- apps/include/http_server.h.orig 2017-11-21 22:49:00.185608040 +0000 ++++ apps/include/http_server.h 2017-11-21 22:49:21.488219518 +0000 +@@ -27,7 +27,7 @@ + # endif + + # if !defined(NO_FORK) && !defined(OPENSSL_NO_SOCK) \ +- && !defined(OPENSSL_NO_POSIX_IO) ++ && !defined(OPENSSL_NO_POSIX_IO) && !defined(NO_SYSLOG) + # define HTTP_DAEMON + # include <sys/types.h> + # include <sys/wait.h> diff --git a/sdk/recipes/patches/openssl/ppc-amigaos/atomics-are-broken.p b/sdk/recipes/patches/openssl/ppc-amigaos/atomics-are-broken.p new file mode 100644 index 0000000..c6abf48 --- /dev/null +++ b/sdk/recipes/patches/openssl/ppc-amigaos/atomics-are-broken.p @@ -0,0 +1,22 @@ +--- include/internal/tsan_assist.h.orig 2017-11-21 22:49:00.185608040 +0000 ++++ include/internal/tsan_assist.h 2017-11-21 22:49:21.488219518 +0000 +@@ -48,7 +48,7 @@ + */ + + #if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L \ +- && !defined(__STDC_NO_ATOMICS__) ++ && !defined(__STDC_NO_ATOMICS__) && !defined(__AMIGA__) + # include <stdatomic.h> + + # if defined(ATOMIC_POINTER_LOCK_FREE) \ +--- include/internal/refcount.h.orig 2017-11-21 22:49:00.185608040 +0000 ++++ include/internal/refcount.h 2017-11-21 22:49:21.488219518 +0000 +@@ -15,7 +15,7 @@ + + # if defined(OPENSSL_THREADS) && !defined(OPENSSL_DEV_NO_ATOMICS) + # if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L \ +- && !defined(__STDC_NO_ATOMICS__) ++ && !defined(__STDC_NO_ATOMICS__) && !defined(__AMIGA__) + # include <stdatomic.h> + # define HAVE_C11_ATOMICS + # endif diff --git a/sdk/recipes/patches/openssl/ppc-amigaos/crypto.bio_b_addr.c.p b/sdk/recipes/patches/openssl/ppc-amigaos/crypto.bio_b_addr.c.p index dd10e8c..ac14e86 100644 --- a/sdk/recipes/patches/openssl/ppc-amigaos/crypto.bio_b_addr.c.p +++ b/sdk/recipes/patches/openssl/ppc-amigaos/crypto.bio_b_addr.c.p @@ -1,6 +1,6 @@ ---- crypto/bio/b_addr.c.orig 2017-11-21 22:49:00.185608040 +0000 -+++ crypto/bio/b_addr.c 2017-11-21 22:49:21.488219518 +0000 -@@ -854,7 +854,7 @@ +--- crypto/bio/bio_addr.c.orig 2017-11-21 22:49:00.185608040 +0000 ++++ crypto/bio/bio_addr.c 2017-11-21 22:49:21.488219518 +0000 +@@ -910,7 +910,7 @@ addrlistp++) ; diff --git a/sdk/recipes/patches/openssl/ppc-amigaos/crypto.ppccap.c.p b/sdk/recipes/patches/openssl/ppc-amigaos/crypto.ppccap.c.p index b6ece1e..46d6213 100644 --- a/sdk/recipes/patches/openssl/ppc-amigaos/crypto.ppccap.c.p +++ b/sdk/recipes/patches/openssl/ppc-amigaos/crypto.ppccap.c.p @@ -1,15 +1,15 @@ --- crypto/ppccap.c.orig 2017-11-22 13:14:44.655536374 +0000 +++ crypto/ppccap.c 2017-11-22 13:16:03.666387174 +0000 -@@ -135,6 +135,8 @@ - } - #endif +@@ -34,6 +34,8 @@ + + static sigset_t all_masked; +#ifndef OPENSSL_SYS_AMIGAOS4 + static sigjmp_buf ill_jmp; static void ill_handler(int sig) { -@@ -341,3 +343,24 @@ +@@ -309,3 +311,29 @@ sigaction(SIGILL, &ill_oact, NULL); sigprocmask(SIG_SETMASK, &oset, NULL); } @@ -22,7 +22,7 @@ + + IExec->GetCPUInfoTags(GCIT_Family, &family, GCIT_VectorUnit, &vec, TAG_DONE); + -+ OPENSSL_ppccap_P = 0; //PPC_FPU ++ OPENSSL_ppccap_P = PPC_FPU; + + if((family == CPUFAMILY_PA6T) || (family == CPUFAMILY_E5500)) + OPENSSL_ppccap_P |= PPC_FPU64; @@ -33,4 +33,9 @@ + OPENSSL_ppccap_P |= PPC_ALTIVEC; + } +} ++ ++uint32_t OPENSSL_rdtsc(void) ++{ ++ return 0; ++} +#endif diff --git a/sdk/recipes/patches/openssl/ppc-amigaos/crypto.rand.build.info.p b/sdk/recipes/patches/openssl/ppc-amigaos/crypto.rand.build.info.p deleted file mode 100644 index 58b672f..0000000 --- a/sdk/recipes/patches/openssl/ppc-amigaos/crypto.rand.build.info.p +++ /dev/null @@ -1,9 +0,0 @@ ---- crypto/rand/build.info.orig 2017-11-22 11:36:06.585363219 +0000 -+++ crypto/rand/build.info 2017-11-22 11:36:39.267232034 +0000 -@@ -1,4 +1,4 @@ - LIBS=../../libcrypto - SOURCE[../../libcrypto]=\ -- md_rand.c randfile.c rand_lib.c rand_err.c rand_egd.c \ -- rand_win.c rand_unix.c rand_vms.c -+ md_rand.c randfile.c rand_lib.c rand_err.c rand_amiga.c \ -+ rand_egd.c rand_win.c rand_unix.c rand_vms.c diff --git a/sdk/recipes/patches/openssl/ppc-amigaos/include.openssl.e_os2.h.p b/sdk/recipes/patches/openssl/ppc-amigaos/include.openssl.e_os2.h.p deleted file mode 100644 index 6ea1ec8..0000000 --- a/sdk/recipes/patches/openssl/ppc-amigaos/include.openssl.e_os2.h.p +++ /dev/null @@ -1,11 +0,0 @@ ---- include/openssl/e_os2.h.orig 2017-11-21 23:09:39.684814614 +0000 -+++ include/openssl/e_os2.h 2017-11-21 23:10:32.501369938 +0000 -@@ -223,6 +223,8 @@ - # define OSSL_SSIZE_MAX SSIZE_MAX - # elif defined(_POSIX_SSIZE_MAX) - # define OSSL_SSIZE_MAX _POSIX_SSIZE_MAX -+# else -+# define OSSL_SSIZE_MAX INT_MAX - # endif - # endif - diff --git a/sdk/recipes/patches/openssl/ppc-amigaos/providers.implementations.rands.seeding.build.info.p b/sdk/recipes/patches/openssl/ppc-amigaos/providers.implementations.rands.seeding.build.info.p new file mode 100644 index 0000000..c887eff --- /dev/null +++ b/sdk/recipes/patches/openssl/ppc-amigaos/providers.implementations.rands.seeding.build.info.p @@ -0,0 +1,12 @@ +--- providers/implementations/rands/seeding/build.info.orig 2017-11-21 22:49:00.185608040 +0000 ++++ providers/implementations/rands/seeding/build.info 2017-11-21 22:49:21.488219518 +0000 +@@ -5,6 +5,9 @@ + IF[{- $config{target} =~ /vms/i -}] + $COMMON=$COMMON rand_vms.c + ENDIF ++IF[{- $config{target} =~ /amiga/i -}] ++ $COMMON=$COMMON rand_amiga.c ++ENDIF + + SOURCE[../../../libdefault.a]=$COMMON + diff --git a/sdk/recipes/patches/openssl/ppc-amigaos/test.rsa_complex.c.p b/sdk/recipes/patches/openssl/ppc-amigaos/test.rsa_complex.c.p new file mode 100644 index 0000000..969062b --- /dev/null +++ b/sdk/recipes/patches/openssl/ppc-amigaos/test.rsa_complex.c.p @@ -0,0 +1,14 @@ +--- test/rsa_complex.c.orig 2019-02-14 10:16:06.665734720 +0000 ++++ test/rsa_complex.c 2019-02-14 10:16:18.581682332 +0000 +@@ -16,11 +16,6 @@ + */ + + #if !defined(__DJGPP__) +-# if defined(__STDC_VERSION__) +-# if __STDC_VERSION__ >= 199901L +-# include <complex.h> +-# endif +-# endif + # include <openssl/rsa.h> + #endif + #include <stdlib.h> diff --git a/sdk/recipes/patches/openssl/test.drbgtest.c.p b/sdk/recipes/patches/openssl/test.drbgtest.c.p new file mode 100644 index 0000000..ecf3e81 --- /dev/null +++ b/sdk/recipes/patches/openssl/test.drbgtest.c.p @@ -0,0 +1,20 @@ +--- test/drbgtest.c.orig 2017-10-10 15:19:45.611896396 +0100 ++++ test/drbgtest.c 2017-10-17 15:42:25.304921197 +0100 +@@ -277,7 +277,7 @@ + } + + +-#if defined(OPENSSL_SYS_UNIX) && !defined(OPENSSL_RAND_SEED_EGD) ++#if defined(OPENSSL_SYS_UNIX) && !defined(OPENSSL_RAND_SEED_EGD) && !defined(OPENSSL_SYS_AMIGAOS3) && !defined(OPENSSL_SYS_AMIGAOS4) + /* number of children to fork */ + #define DRBG_FORK_COUNT 9 + /* two results per child, two for the parent */ +@@ -895,7 +895,7 @@ + int setup_tests(void) + { + ADD_TEST(test_rand_reseed); +-#if defined(OPENSSL_SYS_UNIX) && !defined(OPENSSL_RAND_SEED_EGD) ++#if defined(OPENSSL_SYS_UNIX) && !defined(OPENSSL_RAND_SEED_EGD) && !defined(OPENSSL_SYS_AMIGAOS3) && !defined(OPENSSL_SYS_AMIGAOS4) + ADD_ALL_TESTS(test_rand_fork_safety, RANDOM_SIZE); + #endif + ADD_TEST(test_rand_prediction_resistance); diff --git a/sdk/recipes/patches/windom/src.globals.h.p b/sdk/recipes/patches/windom/src.globals.h.p new file mode 100644 index 0000000..34a7901 --- /dev/null +++ b/sdk/recipes/patches/windom/src.globals.h.p @@ -0,0 +1,19 @@ +--- src/globals.h.orig 2023-10-01 03:02:16.247962097 +0100 ++++ src/globals.h 2023-10-01 03:03:20.403979699 +0100 +@@ -806,6 +806,8 @@ + RSC header and support struct + *******************************************************************************/ + ++#ifndef __RSXHDR ++#define __RSXHDR + typedef struct { /* fichier ressource tendu */ + UWORD rsh_vrsn; /* should be 3 */ + UWORD rsh_extvrsn; /* not used, initialised to 'IN' for Interface */ +@@ -827,6 +829,7 @@ + ULONG rsh_nimages; + ULONG rsh_rssize; /* total bytes in resource */ + } RSXHDR; ++#endif + + typedef struct { + unsigned long rlen; diff --git a/sdk/recipes/patches/zlib/arm-riscos-gnueabi/configure.p b/sdk/recipes/patches/zlib/arm-riscos-gnueabi/configure.p new file mode 100644 index 0000000..24d7a7e --- /dev/null +++ b/sdk/recipes/patches/zlib/arm-riscos-gnueabi/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 <<EOF +-#include <sys/types.h> +-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 <<EOF ++##include <sys/types.h> ++#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 <<EOF +@@ -451,7 +451,7 @@ + SFLAGS="${SFLAGS} -DNO_FSEEKO" + echo "Checking for fseeko... No." | tee -a configure.log + fi +-fi ++##fi + + echo >> configure.log + |