summaryrefslogtreecommitdiff
path: root/core/openssl
diff options
context:
space:
mode:
Diffstat (limited to 'core/openssl')
-rw-r--r--core/openssl/PKGBUILD34
-rw-r--r--core/openssl/gnu-linux-mips64el-gcc.patch10
-rw-r--r--core/openssl/openssl-1.0.1a_cpu.patch15
3 files changed, 45 insertions, 14 deletions
diff --git a/core/openssl/PKGBUILD b/core/openssl/PKGBUILD
index bdcc9129e..d34178ed1 100644
--- a/core/openssl/PKGBUILD
+++ b/core/openssl/PKGBUILD
@@ -8,7 +8,7 @@ pkgver=${_ver/[a-z]/.${_ver//[0-9.]/}}
#pkgver=$_ver
pkgrel=1
pkgdesc='The Open Source toolkit for Secure Sockets Layer and Transport Layer Security'
-arch=('i686' 'x86_64')
+arch=('i686' 'x86_64' 'mips64el')
url='https://www.openssl.org'
license=('custom:BSD')
depends=('perl')
@@ -16,27 +16,19 @@ optdepends=('ca-certificates')
options=('!makeflags')
backup=('etc/ssl/openssl.cnf')
source=("https://www.openssl.org/source/${pkgname}-${_ver}.tar.gz"
- "https://www.openssl.org/source/${pkgname}-${_ver}.tar.gz.asc"
'fix-manpages.patch'
'no-rpath.patch'
- 'ca-dir.patch')
-md5sums=('a1da58ce63baef3812004714fa302c47'
- 'ca6bcd8641957df69c6c0bb4b93785aa'
+ 'ca-dir.patch'
+ 'openssl-1.0.1a_cpu.patch')
+md5sums=('a0104320c0997cd33e18b8ea798609d1'
'5bbc0655bda2af95bc8eb568963ce8ba'
'dc78d3d06baffc16217519242ce92478'
- '3bf51be3a1bbd262be46dc619f92aa90')
+ '3bf51be3a1bbd262be46dc619f92aa90'
+ '8edaef3ee595707c18fcbd7dafae940f')
build() {
cd $srcdir/$pkgname-$_ver
- if [ "${CARCH}" == 'x86_64' ]; then
- openssltarget='linux-x86_64'
- optflags='enable-ec_nistp_64_gcc_128'
- elif [ "${CARCH}" == 'i686' ]; then
- openssltarget='linux-elf'
- optflags=''
- fi
-
# avoid conflicts with other man pages
# see http://www.linuxfromscratch.org/patches/downloads/openssl/
patch -p1 -i $srcdir/fix-manpages.patch
@@ -44,6 +36,20 @@ build() {
patch -p0 -i $srcdir/no-rpath.patch
# set ca dir to /etc/ssl by default
patch -p0 -i $srcdir/ca-dir.patch
+ # fix building on non-x86
+ # see http://rt.openssl.org/Ticket/Display.html?id=2795&user=guest&pass=guest
+ patch -p1 -i $srcdir/openssl-1.0.1a_cpu.patch
+
+ case "${CARCH}" in
+ 'x86_64')
+ openssltarget='linux-x86_64'
+ optflags='enable-ec_nistp_64_gcc_128' ;;
+ 'i686')
+ openssltarget='linux-elf' ;;
+ 'mips64el')
+ openssltarget='linux-generic32' ;;
+ esac
+
# mark stack as non-executable: http://bugs.archlinux.org/task/12434
# workaround for PR#2771: OPENSSL_NO_TLS1_2_CLIENT
./Configure --prefix=/usr --openssldir=/etc/ssl --libdir=lib \
diff --git a/core/openssl/gnu-linux-mips64el-gcc.patch b/core/openssl/gnu-linux-mips64el-gcc.patch
new file mode 100644
index 000000000..412ea873f
--- /dev/null
+++ b/core/openssl/gnu-linux-mips64el-gcc.patch
@@ -0,0 +1,10 @@
+--- Configure.orig 2011-09-23 10:49:56.725704188 -0300
++++ Configure 2011-09-23 11:01:00.377697297 -0300
+@@ -337,6 +337,7 @@
+ # *-generic* is endian-neutral target, but ./config is free to
+ # throw in -D[BL]_ENDIAN, whichever appropriate...
+ "linux-generic32","gcc:-DTERMIO -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
++"gnu-linux-mips64el-gcc","gcc:-mabi=n32 -O3 -DTERMIO -Wall::-D_REENTRANT::-ldl:BN_LLONG MD2_CHAR RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${mips3_asm}:dlfcn:linux-shared:-fPIC::-mabi=n32:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR):::32",
+ "linux-ppc", "gcc:-DB_ENDIAN -DTERMIO -O3 -Wall::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_RISC1 DES_UNROLL:${ppc32_asm}:linux32:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
+ # It's believed that majority of ARM toolchains predefine appropriate -march.
+ # If you compiler does not, do complement config command line with one!
diff --git a/core/openssl/openssl-1.0.1a_cpu.patch b/core/openssl/openssl-1.0.1a_cpu.patch
new file mode 100644
index 000000000..a6b85988a
--- /dev/null
+++ b/core/openssl/openssl-1.0.1a_cpu.patch
@@ -0,0 +1,15 @@
+--- openssl-1.0.1a/crypto/evp/e_rc4_hmac_md5.c Wed Apr 18 17:51:33 2012
++++ /tmp/e_rc4_hmac_md5.c Thu Apr 19 14:28:41 2012
+@@ -289,8 +289,12 @@
+
+ const EVP_CIPHER *EVP_rc4_hmac_md5(void)
+ {
++#if defined(STITCHED_CALL)
+ extern unsigned int OPENSSL_ia32cap_P[];
+ /* RC4_CHAR flag ------------vvvvv */
+ return(OPENSSL_ia32cap_P[0]&(1<<20) ? NULL : &r4_hmac_md5_cipher);
++#else
++ return(&r4_hmac_md5_cipher);
++#endif
+ }
+ #endif