diff options
Diffstat (limited to 'sdk/recipes')
79 files changed, 4923 insertions, 461 deletions
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-atari-mint/crypto/bn/asm/bn_m68k.s b/sdk/recipes/files/openssl/m68k-atari-mint/crypto/bn/asm/bn_m68k.s new file mode 100644 index 0000000..effdc6a --- /dev/null +++ b/sdk/recipes/files/openssl/m68k-atari-mint/crypto/bn/asm/bn_m68k.s @@ -0,0 +1,1604 @@ +/* Copyright (C) 2002 by Howard Chu <hyc@highlandsun.com> + * + * Rights for redistribution and usage in source and binary forms are + * granted according to the OpenSSL license. Warranty of any kind is + * disclaimed. + */ + +/* This file is written for GNU as. All of the code is hand written by + * me. The code is suitable for Motorola 68020-68060 and all CPU32-based + * processors providing 64-bit multiply/divide instructions. On a 68030 + * this code is over 4 times faster than the gcc -O3 code for RSA/DSA. + * I haven't paid any attention to instruction sequencing; there may be + * room for some further improvement. + */ + +.text + .even +.globl _bn_mul_add_words +_bn_mul_add_words: + movm.l #0x3c00,-(sp) + move.l 20(sp),a0 + move.l 24(sp),a1 + clr.l d0 + move.l d0,d5 /* Keep a 0 handy for addx carry bits */ + move.l 28(sp),d4 + jble 3f + + move.l 32(sp),d3 + moveq.l #-4,d2 + and.l d4,d2 + jbeq 2f +1: + move.l d3,d1 + mulu.l (a1)+,d2:d1 + add.l d0,d1 + addx.l d5,d2 + add.l (a0),d1 + addx.l d5,d2 + move.l d1,(a0)+ + move.l d2,d0 + + move.l d3,d1 + mulu.l (a1)+,d2:d1 + add.l d0,d1 + addx.l d5,d2 + add.l (a0),d1 + addx.l d5,d2 + move.l d1,(a0)+ + move.l d2,d0 + + move.l d3,d1 + mulu.l (a1)+,d2:d1 + add.l d0,d1 + addx.l d5,d2 + add.l (a0),d1 + addx.l d5,d2 + move.l d1,(a0)+ + move.l d2,d0 + + move.l d3,d1 + mulu.l (a1)+,d2:d1 + add.l d0,d1 + addx.l d5,d2 + add.l (a0),d1 + addx.l d5,d2 + move.l d1,(a0)+ + move.l d2,d0 + + moveq.l #-4,d2 + add.l d2,d4 + and.l d4,d2 + jbne 1b +2: + tst.l d4 + jbeq 3f + + move.l d3,d1 + mulu.l (a1)+,d2:d1 + add.l d0,d1 + addx.l d5,d2 + add.l (a0),d1 + addx.l d5,d2 + move.l d1,(a0)+ + move.l d2,d0 + + subq.l #1,d4 + jbeq 3f + + move.l d3,d1 + mulu.l (a1)+,d2:d1 + add.l d0,d1 + addx.l d5,d2 + add.l (a0),d1 + addx.l d5,d2 + move.l d1,(a0)+ + move.l d2,d0 + + subq.l #1,d4 + jbeq 3f + + move.l d3,d1 + mulu.l (a1)+,d2:d1 + add.l d0,d1 + addx.l d5,d2 + add.l (a0),d1 + addx.l d5,d2 + move.l d1,(a0)+ + move.l d2,d0 +3: + movm.l (sp)+,#0x003c + rts + + .even +.globl _bn_mul_words +_bn_mul_words: + movm.l #0x3c00,-(sp) + move.l 20(sp),a0 + move.l 24(sp),a1 + clr.l d0 + move.l d0,d5 + move.l 28(sp),d4 + jble 3f + + move.l 32(sp),d3 + moveq.l #-4,d2 + and.l d4,d2 + jbeq 2f +1: + move.l d3,d1 + mulu.l (a1)+,d2:d1 + add.l d0,d1 + addx.l d5,d2 + move.l d1,(a0)+ + move.l d2,d0 + + move.l d3,d1 + mulu.l (a1)+,d2:d1 + add.l d0,d1 + addx.l d5,d2 + move.l d1,(a0)+ + move.l d2,d0 + + move.l d3,d1 + mulu.l (a1)+,d2:d1 + add.l d0,d1 + addx.l d5,d2 + move.l d1,(a0)+ + move.l d2,d0 + + move.l d3,d1 + mulu.l (a1)+,d2:d1 + add.l d0,d1 + addx.l d5,d2 + move.l d1,(a0)+ + move.l d2,d0 + + moveq.l #-4,d2 + add.l d2,d4 + and.l d4,d2 + jbne 1b +2: + tst.l d4 + jbeq 3f + + move.l d3,d1 + mulu.l (a1)+,d2:d1 + add.l d0,d1 + addx.l d5,d2 + move.l d1,(a0)+ + move.l d2,d0 + + subq.l #1,d4 + jbeq 3f + + move.l d3,d1 + mulu.l (a1)+,d2:d1 + add.l d0,d1 + addx.l d5,d2 + move.l d1,(a0)+ + move.l d2,d0 + + subq.l #1,d4 + jbeq 3f + + move.l d3,d1 + mulu.l (a1)+,d2:d1 + add.l d0,d1 + addx.l d5,d2 + move.l d1,(a0)+ + move.l d2,d0 +3: + movm.l (sp)+,#0x003c + rts + + .even +.globl _bn_sqr_words +_bn_sqr_words: + move.l d2,-(sp) + move.l 8(sp),a0 + move.l 12(sp),a1 + move.l 16(sp),d2 + jble 3f + + moveq.l #-4,d1 + and.l d2,d1 + jbeq 2f +1: + move.l (a1)+,d0 + mulu.l d0,d1:d0 + move.l d0,(a0)+ + move.l d1,(a0)+ + + move.l (a1)+,d0 + mulu.l d0,d1:d0 + move.l d0,(a0)+ + move.l d1,(a0)+ + + move.l (a1)+,d0 + mulu.l d0,d1:d0 + move.l d0,(a0)+ + move.l d1,(a0)+ + + move.l (a1)+,d0 + mulu.l d0,d1:d0 + move.l d0,(a0)+ + move.l d1,(a0)+ + + moveq.l #-4,d1 + add.l d1,d2 + and.l d2,d1 + jbne 1b +2: + tst.l d2 + jbeq 3f + + move.l (a1)+,d0 + mulu.l d0,d1:d0 + move.l d0,(a0)+ + move.l d1,(a0)+ + + subq.l #1,d2 + jbeq 3f + + move.l (a1)+,d0 + mulu.l d0,d1:d0 + move.l d0,(a0)+ + move.l d1,(a0)+ + + subq.l #1,d2 + jbeq 3f + + move.l (a1)+,d0 + mulu.l d0,d1:d0 + move.l d0,(a0)+ + move.l d1,(a0)+ +3: + move.l (sp)+,d2 + rts + + .even +.globl _bn_mul_comba8 +_bn_mul_comba8: + movm.l #0x3c20,-(sp) + movm.l 24(sp),#0x0700 + clr.l d2 + move.l d2,d3 + move.l d2,d4 + move.l d2,d5 + move.l (a1),d0 + move.l (a2),d1 + + mulu.l d1,d1:d0 + add.l d0,d2 + addx.l d1,d3 + addx.l d5,d4 + + move.l d2,(a0) + move.l d5,d2 + move.l (a1),d0 + move.l 4(a2),d1 + + mulu.l d1,d1:d0 + add.l d0,d3 + addx.l d1,d4 + addx.l d5,d2 + + move.l 4(a1),d0 + move.l (a2),d1 + + mulu.l d1,d1:d0 + add.l d0,d3 + addx.l d1,d4 + addx.l d5,d2 + + move.l d3,4(a0) + move.l d5,d3 + move.l 8(a1),d0 + move.l (a2),d1 + + mulu.l d1,d1:d0 + add.l d0,d4 + addx.l d1,d2 + addx.l d5,d3 + + move.l 4(a1),d0 + move.l 4(a2),d1 + + mulu.l d1,d1:d0 + add.l d0,d4 + addx.l d1,d2 + addx.l d5,d3 + + move.l (a1),d0 + move.l 8(a2),d1 + + mulu.l d1,d1:d0 + add.l d0,d4 + addx.l d1,d2 + addx.l d5,d3 + + move.l d4,8(a0) + move.l d5,d4 + move.l (a1),d0 + move.l 12(a2),d1 + + mulu.l d1,d1:d0 + add.l d0,d2 + addx.l d1,d3 + addx.l d5,d4 + + move.l 4(a1),d0 + move.l 8(a2),d1 + + mulu.l d1,d1:d0 + add.l d0,d2 + addx.l d1,d3 + addx.l d5,d4 + + move.l 8(a1),d0 + move.l 4(a2),d1 + + mulu.l d1,d1:d0 + add.l d0,d2 + addx.l d1,d3 + addx.l d5,d4 + + move.l 12(a1),d0 + move.l (a2),d1 + + mulu.l d1,d1:d0 + add.l d0,d2 + addx.l d1,d3 + addx.l d5,d4 + + move.l d2,12(a0) + move.l d5,d2 + move.l 16(a1),d0 + move.l (a2),d1 + + mulu.l d1,d1:d0 + add.l d0,d3 + addx.l d1,d4 + addx.l d5,d2 + + move.l 12(a1),d0 + move.l 4(a2),d1 + + mulu.l d1,d1:d0 + add.l d0,d3 + addx.l d1,d4 + addx.l d5,d2 + + move.l 8(a1),d0 + move.l 8(a2),d1 + + mulu.l d1,d1:d0 + add.l d0,d3 + addx.l d1,d4 + addx.l d5,d2 + + move.l 4(a1),d0 + move.l 12(a2),d1 + + mulu.l d1,d1:d0 + add.l d0,d3 + addx.l d1,d4 + addx.l d5,d2 + + move.l (a1),d0 + move.l 16(a2),d1 + + mulu.l d1,d1:d0 + add.l d0,d3 + addx.l d1,d4 + addx.l d5,d2 + + move.l d3,16(a0) + move.l d5,d3 + move.l (a1),d0 + move.l 20(a2),d1 + + mulu.l d1,d1:d0 + add.l d0,d4 + addx.l d1,d2 + addx.l d5,d3 + + move.l 4(a1),d0 + move.l 16(a2),d1 + + mulu.l d1,d1:d0 + add.l d0,d4 + addx.l d1,d2 + addx.l d5,d3 + + move.l 8(a1),d0 + move.l 12(a2),d1 + + mulu.l d1,d1:d0 + add.l d0,d4 + addx.l d1,d2 + addx.l d5,d3 + + move.l 12(a1),d0 + move.l 8(a2),d1 + + mulu.l d1,d1:d0 + add.l d0,d4 + addx.l d1,d2 + addx.l d5,d3 + + move.l 16(a1),d0 + move.l 4(a2),d1 + + mulu.l d1,d1:d0 + add.l d0,d4 + addx.l d1,d2 + addx.l d5,d3 + + move.l 20(a1),d0 + move.l (a2),d1 + + mulu.l d1,d1:d0 + add.l d0,d4 + addx.l d1,d2 + addx.l d5,d3 + + move.l d4,20(a0) + move.l d5,d4 + move.l 24(a1),d0 + move.l (a2),d1 + + mulu.l d1,d1:d0 + add.l d0,d2 + addx.l d1,d3 + addx.l d5,d4 + + move.l 20(a1),d0 + move.l 4(a2),d1 + + mulu.l d1,d1:d0 + add.l d0,d2 + addx.l d1,d3 + addx.l d5,d4 + + move.l 16(a1),d0 + move.l 8(a2),d1 + + mulu.l d1,d1:d0 + add.l d0,d2 + addx.l d1,d3 + addx.l d5,d4 + + move.l 12(a1),d0 + move.l 12(a2),d1 + + mulu.l d1,d1:d0 + add.l d0,d2 + addx.l d1,d3 + addx.l d5,d4 + + move.l 8(a1),d0 + move.l 16(a2),d1 + + mulu.l d1,d1:d0 + add.l d0,d2 + addx.l d1,d3 + addx.l d5,d4 + + move.l 4(a1),d0 + move.l 20(a2),d1 + + mulu.l d1,d1:d0 + add.l d0,d2 + addx.l d1,d3 + addx.l d5,d4 + + move.l (a1),d0 + move.l 24(a2),d1 + + mulu.l d1,d1:d0 + add.l d0,d2 + addx.l d1,d3 + addx.l d5,d4 + + move.l d2,24(a0) + move.l d5,d2 + move.l (a1),d0 + move.l 28(a2),d1 + + mulu.l d1,d1:d0 + add.l d0,d3 + addx.l d1,d4 + addx.l d5,d2 + + move.l 4(a1),d0 + move.l 24(a2),d1 + + mulu.l d1,d1:d0 + add.l d0,d3 + addx.l d1,d4 + addx.l d5,d2 + + move.l 8(a1),d0 + move.l 20(a2),d1 + + mulu.l d1,d1:d0 + add.l d0,d3 + addx.l d1,d4 + addx.l d5,d2 + + move.l 12(a1),d0 + move.l 16(a2),d1 + + mulu.l d1,d1:d0 + add.l d0,d3 + addx.l d1,d4 + addx.l d5,d2 + + move.l 16(a1),d0 + move.l 12(a2),d1 + + mulu.l d1,d1:d0 + add.l d0,d3 + addx.l d1,d4 + addx.l d5,d2 + + move.l 20(a1),d0 + move.l 8(a2),d1 + + mulu.l d1,d1:d0 + add.l d0,d3 + addx.l d1,d4 + addx.l d5,d2 + + move.l 24(a1),d0 + move.l 4(a2),d1 + + mulu.l d1,d1:d0 + add.l d0,d3 + addx.l d1,d4 + addx.l d5,d2 + + move.l 28(a1),d0 + move.l (a2),d1 + + mulu.l d1,d1:d0 + add.l d0,d3 + addx.l d1,d4 + addx.l d5,d2 + + move.l d3,28(a0) + move.l d5,d3 + move.l 28(a1),d0 + move.l 4(a2),d1 + + mulu.l d1,d1:d0 + add.l d0,d4 + addx.l d1,d2 + addx.l d5,d3 + + move.l 24(a1),d0 + move.l 8(a2),d1 + + mulu.l d1,d1:d0 + add.l d0,d4 + addx.l d1,d2 + addx.l d5,d3 + + move.l 20(a1),d0 + move.l 12(a2),d1 + + mulu.l d1,d1:d0 + add.l d0,d4 + addx.l d1,d2 + addx.l d5,d3 + + move.l 16(a1),d0 + move.l 16(a2),d1 + + mulu.l d1,d1:d0 + add.l d0,d4 + addx.l d1,d2 + addx.l d5,d3 + + move.l 12(a1),d0 + move.l 20(a2),d1 + + mulu.l d1,d1:d0 + add.l d0,d4 + addx.l d1,d2 + addx.l d5,d3 + + move.l 8(a1),d0 + move.l 24(a2),d1 + + mulu.l d1,d1:d0 + add.l d0,d4 + addx.l d1,d2 + addx.l d5,d3 + + move.l 4(a1),d0 + move.l 28(a2),d1 + + mulu.l d1,d1:d0 + add.l d0,d4 + addx.l d1,d2 + addx.l d5,d3 + + move.l d4,32(a0) + move.l d5,d4 + move.l 8(a1),d0 + move.l 28(a2),d1 + + mulu.l d1,d1:d0 + add.l d0,d2 + addx.l d1,d3 + addx.l d5,d4 + + move.l 12(a1),d0 + move.l 24(a2),d1 + + mulu.l d1,d1:d0 + add.l d0,d2 + addx.l d1,d3 + addx.l d5,d4 + + move.l 16(a1),d0 + move.l 20(a2),d1 + + mulu.l d1,d1:d0 + add.l d0,d2 + addx.l d1,d3 + addx.l d5,d4 + + move.l 20(a1),d0 + move.l 16(a2),d1 + + mulu.l d1,d1:d0 + add.l d0,d2 + addx.l d1,d3 + addx.l d5,d4 + + move.l 24(a1),d0 + move.l 12(a2),d1 + + mulu.l d1,d1:d0 + add.l d0,d2 + addx.l d1,d3 + addx.l d5,d4 + + move.l 28(a1),d0 + move.l 8(a2),d1 + + mulu.l d1,d1:d0 + add.l d0,d2 + addx.l d1,d3 + addx.l d5,d4 + + move.l d2,36(a0) + move.l d5,d2 + move.l 28(a1),d0 + move.l 12(a2),d1 + + mulu.l d1,d1:d0 + add.l d0,d3 + addx.l d1,d4 + addx.l d5,d2 + + move.l 24(a1),d0 + move.l 16(a2),d1 + + mulu.l d1,d1:d0 + add.l d0,d3 + addx.l d1,d4 + addx.l d5,d2 + + move.l 20(a1),d0 + move.l 20(a2),d1 + + mulu.l d1,d1:d0 + add.l d0,d3 + addx.l d1,d4 + addx.l d5,d2 + + move.l 16(a1),d0 + move.l 24(a2),d1 + + mulu.l d1,d1:d0 + add.l d0,d3 + addx.l d1,d4 + addx.l d5,d2 + + move.l 12(a1),d0 + move.l 28(a2),d1 + + mulu.l d1,d1:d0 + add.l d0,d3 + addx.l d1,d4 + addx.l d5,d2 + + move.l d3,40(a0) + move.l d5,d3 + move.l 16(a1),d0 + move.l 28(a2),d1 + + mulu.l d1,d1:d0 + add.l d0,d4 + addx.l d1,d2 + addx.l d5,d3 + + move.l 20(a1),d0 + move.l 24(a2),d1 + + mulu.l d1,d1:d0 + add.l d0,d4 + addx.l d1,d2 + addx.l d5,d3 + + move.l 24(a1),d0 + move.l 20(a2),d1 + + mulu.l d1,d1:d0 + add.l d0,d4 + addx.l d1,d2 + addx.l d5,d3 + + move.l 28(a1),d0 + move.l 16(a2),d1 + + mulu.l d1,d1:d0 + add.l d0,d4 + addx.l d1,d2 + addx.l d5,d3 + + move.l d4,44(a0) + move.l d5,d4 + move.l 28(a1),d0 + move.l 20(a2),d1 + + mulu.l d1,d1:d0 + add.l d0,d2 + addx.l d1,d3 + addx.l d5,d4 + + move.l 24(a1),d0 + move.l 24(a2),d1 + + mulu.l d1,d1:d0 + add.l d0,d2 + addx.l d1,d3 + addx.l d5,d4 + + move.l 20(a1),d0 + move.l 28(a2),d1 + + mulu.l d1,d1:d0 + add.l d0,d2 + addx.l d1,d3 + addx.l d5,d4 + + move.l d2,48(a0) + move.l d5,d2 + move.l 24(a1),d0 + move.l 28(a2),d1 + + mulu.l d1,d1:d0 + add.l d0,d3 + addx.l d1,d4 + addx.l d5,d2 + + move.l 28(a1),d0 + move.l 24(a2),d1 + + mulu.l d1,d1:d0 + add.l d0,d3 + addx.l d1,d4 + addx.l d5,d2 + + move.l d3,52(a0) + move.l d5,d3 + move.l 28(a1),d0 + move.l 28(a2),d1 + + mulu.l d1,d1:d0 + add.l d0,d4 + addx.l d1,d2 + addx.l d5,d3 + + move.l d4,56(a0) + move.l d2,60(a0) + + movm.l (sp)+,#0x043c + rts + + .even +.globl _bn_sqr_comba8 +_bn_sqr_comba8: + movm.l #0x3e00,-(sp) + move.l 24(sp),a1 + move.l 28(sp),a0 + clr.l d5 + move.l (a0),d1 + move.l d5,d3 + move.l d5,d4 + move.l d5,d6 + + mulu.l d1,d0:d1 + add.l d1,d5 + addx.l d0,d3 + addx.l d6,d4 + + move.l d5,(a1) + move.l d6,d5 + move.l 4(a0),d2 + move.l (a0),d1 + + mulu.l d2,d2:d1 + add.l d1,d3 + addx.l d2,d4 + addx.l d6,d5 + add.l d1,d3 + addx.l d2,d4 + addx.l d6,d5 + + move.l d3,4(a1) + move.l d6,d3 + move.l 4(a0),d1 + + mulu.l d1,d0:d1 + add.l d1,d4 + addx.l d0,d5 + addx.l d6,d3 + + move.l 8(a0),d2 + move.l (a0),d1 + + mulu.l d2,d2:d1 + add.l d1,d4 + addx.l d2,d5 + addx.l d6,d3 + add.l d1,d4 + addx.l d2,d5 + addx.l d6,d3 + + move.l d4,8(a1) + move.l d6,d4 + move.l 12(a0),d2 + move.l (a0),d1 + + mulu.l d2,d2:d1 + add.l d1,d5 + addx.l d2,d3 + addx.l d6,d4 + add.l d1,d5 + addx.l d2,d3 + addx.l d6,d4 + + move.l 8(a0),d2 + move.l 4(a0),d1 + + mulu.l d2,d2:d1 + add.l d1,d5 + addx.l d2,d3 + addx.l d6,d4 + add.l d1,d5 + addx.l d2,d3 + addx.l d6,d4 + + move.l d5,12(a1) + move.l d6,d5 + move.l 8(a0),d1 + + mulu.l d1,d0:d1 + add.l d1,d3 + addx.l d0,d4 + addx.l d6,d5 + + move.l 12(a0),d2 + move.l 4(a0),d1 + + mulu.l d2,d2:d1 + add.l d1,d3 + addx.l d2,d4 + addx.l d6,d5 + add.l d1,d3 + addx.l d2,d4 + addx.l d6,d5 + + move.l 16(a0),d2 + move.l (a0),d1 + + mulu.l d2,d2:d1 + add.l d1,d3 + addx.l d2,d4 + addx.l d6,d5 + add.l d1,d3 + addx.l d2,d4 + addx.l d6,d5 + + move.l d3,16(a1) + move.l d6,d3 + move.l 20(a0),d2 + move.l (a0),d1 + + mulu.l d2,d2:d1 + add.l d1,d4 + addx.l d2,d5 + addx.l d6,d3 + add.l d1,d4 + addx.l d2,d5 + addx.l d6,d3 + + move.l 16(a0),d2 + move.l 4(a0),d1 + + mulu.l d2,d2:d1 + add.l d1,d4 + addx.l d2,d5 + addx.l d6,d3 + add.l d1,d4 + addx.l d2,d5 + addx.l d6,d3 + + move.l 12(a0),d2 + move.l 8(a0),d1 + + mulu.l d2,d2:d1 + add.l d1,d4 + addx.l d2,d5 + addx.l d6,d3 + add.l d1,d4 + addx.l d2,d5 + addx.l d6,d3 + + move.l d4,20(a1) + move.l d6,d4 + move.l 12(a0),d1 + + mulu.l d1,d0:d1 + add.l d1,d5 + addx.l d0,d3 + addx.l d6,d4 + + move.l 16(a0),d2 + move.l 8(a0),d1 + + mulu.l d2,d2:d1 + add.l d1,d5 + addx.l d2,d3 + addx.l d6,d4 + add.l d1,d5 + addx.l d2,d3 + addx.l d6,d4 + + move.l 20(a0),d2 + move.l 4(a0),d1 + + mulu.l d2,d2:d1 + add.l d1,d5 + addx.l d2,d3 + addx.l d6,d4 + add.l d1,d5 + addx.l d2,d3 + addx.l d6,d4 + + move.l 24(a0),d2 + move.l (a0),d1 + + mulu.l d2,d2:d1 + add.l d1,d5 + addx.l d2,d3 + addx.l d6,d4 + add.l d1,d5 + addx.l d2,d3 + addx.l d6,d4 + + move.l d5,24(a1) + move.l d6,d5 + move.l 28(a0),d2 + move.l (a0),d1 + + mulu.l d2,d2:d1 + add.l d1,d3 + addx.l d2,d4 + addx.l d6,d5 + add.l d1,d3 + addx.l d2,d4 + addx.l d6,d5 + + move.l 24(a0),d2 + move.l 4(a0),d1 + + mulu.l d2,d2:d1 + add.l d1,d3 + addx.l d2,d4 + addx.l d6,d5 + add.l d1,d3 + addx.l d2,d4 + addx.l d6,d5 + + move.l 20(a0),d2 + move.l 8(a0),d1 + + mulu.l d2,d2:d1 + add.l d1,d3 + addx.l d2,d4 + addx.l d6,d5 + add.l d1,d3 + addx.l d2,d4 + addx.l d6,d5 + + move.l 16(a0),d2 + move.l 12(a0),d1 + + mulu.l d2,d2:d1 + add.l d1,d3 + addx.l d2,d4 + addx.l d6,d5 + add.l d1,d3 + addx.l d2,d4 + addx.l d6,d5 + + move.l d3,28(a1) + move.l d6,d3 + move.l 16(a0),d1 + + mulu.l d1,d0:d1 + add.l d1,d4 + addx.l d0,d5 + addx.l d6,d3 + + move.l 20(a0),d2 + move.l 12(a0),d1 + + mulu.l d2,d2:d1 + add.l d1,d4 + addx.l d2,d5 + addx.l d6,d3 + add.l d1,d4 + addx.l d2,d5 + addx.l d6,d3 + + move.l 24(a0),d2 + move.l 8(a0),d1 + + mulu.l d2,d2:d1 + add.l d1,d4 + addx.l d2,d5 + addx.l d6,d3 + add.l d1,d4 + addx.l d2,d5 + addx.l d6,d3 + + move.l 28(a0),d2 + move.l 4(a0),d1 + + mulu.l d2,d2:d1 + add.l d1,d4 + addx.l d2,d5 + addx.l d6,d3 + add.l d1,d4 + addx.l d2,d5 + addx.l d6,d3 + + move.l d4,32(a1) + move.l d6,d4 + move.l 28(a0),d2 + move.l 8(a0),d1 + + mulu.l d2,d2:d1 + add.l d1,d5 + addx.l d2,d3 + addx.l d6,d4 + add.l d1,d5 + addx.l d2,d3 + addx.l d6,d4 + + move.l 24(a0),d2 + move.l 12(a0),d1 + + mulu.l d2,d2:d1 + add.l d1,d5 + addx.l d2,d3 + addx.l d6,d4 + add.l d1,d5 + addx.l d2,d3 + addx.l d6,d4 + + move.l 20(a0),d2 + move.l 16(a0),d1 + + mulu.l d2,d2:d1 + add.l d1,d5 + addx.l d2,d3 + addx.l d6,d4 + add.l d1,d5 + addx.l d2,d3 + addx.l d6,d4 + + move.l d5,36(a1) + move.l d6,d5 + move.l 20(a0),d1 + + mulu.l d1,d0:d1 + add.l d1,d3 + addx.l d0,d4 + addx.l d6,d5 + + move.l 24(a0),d2 + move.l 16(a0),d1 + + mulu.l d2,d2:d1 + add.l d1,d3 + addx.l d2,d4 + addx.l d6,d5 + add.l d1,d3 + addx.l d2,d4 + addx.l d6,d5 + + move.l 28(a0),d2 + move.l 12(a0),d1 + + mulu.l d2,d2:d1 + add.l d1,d3 + addx.l d2,d4 + addx.l d6,d5 + add.l d1,d3 + addx.l d2,d4 + addx.l d6,d5 + + move.l d3,40(a1) + move.l d6,d3 + move.l 28(a0),d2 + move.l 16(a0),d1 + + mulu.l d2,d2:d1 + add.l d1,d4 + addx.l d2,d5 + addx.l d6,d3 + add.l d1,d4 + addx.l d2,d5 + addx.l d6,d3 + + move.l 24(a0),d2 + move.l 20(a0),d1 + + mulu.l d2,d2:d1 + add.l d1,d4 + addx.l d2,d5 + addx.l d6,d3 + add.l d1,d4 + addx.l d2,d5 + addx.l d6,d3 + + move.l d4,44(a1) + move.l d6,d4 + move.l 24(a0),d1 + + mulu.l d1,d0:d1 + add.l d1,d5 + addx.l d0,d3 + addx.l d6,d4 + + move.l 28(a0),d2 + move.l 20(a0),d1 + + mulu.l d2,d2:d1 + add.l d1,d5 + addx.l d2,d3 + addx.l d6,d4 + add.l d1,d5 + addx.l d2,d3 + addx.l d6,d4 + + move.l d5,48(a1) + move.l d6,d5 + move.l 28(a0),d2 + move.l 24(a0),d1 + + mulu.l d2,d2:d1 + add.l d1,d3 + addx.l d2,d4 + addx.l d6,d5 + add.l d1,d3 + addx.l d2,d4 + addx.l d6,d5 + + move.l d3,52(a1) + move.l d6,d3 + move.l 28(a0),d1 + + mulu.l d1,d0:d1 + add.l d1,d4 + addx.l d0,d5 + addx.l d6,d3 + + move.l d4,56(a1) + move.l d5,60(a1) + movm.l (sp)+,#0x7c + rts + + .even +.globl _bn_sqr_comba4 +_bn_sqr_comba4: + movm.l #0x3e00,-(sp) + move.l 24(sp),a1 + move.l 28(sp),a0 + clr.l d5 + move.l (a0),d1 + move.l d5,d4 + move.l d5,d3 + move.l d5,d6 + + mulu.l d1,d0:d1 + add.l d1,d5 + addx.l d0,d4 + addx.l d6,d3 + + move.l d5,(a1) + move.l d6,d5 + move.l 4(a0),d2 + move.l (a0),d1 + + mulu.l d2,d2:d1 + add.l d1,d4 + addx.l d2,d3 + addx.l d6,d5 + add.l d1,d4 + addx.l d2,d3 + addx.l d6,d5 + + move.l d4,4(a1) + move.l d6,d4 + move.l 4(a0),d1 + + mulu.l d1,d0:d1 + add.l d1,d3 + addx.l d0,d5 + addx.l d6,d4 + + move.l 8(a0),d2 + move.l (a0),d1 + + mulu.l d2,d2:d1 + add.l d1,d3 + addx.l d2,d5 + addx.l d6,d4 + add.l d1,d3 + addx.l d2,d5 + addx.l d6,d4 + + move.l d3,8(a1) + move.l d6,d3 + move.l 12(a0),d2 + move.l (a0),d1 + + mulu.l d2,d2:d1 + add.l d1,d5 + addx.l d2,d4 + addx.l d6,d3 + add.l d1,d5 + addx.l d2,d4 + addx.l d6,d3 + + move.l 8(a0),d2 + move.l 4(a0),d1 + + mulu.l d2,d2:d1 + add.l d1,d5 + addx.l d2,d4 + addx.l d6,d3 + add.l d1,d5 + addx.l d2,d4 + addx.l d6,d3 + + move.l d5,12(a1) + move.l d6,d5 + move.l 8(a0),d1 + + mulu.l d1,d0:d1 + add.l d1,d4 + addx.l d0,d3 + addx.l d6,d5 + + move.l 12(a0),d2 + move.l 4(a0),d1 + + mulu.l d2,d2:d1 + add.l d1,d4 + addx.l d2,d3 + addx.l d6,d5 + add.l d1,d4 + addx.l d2,d3 + addx.l d6,d5 + + move.l d4,16(a1) + move.l d6,d4 + move.l 12(a0),d2 + move.l 8(a0),d1 + + mulu.l d2,d2:d1 + add.l d1,d3 + addx.l d2,d5 + addx.l d6,d4 + add.l d1,d3 + addx.l d2,d5 + addx.l d6,d4 + + move.l d3,20(a1) + move.l d6,d3 + move.l 12(a0),d1 + + mulu.l d1,d0:d1 + add.l d1,d5 + addx.l d0,d4 + addx.l d6,d3 + + move.l d5,24(a1) + move.l d4,28(a1) + movm.l (sp)+,#0x7c + rts + + .even +.globl _bn_mul_comba4 +_bn_mul_comba4: + movm.l #0x3c20,-(sp) + move.l 24(sp),a2 + move.l 28(sp),a0 + move.l 32(sp),a1 + clr.l d4 + move.l (a0),d1 + move.l (a1),d0 + move.l d4,d3 + move.l d4,d2 + move.l d4,d5 + + mulu.l d1,d0:d1 + add.l d1,d4 + addx.l d0,d3 + addx.l d5,d2 + + move.l d4,(a2) + move.l d5,d4 + move.l (a0),d1 + move.l 4(a1),d0 + + mulu.l d1,d0:d1 + add.l d1,d3 + addx.l d0,d2 + addx.l d5,d4 + + move.l 4(a0),d1 + move.l (a1),d0 + + mulu.l d1,d0:d1 + add.l d1,d3 + addx.l d0,d2 + addx.l d5,d4 + + move.l d3,4(a2) + move.l d5,d3 + move.l 8(a0),d1 + move.l (a1),d0 + + mulu.l d1,d0:d1 + add.l d1,d2 + addx.l d0,d4 + addx.l d5,d3 + + move.l 4(a0),d1 + move.l 4(a1),d0 + + mulu.l d1,d0:d1 + add.l d1,d2 + addx.l d0,d4 + addx.l d5,d3 + + move.l (a0),d1 + move.l 8(a1),d0 + + mulu.l d1,d0:d1 + add.l d1,d2 + addx.l d0,d4 + addx.l d5,d3 + + move.l d2,8(a2) + move.l d5,d2 + move.l (a0),d1 + move.l 12(a1),d0 + + mulu.l d1,d0:d1 + add.l d1,d4 + addx.l d0,d3 + addx.l d5,d2 + + move.l 4(a0),d1 + move.l 8(a1),d0 + + mulu.l d1,d0:d1 + add.l d1,d4 + addx.l d0,d3 + addx.l d5,d2 + + move.l 8(a0),d1 + move.l 4(a1),d0 + + mulu.l d1,d0:d1 + add.l d1,d4 + addx.l d0,d3 + addx.l d5,d2 + + move.l 12(a0),d1 + move.l (a1),d0 + + mulu.l d1,d0:d1 + add.l d1,d4 + addx.l d0,d3 + addx.l d5,d2 + + move.l d4,12(a2) + move.l d5,d4 + move.l 12(a0),d1 + move.l 4(a1),d0 + + mulu.l d1,d0:d1 + add.l d1,d3 + addx.l d0,d2 + addx.l d5,d4 + + move.l 8(a0),d1 + move.l 8(a1),d0 + + mulu.l d1,d0:d1 + add.l d1,d3 + addx.l d0,d2 + addx.l d5,d4 + + move.l 4(a0),d1 + move.l 12(a1),d0 + + mulu.l d1,d0:d1 + add.l d1,d3 + addx.l d0,d2 + addx.l d5,d4 + + move.l d3,16(a2) + move.l d5,d3 + move.l 8(a0),d1 + move.l 12(a1),d0 + + mulu.l d1,d0:d1 + add.l d1,d2 + addx.l d0,d4 + addx.l d5,d3 + + move.l 12(a0),d1 + move.l 8(a1),d0 + + mulu.l d1,d0:d1 + add.l d1,d2 + addx.l d0,d4 + addx.l d5,d3 + + move.l d2,20(a2) + move.l d5,d2 + move.l 12(a0),d1 + move.l 12(a1),d0 + + mulu.l d1,d0:d1 + add.l d1,d4 + addx.l d0,d3 + addx.l d5,d2 + + move.l d4,24(a2) + move.l d3,28(a2) + movm.l (sp)+,#0x43c + rts + +/* bn_div_words should really just be inlined wherever it's used */ + + .even +.globl _bn_div_words +_bn_div_words: + move.l 4(sp),d1 + move.l 8(sp),d0 + divu.l 12(sp),d1:d0 + rts + + .even +.globl _bn_add_words +_bn_add_words: + movm.l #0x2030,-(sp) + movm.l 16(sp),#0x0f00 + clr.l d0 + tst.l a3 + jble 3f + +/* d0 is 0, use this shift to clear the eXtend bit */ + lsl.l #1,d0 +1: + move.l (a1)+,d1 + move.l (a2)+,d2 + addx.l d1,d2 + move.l d2,(a0)+ + subq.l #1,a3 + tst.l a3 + jble 2f + + move.l (a1)+,d1 + move.l (a2)+,d2 + addx.l d1,d2 + move.l d2,(a0)+ + subq.l #1,a3 + tst.l a3 + jble 2f + + move.l (a1)+,d1 + move.l (a2)+,d2 + addx.l d1,d2 + move.l d2,(a0)+ + subq.l #1,a3 + tst.l a3 + jble 2f + + move.l (a1)+,d1 + move.l (a2)+,d2 + addx.l d1,d2 + move.l d2,(a0)+ + subq.l #1,a3 + tst.l a3 + jgt 1b +2: + addx.l d0,d0 +3: + movm.l (sp)+,#0x0c04 + rts + + .even +.globl _bn_sub_words +_bn_sub_words: + movm.l #0x2030,-(sp) + movm.l 16(sp),#0x0f00 + clr.l d0 + tst.l a3 + jble 3f + + lsl.l #1,d0 +1: + move.l (a1)+,d2 + move.l (a2)+,d1 + subx.l d1,d2 + move.l d2,(a0)+ + subq.l #1,a3 + tst.l a3 + jble 2f + + move.l (a1)+,d2 + move.l (a2)+,d1 + subx.l d1,d2 + move.l d2,(a0)+ + subq.l #1,a3 + tst.l a3 + jble 2f + + move.l (a1)+,d2 + move.l (a2)+,d1 + subx.l d1,d2 + move.l d2,(a0)+ + subq.l #1,a3 + tst.l a3 + jble 2f + + move.l (a1)+,d2 + move.l (a2)+,d1 + subx.l d1,d2 + move.l d2,(a0)+ + subq.l #1,a3 + tst.l a3 + jgt 1b +2: + addx.l d0,d0 +3: + movm.l (sp)+,#0x0c04 + rts 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/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 945f8a5..0000000 --- a/sdk/recipes/patches/libcurl/m68k-unknown-amigaos/src.tool_operate.c.p +++ /dev/null @@ -1,18 +0,0 @@ ---- src/tool_operate.c.orig 2015-02-24 21:49:02.000000000 +0000 -+++ src/tool_operate.c 2015-03-19 22:13:50.477958123 +0000 -@@ -1620,15 +1620,6 @@ - } - } - --#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 -- - #ifdef HAVE_UTIME - /* File time can only be set _after_ the file has been closed */ - if(!result && config->remote_time && outs.s_isreg && outs.filename) { 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 9a2b590..0000000 --- a/sdk/recipes/patches/libcurl/ppc-amigaos/lib.hostip4.c.p +++ /dev/null @@ -1,61 +0,0 @@ ---- lib/hostip4.c 2013-10-23 21:55:34.000000000 +0100 -+++ lib/hostip4.c 2014-01-30 10:19:46.900018967 +0000 -@@ -122,6 +122,11 @@ 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) - { -@@ -132,6 +137,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 */ -@@ -294,7 +302,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 */ - } - -@@ -304,7 +325,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 945f8a5..0000000 --- a/sdk/recipes/patches/libcurl/ppc-amigaos/src.tool_operate.c.p +++ /dev/null @@ -1,18 +0,0 @@ ---- src/tool_operate.c.orig 2015-02-24 21:49:02.000000000 +0000 -+++ src/tool_operate.c 2015-03-19 22:13:50.477958123 +0000 -@@ -1620,15 +1620,6 @@ - } - } - --#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 -- - #ifdef HAVE_UTIME - /* File time can only be set _after_ the file has been closed */ - if(!result && config->remote_time && outs.s_isreg && outs.filename) { 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 new file mode 100644 index 0000000..ac19b03 --- /dev/null +++ b/sdk/recipes/patches/libiconv/m68k-unknown-amigaos/srclib.getprogname.c.p @@ -0,0 +1,11 @@ +--- 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 "?"; + # else +-# error "getprogname module not ported to this OS" ++ 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 93ee6a9..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,12 +1,12 @@ ---- srclib/signal.in.h.orig 2011-08-07 14:42:06.000000000 +0100 -+++ srclib/signal.in.h 2014-01-15 00:57:27.620548058 +0000 -@@ -168,69 +168,6 @@ - - # endif +--- srclib/signal.in.h 2017-01-01 23:02:22.000000000 +0000 ++++ srclib/signal.in.h 2017-03-26 22:56:18.360017409 +0100 +@@ -223,69 +223,6 @@ typedef int verify_NSIG_constraint[NSIG + # undef sigismember + #endif -/* Test whether a given signal is contained in a signal set. */ -# if @HAVE_POSIX_SIGNALBLOCKING@ --/* This function is defined as a macro on MacOS X. */ +-/* This function is defined as a macro on Mac OS X. */ -# if defined __cplusplus && defined GNULIB_NAMESPACE -# undef sigismember -# endif @@ -19,7 +19,7 @@ - -/* Initialize a signal set to the empty set. */ -# if @HAVE_POSIX_SIGNALBLOCKING@ --/* This function is defined as a macro on MacOS X. */ +-/* This function is defined as a macro on Mac OS X. */ -# if defined __cplusplus && defined GNULIB_NAMESPACE -# undef sigemptyset -# endif @@ -31,7 +31,7 @@ - -/* Add a signal to a signal set. */ -# if @HAVE_POSIX_SIGNALBLOCKING@ --/* This function is defined as a macro on MacOS X. */ +-/* This function is defined as a macro on Mac OS X. */ -# if defined __cplusplus && defined GNULIB_NAMESPACE -# undef sigaddset -# endif @@ -44,7 +44,7 @@ - -/* Remove a signal from a signal set. */ -# if @HAVE_POSIX_SIGNALBLOCKING@ --/* This function is defined as a macro on MacOS X. */ +-/* This function is defined as a macro on Mac OS X. */ -# if defined __cplusplus && defined GNULIB_NAMESPACE -# undef sigdelset -# endif @@ -57,7 +57,7 @@ - -/* Fill a signal set with all possible signals. */ -# if @HAVE_POSIX_SIGNALBLOCKING@ --/* This function is defined as a macro on MacOS X. */ +-/* This function is defined as a macro on Mac OS X. */ -# if defined __cplusplus && defined GNULIB_NAMESPACE -# undef sigfillset -# 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 eecac92..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 2014-01-15 01:06:20.525844246 +0000 -+++ srclib/unistd.in.h 2014-01-15 01:06:48.717471325 +0000 -@@ -1145,40 +1145,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 +@@ -1873,44 +1873,6 @@ #endif @@ -8,25 +8,29 @@ -/* Read the contents of the symbolic link FILE and place the first BUFSIZE - bytes of it into BUF. Return the number of bytes placed into BUF if - successful, otherwise -1 and errno set. -- See the POSIX:2001 specification -- <http://www.opengroup.org/susv3xsh/readlink.html>. */ +- See the POSIX:2008 specification +- <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 @@ -39,5 +43,5 @@ - - #if @GNULIB_READLINKAT@ - # if !@HAVE_READLINKAT@ - _GL_FUNCDECL_SYS (readlinkat, ssize_t, + # if @REPLACE_READLINKAT@ + # if !(defined __cplusplus && defined GNULIB_NAMESPACE) diff --git a/sdk/recipes/patches/libiconv/ppc-amigaos/srclib.getprogname.c.p b/sdk/recipes/patches/libiconv/ppc-amigaos/srclib.getprogname.c.p new file mode 100644 index 0000000..ac19b03 --- /dev/null +++ b/sdk/recipes/patches/libiconv/ppc-amigaos/srclib.getprogname.c.p @@ -0,0 +1,11 @@ +--- 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 "?"; + # else +-# error "getprogname module not ported to this OS" ++ 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 93ee6a9..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,12 +1,12 @@ ---- srclib/signal.in.h.orig 2011-08-07 14:42:06.000000000 +0100 -+++ srclib/signal.in.h 2014-01-15 00:57:27.620548058 +0000 -@@ -168,69 +168,6 @@ - - # endif +--- srclib/signal.in.h 2017-01-01 23:02:22.000000000 +0000 ++++ srclib/signal.in.h 2017-03-26 22:56:18.360017409 +0100 +@@ -223,69 +223,6 @@ typedef int verify_NSIG_constraint[NSIG + # undef sigismember + #endif -/* Test whether a given signal is contained in a signal set. */ -# if @HAVE_POSIX_SIGNALBLOCKING@ --/* This function is defined as a macro on MacOS X. */ +-/* This function is defined as a macro on Mac OS X. */ -# if defined __cplusplus && defined GNULIB_NAMESPACE -# undef sigismember -# endif @@ -19,7 +19,7 @@ - -/* Initialize a signal set to the empty set. */ -# if @HAVE_POSIX_SIGNALBLOCKING@ --/* This function is defined as a macro on MacOS X. */ +-/* This function is defined as a macro on Mac OS X. */ -# if defined __cplusplus && defined GNULIB_NAMESPACE -# undef sigemptyset -# endif @@ -31,7 +31,7 @@ - -/* Add a signal to a signal set. */ -# if @HAVE_POSIX_SIGNALBLOCKING@ --/* This function is defined as a macro on MacOS X. */ +-/* This function is defined as a macro on Mac OS X. */ -# if defined __cplusplus && defined GNULIB_NAMESPACE -# undef sigaddset -# endif @@ -44,7 +44,7 @@ - -/* Remove a signal from a signal set. */ -# if @HAVE_POSIX_SIGNALBLOCKING@ --/* This function is defined as a macro on MacOS X. */ +-/* This function is defined as a macro on Mac OS X. */ -# if defined __cplusplus && defined GNULIB_NAMESPACE -# undef sigdelset -# endif @@ -57,7 +57,7 @@ - -/* Fill a signal set with all possible signals. */ -# if @HAVE_POSIX_SIGNALBLOCKING@ --/* This function is defined as a macro on MacOS X. */ +-/* This function is defined as a macro on Mac OS X. */ -# if defined __cplusplus && defined GNULIB_NAMESPACE -# undef sigfillset -# 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/libiconv/ppc-amigaos/srclib.unistd.in.h.p b/sdk/recipes/patches/libiconv/ppc-amigaos/srclib.unistd.in.h.p deleted file mode 100644 index eecac92..0000000 --- a/sdk/recipes/patches/libiconv/ppc-amigaos/srclib.unistd.in.h.p +++ /dev/null @@ -1,43 +0,0 @@ ---- srclib/unistd.in.h.orig 2014-01-15 01:06:20.525844246 +0000 -+++ srclib/unistd.in.h 2014-01-15 01:06:48.717471325 +0000 -@@ -1145,40 +1145,6 @@ - #endif - - --#if @GNULIB_READLINK@ --/* Read the contents of the symbolic link FILE and place the first BUFSIZE -- bytes of it into BUF. Return the number of bytes placed into BUF if -- successful, otherwise -1 and errno set. -- See the POSIX:2001 specification -- <http://www.opengroup.org/susv3xsh/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) -- _GL_ARG_NONNULL ((1, 2))); --_GL_CXXALIAS_RPL (readlink, ssize_t, -- (const char *file, char *buf, size_t bufsize)); --# else --# if !@HAVE_READLINK@ --_GL_FUNCDECL_SYS (readlink, ssize_t, -- (const char *file, char *buf, size_t bufsize) -- _GL_ARG_NONNULL ((1, 2))); --# endif --_GL_CXXALIAS_SYS (readlink, ssize_t, -- (const char *file, char *buf, size_t bufsize)); --# endif --_GL_CXXALIASWARN (readlink); --#elif defined GNULIB_POSIXCHECK --# undef readlink --# if HAVE_RAW_DECL_READLINK --_GL_WARN_ON_USE (readlink, "readlink is unportable - " -- "use gnulib module readlink for portability"); --# endif --#endif -- -- - #if @GNULIB_READLINKAT@ - # if !@HAVE_READLINKAT@ - _GL_FUNCDECL_SYS (readlinkat, ssize_t, 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 new file mode 100644 index 0000000..26bb873 --- /dev/null +++ b/sdk/recipes/patches/openssl/Configurations-50-amigaos.conf.p @@ -0,0 +1,35 @@ +--- /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,32 @@ ++my %targets = ( ++ ++ "ppc-amigaos" => { ++ 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")), ++ thread_scheme => "(unknown)", ++ asm_arch => "ppc32", ++ perlasm_scheme => "linux32", ++ sys_id => "AMIGAOS4", ++ bn_ops => "THIRTY_TWO_BIT BN_LLONG RC4_CHAR", ++ ranlib => "ppc-amigaos-ranlib", ++ }, ++ ++ "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=gnu99", ++ debug => "-O0 -g", ++ release => "-O3 -fomit-frame-pointer", ++ 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 new file mode 100644 index 0000000..c3f2fe5 --- /dev/null +++ b/sdk/recipes/patches/openssl/Configurations-50-riscos.conf.p @@ -0,0 +1,29 @@ +--- /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,26 @@ ++my %targets = ( ++ ++ "arm-unknown-riscos" => { ++ inherit_from => [ "BASE_unix" ], ++ cc => "arm-unknown-riscos-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", ++ }, ++ ++ "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 new file mode 100644 index 0000000..fafa6cf --- /dev/null +++ b/sdk/recipes/patches/openssl/Configurations-50-windows.conf.p @@ -0,0 +1,29 @@ +--- /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,26 @@ ++my %targets = ( ++ ++ "i686-w64-mingw32" => { ++ 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", ++ 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", ++ shared_cflag => add("-D_WINDLL"), ++ shared_ldflag => "-static-libgcc", ++ shared_rcflag => "--target=pe-i386", ++ shared_extension => ".dll", ++ multilib => "", ++ apps_aux_src => add("win32_init.c"), ++ }, ++); diff --git a/sdk/recipes/patches/openssl/Configure.p b/sdk/recipes/patches/openssl/Configure.p index c54b734..aff7878 100644 --- a/sdk/recipes/patches/openssl/Configure.p +++ b/sdk/recipes/patches/openssl/Configure.p @@ -1,24 +1,11 @@ ---- Configure.old 2010-12-29 02:43:14.000000000 +0000 -+++ Configure 2010-12-29 02:45:29.000000000 +0000 -@@ -440,6 +440,13 @@ - "beos-x86-r5", "gcc:-DL_ENDIAN -DTERMIOS -O3 -fomit-frame-pointer -mcpu=pentium -Wall::-D_REENTRANT:BEOS:-lbe -lnet:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:beos:beos-shared:-fPIC -DPIC:-shared:.so", - "beos-x86-bone", "gcc:-DL_ENDIAN -DTERMIOS -O3 -fomit-frame-pointer -mcpu=pentium -Wall::-D_REENTRANT:BEOS:-lbe -lbind -lsocket:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:beos:beos-shared:-fPIC:-shared:.so", +--- Configure.orig 2017-10-17 14:53:18.369801491 +0100 ++++ Configure 2017-10-17 15:11:04.312242542 +0100 +@@ -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"); -+"arm-unknown-riscos","arm-unknown-riscos-gcc:-DL_ENDIAN -DTERMIOS -DNO_SYS_UN_H -O3 -fomit-frame-pointer -Wall::-D_REENTRANT:::BN_LLONG DES_RISC1::::::::::::::::::::echo", -+"m68k-atari-mint","m68k-atari-mint-gcc:-DB_ENDIAN -DTERMIOS -DNO_SYSLOG -DNO_SYS_UN_H -DOPENSSL_USE_IPV6=0 -O3 -fomit-frame-pointer -Wall::-D_REENTRANT:::BN_LLONG DES_RISC1::::::::::::::::::::m68k-atari-mint-ranlib", -+"m5475-atari-mint","m5475-atari-mint-gcc:-DB_ENDIAN -DTERMIOS -DNO_SYSLOG -DNO_SYS_UN_H -DOPENSSL_USE_IPV6=0 -O3 -fomit-frame-pointer -Wall::-D_REENTRANT:::BN_LLONG DES_RISC1::::::::::::::::::::m5475-atari-mint-ranlib", -+"m68k-unknown-amigaos","m68k-unknown-amigaos-gcc:-DB_ENDIAN -DOPENSSL_SYS_AMIGAOS3 -DNO_SYSLOG -DHAVE_FORK=0 -DNO_SYS_PARAM_H -DNO_SYS_UN_H -m68020 -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-lnet -lm:BN_LLONG::bn_m68k.o::::::::::::::::::m68k-unknown-amigaos-ranlib", -+"ppc-amigaos","ppc-amigaos-gcc:-DB_ENDIAN -DOPENSSL_SYS_AMIGAOS4 -DNO_SYSLOG -DHAVE_FORK=0 -DNO_SYS_PARAM_H -DNO_SYS_UN_H -O3 -fomit-frame-pointer -Wall::-D_REENTRANT:::BN_LLONG RC4_CHAR RC4_CHUNK:${ppc32_asm}:linux32::::::ppc-amigaos-ranlib", -+"i686-w64-mingw32", "gcc:-DL_ENDIAN -DWIN32_LEAN_AND_MEAN -fomit-frame-pointer -O3 -march=i486 -Wall::-D_MT:MINGW32:-lws2_32 -lgdi32 -lcrypt32:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts} EXPORT_VAR_AS_FN:${x86_asm}:coff:win32:cygwin-shared:-D_WINDLL -DOPENSSL_USE_APPLINK:-mno-cygwin:.dll.a", -+ - #### SCO/Caldera targets. - # - # Originally we had like unixware-*, unixware-*-pentium, unixware-*-p6, etc. -@@ -1123,6 +1130,7 @@ - my $IsMK1MF=scalar grep /^$target$/,@MK1MF_Builds; - - $exe_ext=".exe" if ($target eq "Cygwin" || $target eq "DJGPP" || $target =~ /^mingw/); -+$exe_ext=",e1f" if ($target eq "arm-unknown-riscos"); - $exe_ext=".nlm" if ($target =~ /netware/); - $exe_ext=".pm" if ($target =~ /vos/); - $openssldir="/usr/local/ssl" if ($openssldir eq "" and $prefix eq ""); + # 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 new file mode 100644 index 0000000..132d473 --- /dev/null +++ b/sdk/recipes/patches/openssl/apps.speed.c.p @@ -0,0 +1,34 @@ +--- 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> + ++ ++#if defined(OPENSSL_SYS_AMIGAOS3) || defined(OPENSSL_SYS_AMIGAOS4) ++# define HAVE_FORK 0 ++# undef SIGALRM ++#endif ++ + #ifndef HAVE_FORK + # if defined(OPENSSL_SYS_VMS) || defined(OPENSSL_SYS_WINDOWS) || defined(OPENSSL_SYS_VXWORKS) + # define HAVE_FORK 0 +@@ -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/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/crypto.bio.bio_local.h.p b/sdk/recipes/patches/openssl/crypto.bio.bio_local.h.p new file mode 100644 index 0000000..e811d8b --- /dev/null +++ b/sdk/recipes/patches/openssl/crypto.bio.bio_local.h.p @@ -0,0 +1,11 @@ +--- 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. + */ +-# if defined(OPENSSL_SYS_WINDOWS) || defined(OPENSSL_SYS_VMS) ++# if defined(OPENSSL_SYS_WINDOWS) || defined(OPENSSL_SYS_VMS) || defined(OPENSSL_SYS_RISCOS) || defined(OPENSSL_SYS_AMIGAOS3) || defined(OPENSSL_SYS_AMIGAOS4) + # undef AF_UNIX + # endif + diff --git a/sdk/recipes/patches/openssl/crypto.pkcs7.bio_pk7.c.p b/sdk/recipes/patches/openssl/crypto.pkcs7.bio_pk7.c.p new file mode 100644 index 0000000..ac43e2d --- /dev/null +++ b/sdk/recipes/patches/openssl/crypto.pkcs7.bio_pk7.c.p @@ -0,0 +1,15 @@ +--- crypto/pkcs7/bio_pk7.c.orig 2017-11-22 07:58:17.501346816 +0000 ++++ crypto/pkcs7/bio_pk7.c 2017-11-22 08:00:09.130073671 +0000 +@@ -12,7 +12,11 @@ + #include <openssl/bio.h> + + #if !defined(OPENSSL_SYS_VXWORKS) +-# include <memory.h> ++# if !defined(OPENSSL_SYS_AMIGAOS3) && !defined(OPENSSL_SYS_AMIGAOS4) ++# include <memory.h> ++# else ++# include <string.h> ++# endif + #endif + #include <stdio.h> + diff --git a/sdk/recipes/patches/openssl/crypto.rand.rand_unix.c.p b/sdk/recipes/patches/openssl/crypto.rand.rand_unix.c.p new file mode 100644 index 0000000..366cd19 --- /dev/null +++ b/sdk/recipes/patches/openssl/crypto.rand.rand_unix.c.p @@ -0,0 +1,12 @@ +--- 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)) ++ || defined(OPENSSL_SYS_UEFI) || defined(OPENSSL_SYS_AMIGAOS3) \ ++ || defined(OPENSSL_SYS_AMIGAOS4)) + + # if defined(OPENSSL_SYS_VOS) + 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.bn_div.c.p b/sdk/recipes/patches/openssl/m68k-atari-mint/crypto.bn.bn_div.c.p new file mode 100644 index 0000000..0d5492f --- /dev/null +++ b/sdk/recipes/patches/openssl/m68k-atari-mint/crypto.bn.bn_div.c.p @@ -0,0 +1,25 @@ +--- 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 + q; \ + }) + # define REMAINDER_IS_ALREADY_CALCULATED ++# elif defined(__mc68020__) ++ /* Same rationale as for i386. On the 68020-60/CPU32 the divu ++ * instruction will take a 64 bit dividend in a register pair ++ * and overwrite that pair with the remainder:quotient. ++ * Howard Chu ++ */ ++# undef bn_div_words ++# define bn_div_words(n0,n1,d0) \ ++ ({ asm volatile ( \ ++ "divu.l %4,%2:%3" \ ++ : "=d"(rem), "=d"(q) \ ++ : "0"(n0), "1"(n1), "d"(d0) \ ++ : "cc"); \ ++ q; \ ++ }) ++# define REMAINDER_IS_ALREADY_CALCULATED + # endif /* __<cpu> */ + # endif /* __GNUC__ */ + # endif /* OPENSSL_NO_ASM */ 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 new file mode 100644 index 0000000..93db04c --- /dev/null +++ b/sdk/recipes/patches/openssl/m68k-unknown-amigaos/crypto.bio.b_sock2.c.p @@ -0,0 +1,34 @@ +--- 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, + (const void *)&on, sizeof(on)) != 0) { +@@ -107,6 +108,7 @@ + return 0; + } + } ++#endif + + if (connect(sock, BIO_ADDR_sockaddr(addr), + BIO_ADDR_sockaddr_size(addr)) == -1) { +@@ -252,6 +254,7 @@ + } + } + ++#if defined(TCP_NODELAY) + if (options & BIO_SOCK_NODELAY) { + if (setsockopt(sock, IPPROTO_TCP, TCP_NODELAY, + (const void *)&on, sizeof(on)) != 0) { +@@ -261,6 +264,7 @@ + return 0; + } + } ++#endif + + /* 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.Makefile.p b/sdk/recipes/patches/openssl/m68k-unknown-amigaos/crypto.bn.Makefile.p deleted file mode 100644 index 8d3bfc6..0000000 --- a/sdk/recipes/patches/openssl/m68k-unknown-amigaos/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-unknown-amigaos/crypto.bn.bn_div.c.p 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.p +++ 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.ui.ui_openssl.c.p b/sdk/recipes/patches/openssl/m68k-unknown-amigaos/crypto.ui.ui_openssl.c.p new file mode 100644 index 0000000..3407a48 --- /dev/null +++ b/sdk/recipes/patches/openssl/m68k-unknown-amigaos/crypto.ui.ui_openssl.c.p @@ -0,0 +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 +@@ -103,6 +103,18 @@ + # undef SGTTY + # endif + ++# 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 ++ + # ifdef TERMIOS + # include <termios.h> + # define TTY_STRUCT struct termios diff --git a/sdk/recipes/patches/openssl/m68k-unknown-amigaos/no-term.p b/sdk/recipes/patches/openssl/m68k-unknown-amigaos/no-term.p deleted file mode 100644 index 890cef3..0000000 --- a/sdk/recipes/patches/openssl/m68k-unknown-amigaos/no-term.p +++ /dev/null @@ -1,24 +0,0 @@ ---- crypto/ui/ui_openssl.c.orig 2011-03-08 22:37:51.000000000 +0000 -+++ crypto/ui/ui_openssl.c 2011-03-08 22:39:00.000000000 +0000 -@@ -218,6 +218,12 @@ - - #endif - -+#if defined(OPENSSL_SYS_AMIGAOS3) -+#undef TERMIOS -+#undef TERMIO -+#undef SGTTY -+#endif -+ - #ifdef TERMIOS - # include <termios.h> - # define TTY_STRUCT struct termios -@@ -266,7 +272,7 @@ - typedef int sig_atomic_t; - #endif - --#if defined(OPENSSL_SYS_MACINTOSH_CLASSIC) || defined(MAC_OS_GUSI_SOURCE) || defined(OPENSSL_SYS_NETWARE) -+#if defined(OPENSSL_SYS_MACINTOSH_CLASSIC) || defined(MAC_OS_GUSI_SOURCE) || defined(OPENSSL_SYS_NETWARE) || defined(OPENSSL_SYS_AMIGAOS3) - /* - * This one needs work. As a matter of fact the code is unoperational - * and this is only a trick to get it compiled. 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/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.Makefile.p b/sdk/recipes/patches/openssl/ppc-amigaos/crypto.Makefile.p deleted file mode 100644 index 3a9bf62..0000000 --- a/sdk/recipes/patches/openssl/ppc-amigaos/crypto.Makefile.p +++ /dev/null @@ -1,11 +0,0 @@ ---- crypto/Makefile 2017-01-26 13:22:03.000000000 +0000 -+++ crypto/Makefile 2017-02-08 00:05:03.883009508 +0000 -@@ -71,7 +71,7 @@ uplink-x86.s: $(TOP)/ms/uplink-x86.pl - - x86_64cpuid.s: x86_64cpuid.pl; $(PERL) x86_64cpuid.pl $(PERLASM_SCHEME) > $@ - ia64cpuid.s: ia64cpuid.S; $(CC) $(CFLAGS) -E ia64cpuid.S > $@ --ppccpuid.s: ppccpuid.pl; $(PERL) ppccpuid.pl $(PERLASM_SCHEME) $@ -+ppccpuid.s: ppccpuid.pl; $(PERL) ppccpuid.pl $(PERLASM_SCHEME) > $@ - pariscid.s: pariscid.pl; $(PERL) pariscid.pl $(PERLASM_SCHEME) $@ - alphacpuid.s: alphacpuid.pl - (preproc=$$$$.$@.S; trap "rm $$preproc" INT; \ 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 new file mode 100644 index 0000000..ac14e86 --- /dev/null +++ b/sdk/recipes/patches/openssl/ppc-amigaos/crypto.bio_b_addr.c.p @@ -0,0 +1,11 @@ +--- 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++) + ; + +- for(addresses = addrlistp - he->h_addr_list; ++ for(addresses = addrlistp - (char **)he->h_addr_list; + addrlistp--, addresses-- > 0; ) { + if (!addrinfo_wrap(he->h_addrtype, socktype, + *addrlistp, he->h_length, 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 eaaab73..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,17 +1,19 @@ ---- crypto/ppccap.c 2017-01-26 13:22:03.000000000 +0000 -+++ crypto/ppccap.c 2017-02-08 17:48:09.982015412 +0000 -@@ -73,6 +73,7 @@ void sha512_block_data_order(void *ctx, - sha512_block_ppc(ctx, inp, len); - } +--- crypto/ppccap.c.orig 2017-11-22 13:14:44.655536374 +0000 ++++ crypto/ppccap.c 2017-11-22 13:16:03.666387174 +0000 +@@ -34,6 +34,8 @@ + + static sigset_t all_masked; +#ifndef OPENSSL_SYS_AMIGAOS4 ++ static sigjmp_buf ill_jmp; static void ill_handler(int sig) { -@@ -157,3 +158,24 @@ void OPENSSL_cpuid_setup(void) +@@ -309,3 +311,29 @@ sigaction(SIGILL, &ill_oact, NULL); sigprocmask(SIG_SETMASK, &oset, NULL); } ++ +#else +#include <proto/exec.h> +void OPENSSL_cpuid_setup(void) @@ -20,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; @@ -31,5 +33,9 @@ + OPENSSL_ppccap_P |= PPC_ALTIVEC; + } +} -+#endif + ++uint32_t OPENSSL_rdtsc(void) ++{ ++ return 0; ++} ++#endif diff --git a/sdk/recipes/patches/openssl/ppc-amigaos/memory.h.p b/sdk/recipes/patches/openssl/ppc-amigaos/memory.h.p deleted file mode 100644 index 4da5a6d..0000000 --- a/sdk/recipes/patches/openssl/ppc-amigaos/memory.h.p +++ /dev/null @@ -1,22 +0,0 @@ ---- crypto/jpake/jpake.c.orig 2011-03-08 22:19:36.000000000 +0000 -+++ crypto/jpake/jpake.c 2011-03-08 22:19:49.000000000 +0000 -@@ -3,7 +3,7 @@ - #include <openssl/crypto.h> - #include <openssl/sha.h> - #include <openssl/err.h> --#include <memory.h> -+#include <string.h> - - /* - * In the definition, (xa, xb, xc, xd) are Alice's (x1, x2, x3, x4) or ---- crypto/pkcs7/bio_pk7.c.orig 2011-03-08 22:21:16.000000000 +0000 -+++ crypto/pkcs7/bio_pk7.c 2011-03-08 22:21:23.000000000 +0000 -@@ -58,7 +58,7 @@ - #include <openssl/bio.h> - - #if !defined(OPENSSL_SYSNAME_NETWARE) && !defined(OPENSSL_SYSNAME_VXWORKS) --# include <memory.h> -+# include <string.h> - #endif - #include <stdio.h> - diff --git a/sdk/recipes/patches/openssl/ppc-amigaos/no-alarm.p b/sdk/recipes/patches/openssl/ppc-amigaos/no-alarm.p deleted file mode 100644 index 1a287b1..0000000 --- a/sdk/recipes/patches/openssl/ppc-amigaos/no-alarm.p +++ /dev/null @@ -1,13 +0,0 @@ ---- apps/speed.c.orig 2011-03-08 22:44:56.000000000 +0000 -+++ apps/speed.c 2011-03-08 22:48:10.000000000 +0000 -@@ -225,6 +225,10 @@ - # define NO_FORK - # endif - -+# ifdef OPENSSL_SYS_AMIGAOS4 -+# undef SIGALRM -+# endif -+ - # undef BUFSIZE - # define BUFSIZE ((long)1024*8+1) - static volatile int run = 0; diff --git a/sdk/recipes/patches/openssl/ppc-amigaos/no-term.p b/sdk/recipes/patches/openssl/ppc-amigaos/no-term.p deleted file mode 100644 index d8d4d1c..0000000 --- a/sdk/recipes/patches/openssl/ppc-amigaos/no-term.p +++ /dev/null @@ -1,24 +0,0 @@ ---- crypto/ui/ui_openssl.c.orig 2011-03-08 22:37:51.000000000 +0000 -+++ crypto/ui/ui_openssl.c 2011-03-08 22:39:00.000000000 +0000 -@@ -218,6 +218,12 @@ - - #endif - -+#if defined(OPENSSL_SYS_AMIGAOS4) -+#undef TERMIOS -+#undef TERMIO -+#undef SGTTY -+#endif -+ - #ifdef TERMIOS - # include <termios.h> - # define TTY_STRUCT struct termios -@@ -266,7 +272,7 @@ - typedef int sig_atomic_t; - #endif - --#if defined(OPENSSL_SYS_MACINTOSH_CLASSIC) || defined(MAC_OS_GUSI_SOURCE) || defined(OPENSSL_SYS_NETWARE) -+#if defined(OPENSSL_SYS_MACINTOSH_CLASSIC) || defined(MAC_OS_GUSI_SOURCE) || defined(OPENSSL_SYS_NETWARE) || defined(OPENSSL_SYS_AMIGAOS4) - /* - * This one needs work. As a matter of fact the code is unoperational - * and this is only a trick to get it compiled. 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 + |