summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Young <chris@unsatisfactorysoftware.co.uk>2017-02-08 00:27:11 (GMT)
committer Chris Young <chris@unsatisfactorysoftware.co.uk>2017-02-08 00:27:11 (GMT)
commit2874b775fdb9085a929c8d2928d5900488ddd7d6 (patch)
tree4fce00ba319780d70819b36245d3fdb46c8b1209
parent69bc0ecf5598487fd5c2179d47ea3293ec6b6c04 (diff)
downloadtoolchains-2874b775fdb9085a929c8d2928d5900488ddd7d6.tar.gz
toolchains-2874b775fdb9085a929c8d2928d5900488ddd7d6.tar.bz2
Enable PPC ASM optimisations in OpenSSL
Doesn't work; gcc doesn't like the bclr instruction in ppccpuid.s
-rw-r--r--sdk/Makefile7
-rw-r--r--sdk/recipes/patches/openssl/Configure.p2
-rw-r--r--sdk/recipes/patches/openssl/ppc-amigaos/crypto.Makefile.p11
3 files changed, 18 insertions, 2 deletions
diff --git a/sdk/Makefile b/sdk/Makefile
index 2f8801d..b5a6d29 100644
--- a/sdk/Makefile
+++ b/sdk/Makefile
@@ -90,6 +90,7 @@ ifeq ($(TARGET),arm-unknown-riscos)
SDK_ITEMS := $(addprefix $(BUILDSTEPS)/, $(COMMON_SDK_ITEMS) libjpeg-turbo.d)
EXTRAARGS_LIBCARES := --disable-shared
EXTRAARGS_LIBCURL := --enable-nonblocking --enable-ares --with-random="/dev/urandom" $(LIBCURL_DISABLES)
+ EXTRAARGS_OPENSSL := no-asm
endif
ifeq ($(TARGET),m68k-atari-mint)
@@ -98,6 +99,7 @@ ifeq ($(TARGET),m68k-atari-mint)
EXTRAARGS_LIBCURL := --enable-optimize --enable-nonblocking --enable-ares --with-random="/dev/urandom" --disable-manual --disable-curldebug --disable-thread --disable-threaded-resolver
EXTRAARGS_LIBICONV := --enable-extra-encodings
LIBICONV_ENV := CFLAGS="-DPATH_MAX=1024"
+ EXTRAARGS_OPENSSL := no-asm
endif
ifeq ($(TARGET),m5475-atari-mint)
@@ -106,6 +108,7 @@ ifeq ($(TARGET),m5475-atari-mint)
EXTRAARGS_LIBCURL := --enable-optimize --enable-nonblocking --enable-ares --with-random="/dev/urandom" --disable-manual --disable-curldebug --disable-thread --disable-threaded-resolver
EXTRAARGS_LIBICONV := --enable-extra-encodings
LIBICONV_ENV := CFLAGS="-DPATH_MAX=1024"
+ EXTRAARGS_OPENSSL := no-asm
endif
ifeq ($(TARGET),ppc-amigaos)
@@ -119,6 +122,7 @@ ifeq ($(TARGET),i686-w64-mingw32)
EXTRAARGS_LIBCARES := --disable-shared
EXTRAARGS_LIBCURL := --enable-nonblocking --enable-ares --disable-ldap --without-random
LIBCURL_ENV := CFLAGS="-DCARES_STATICLIB" LIBS="-lgdi32"
+ EXTRAARGS_OPENSSL := no-asm
endif
ifeq ($(TARGET),m68k-unknown-amigaos)
@@ -129,6 +133,7 @@ ifeq ($(TARGET),m68k-unknown-amigaos)
LIBJPEG_ENV := LDFLAGS="-lm"
LIBJPEG_TURBO_ENV := LDFLAGS="-lm"
LIBCURL_ENV := LIBS="-lm"
+ EXTRAARGS_OPENSSL := no-asm
endif
ifeq ($(SDK_ITEMS),)
@@ -339,7 +344,7 @@ $(BUILDSTEPS)/openssl.d: $(BUILDSTEPS)/builddir.d $(BUILDSTEPS)/zlib.d $(BUILDST
ifneq ($(realpath $(RECIPES)/patches/openssl/$(TARGET)),)
for p in `ls $(RECIPES)/patches/openssl/$(TARGET)/*.p` ; do $(PATCH) -d $(BUILDDIR)/openssl/openssl-$(VERSION_OPENSSL) -p0 <$$p ; done
endif
- cd $(BUILDDIR)/openssl/openssl-$(VERSION_OPENSSL) && $(env) ./Configure --prefix=$(GCCSDK_INSTALL_ENV) $(TARGET) no-shared no-asm no-threads
+ cd $(BUILDDIR)/openssl/openssl-$(VERSION_OPENSSL) && $(env) ./Configure --prefix=$(GCCSDK_INSTALL_ENV) $(TARGET) no-shared no-threads $(EXTRAARGS_OPENSSL)
cd $(BUILDDIR)/openssl/openssl-$(VERSION_OPENSSL) && $(env) make install
touch $@
diff --git a/sdk/recipes/patches/openssl/Configure.p b/sdk/recipes/patches/openssl/Configure.p
index 9d4ba20..9a9eb62 100644
--- a/sdk/recipes/patches/openssl/Configure.p
+++ b/sdk/recipes/patches/openssl/Configure.p
@@ -8,7 +8,7 @@
+"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 -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-lnet -lm:BN_LLONG DES_RISC1::::::::::::::::::::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 DES_RISC1::::::::::::::::::::ppc-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 DES_RISC1:${ppc32_asm}:::::::::::::::::::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.
diff --git a/sdk/recipes/patches/openssl/ppc-amigaos/crypto.Makefile.p b/sdk/recipes/patches/openssl/ppc-amigaos/crypto.Makefile.p
new file mode 100644
index 0000000..3a9bf62
--- a/dev/null
+++ b/sdk/recipes/patches/openssl/ppc-amigaos/crypto.Makefile.p
@@ -0,0 +1,11 @@
+--- 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; \