summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFran├žois Revol <revol@free.fr>2018-06-03 04:07:29 +0200
committerVincent Sanders <vince@kyllikki.org>2019-02-22 08:57:40 +0000
commit90717ccbcf3bc05677309115abaeef004356747d (patch)
tree9cadc56e208a1808b37f53d305cdbc4d4cc4526c
parent19fef6facae17a73f6549533266f445273b8a702 (diff)
downloadtoolchains-90717ccbcf3bc05677309115abaeef004356747d.tar.gz
toolchains-90717ccbcf3bc05677309115abaeef004356747d.tar.bz2
m68k-atari-mint: fix OpenSSL build
-rw-r--r--sdk/recipes/patches/openssl/Configurations-50-atari.conf.p45
-rw-r--r--sdk/recipes/patches/openssl/m5475-atari-mint/crypto.mem_sec.c.p11
-rw-r--r--sdk/recipes/patches/openssl/m5475-atari-mint/e_os.h.p18
-rw-r--r--sdk/recipes/patches/openssl/m5475-atari-mint/include.openssl.e_os2.h.p14
-rw-r--r--sdk/recipes/patches/openssl/m68k-atari-mint/crypto.bn.Makefile.p12
-rw-r--r--sdk/recipes/patches/openssl/m68k-atari-mint/crypto.mem_sec.c.p11
-rw-r--r--sdk/recipes/patches/openssl/m68k-atari-mint/e_os.h.p18
-rw-r--r--sdk/recipes/patches/openssl/m68k-atari-mint/include.openssl.e_os2.h.p14
8 files changed, 131 insertions, 12 deletions
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..b5a55dd
--- /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 @@
++%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/m5475-atari-mint/crypto.mem_sec.c.p b/sdk/recipes/patches/openssl/m5475-atari-mint/crypto.mem_sec.c.p
new file mode 100644
index 0000000..5dbd97e
--- /dev/null
+++ b/sdk/recipes/patches/openssl/m5475-atari-mint/crypto.mem_sec.c.p
@@ -0,0 +1,11 @@
+--- crypto/mem_sec.c.orig 2018-06-03 03:52:26.000000000 +0200
++++ crypto/mem_sec.c 2018-06-03 03:53:35.000000000 +0200
+@@ -24,7 +24,7 @@
+
+ #include <string.h>
+
+-#if ! defined(OPENSSL_SYS_RISCOS) && ! defined(OPENSSL_SYS_AMIGAOS3) && ! defined(OPENSSL_SYS_AMIGAOS4) && (defined(OPENSSL_SYS_LINUX) || defined(OPENSSL_SYS_UNIX))
++#if ! defined(OPENSSL_SYS_RISCOS) && ! defined(OPENSSL_SYS_AMIGAOS3) && ! defined(OPENSSL_SYS_AMIGAOS4) && !defined(OPENSSL_SYS_MINT) && (defined(OPENSSL_SYS_LINUX) || defined(OPENSSL_SYS_UNIX))
+ # define IMPLEMENTED
+ # include <stdlib.h>
+ # include <assert.h>
diff --git a/sdk/recipes/patches/openssl/m5475-atari-mint/e_os.h.p b/sdk/recipes/patches/openssl/m5475-atari-mint/e_os.h.p
new file mode 100644
index 0000000..ede1edc
--- /dev/null
+++ b/sdk/recipes/patches/openssl/m5475-atari-mint/e_os.h.p
@@ -0,0 +1,18 @@
+--- e_os.h.orig 2018-06-03 03:19:29.000000000 +0200
++++ e_os.h 2018-06-03 03:19:36.000000000 +0200
+@@ -462,6 +462,15 @@
+ # 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
++# endif
+
+ # endif
+
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/crypto.bn.Makefile.p b/sdk/recipes/patches/openssl/m68k-atari-mint/crypto.bn.Makefile.p
deleted file mode 100644
index 8d3bfc6..0000000
--- a/sdk/recipes/patches/openssl/m68k-atari-mint/crypto.bn.Makefile.p
+++ /dev/null
@@ -1,12 +0,0 @@
---- crypto/bn/Makefile 2017-01-26 13:22:03.000000000 +0000
-+++ crypto/bn/Makefile 2017-02-11 15:24:31.133017711 +0000
-@@ -60,6 +60,9 @@ lib: $(LIBOBJ)
- $(RANLIB) $(LIB) || echo Never mind.
- @touch lib
-
-+bn_m68k.o: asm/bn_m68k.s
-+ $(CC) $(CFLAGS) -c -o $@ asm/bn_m68k.s
-+
- bn-586.s: asm/bn-586.pl ../perlasm/x86asm.pl
- $(PERL) asm/bn-586.pl $(PERLASM_SCHEME) $(CFLAGS) $(PROCESSOR) > $@
- co-586.s: asm/co-586.pl ../perlasm/x86asm.pl
diff --git a/sdk/recipes/patches/openssl/m68k-atari-mint/crypto.mem_sec.c.p b/sdk/recipes/patches/openssl/m68k-atari-mint/crypto.mem_sec.c.p
new file mode 100644
index 0000000..5dbd97e
--- /dev/null
+++ b/sdk/recipes/patches/openssl/m68k-atari-mint/crypto.mem_sec.c.p
@@ -0,0 +1,11 @@
+--- crypto/mem_sec.c.orig 2018-06-03 03:52:26.000000000 +0200
++++ crypto/mem_sec.c 2018-06-03 03:53:35.000000000 +0200
+@@ -24,7 +24,7 @@
+
+ #include <string.h>
+
+-#if ! defined(OPENSSL_SYS_RISCOS) && ! defined(OPENSSL_SYS_AMIGAOS3) && ! defined(OPENSSL_SYS_AMIGAOS4) && (defined(OPENSSL_SYS_LINUX) || defined(OPENSSL_SYS_UNIX))
++#if ! defined(OPENSSL_SYS_RISCOS) && ! defined(OPENSSL_SYS_AMIGAOS3) && ! defined(OPENSSL_SYS_AMIGAOS4) && !defined(OPENSSL_SYS_MINT) && (defined(OPENSSL_SYS_LINUX) || defined(OPENSSL_SYS_UNIX))
+ # define IMPLEMENTED
+ # include <stdlib.h>
+ # include <assert.h>
diff --git a/sdk/recipes/patches/openssl/m68k-atari-mint/e_os.h.p b/sdk/recipes/patches/openssl/m68k-atari-mint/e_os.h.p
new file mode 100644
index 0000000..ede1edc
--- /dev/null
+++ b/sdk/recipes/patches/openssl/m68k-atari-mint/e_os.h.p
@@ -0,0 +1,18 @@
+--- e_os.h.orig 2018-06-03 03:19:29.000000000 +0200
++++ e_os.h 2018-06-03 03:19:36.000000000 +0200
+@@ -462,6 +462,15 @@
+ # 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
++# endif
+
+ # endif
+
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