libports: fix openssl issues and update to 1.0.1c

libcrypto provides certain optimized assembler functions which
unfortunatly are non-pic. Therefore this asm code is removed
and libcrypto is build with -DOPENSSL_NO_ASM.
Because the asm code is not needed anymore, its generation is
also removed from openssl.mk.

import-libssl.mk was also added because it is essential for building
programs which depend on libssl.

Fixes #291.
Fixes #294.
This commit is contained in:
Josef Söntgen 2012-07-12 12:06:58 +02:00 committed by Norman Feske
parent 7e26c79455
commit ab951175c0
6 changed files with 18 additions and 35 deletions

View File

@ -0,0 +1,10 @@
REP_INC_DIR += include/openssl
ifeq ($(filter-out $(SPECS),x86_32),)
TARGET_CPUARCH=x86_32
else ifeq ($(filter-out $(SPECS),x86_64),)
TARGET_CPUARCH=x86_64
endif
# include architecture specific opensslconf.h
REP_INC_DIR += src/lib/openssl/$(TARGET_CPUARCH)

View File

@ -1,5 +1,5 @@
LIBCRYPTO = libcrypto-1.0.0
LIBCRYPTO_DIR = $(REP_DIR)/contrib/openssl-1.0.1b/crypto
LIBCRYPTO_DIR = $(REP_DIR)/contrib/openssl-1.0.1c/crypto
#
# ARM is not supported currently (needs testing)
@ -10,15 +10,13 @@ SHARED_LIB = yes
LIBS += libc
CC_OPT += -DDSO_DLFCN -DHAVE_DLFCN_H -Wa,--noexecstack -DL_ENDIAN -DTERMIOS
CC_OPT += -DDSO_DLFCN -DHAVE_DLFCN_H -Wa,--noexecstack -DL_ENDIAN -DTERMIOS \
-DOPENSSL_NO_ASM
#
# crypto base source
#
# Removed 'mem_clr.c' from the list because this function is provided by
# 'src/lib/openssl/x86_32/cpuid.s'.
#
SRC_C = cryptlib.c mem.c mem_dbg.c cversion.c ex_data.c cpt_err.c \
SRC_C = cryptlib.c mem.c mem_dbg.c cversion.c ex_data.c cpt_err.c mem_clr.c \
ebcdic.c uid.c o_time.c o_str.c o_dir.c o_fips.c o_init.c fips_ers.c
#
@ -208,9 +206,6 @@ endif
INC_DIR += $(REP_DIR)/src/lib/openssl/$(TARGET_CPUARCH)/
#SRC_S += $(REP_DIR)/src/lib/openssl/$(TARGET_CPUARCH)/aes_enc.s
SRC_S += cpuid.s
#
# Generate buildinf.h

View File

@ -1,5 +1,5 @@
LIBSSL = libssl-1.0.0
LIBSSL_DIR = $(REP_DIR)/contrib/openssl-1.0.1b
LIBSSL_DIR = $(REP_DIR)/contrib/openssl-1.0.1c
#
# ARM is not supported currently (needs testing)

View File

@ -1,4 +1,4 @@
OPENSSL_VERSION = 1.0.1b
OPENSSL_VERSION = 1.0.1c
OPENSSL = openssl-$(OPENSSL_VERSION)
OPENSSL_TGZ = $(OPENSSL).tar.gz
OPENSSL_URL = https://www.openssl.org/source/$(OPENSSL_TGZ)
@ -28,25 +28,7 @@ $(CONTRIB_DIR)/$(OPENSSL): $(DOWNLOAD_DIR)/$(OPENSSL_TGZ)
# Generate ASM codes
#
generate_asm: $(OPENSSL_SRC)/x86_32/cpuid.s $(OPENSSL_SRC)/x86_64/cpuid.s \
$(OPENSSL_SRC)/x86_32/aes_enc.s $(OPENSSL_SRC)/x86_64/aes_enc.s \
$(OPENSSL_SRC)/x86_64/modexp512.s $(OPENSSL_SRC)/x86_64/rc4_md5.s
$(OPENSSL_SRC)/x86_32/cpuid.s:
$(VERBOSE)perl $(CONTRIB_DIR)/$(OPENSSL)/crypto/x86cpuid.pl elf \
$(CONTRIB_DIR)/$(OPENSSEL)/crypto/perlasm/x86asm.pl elf > $@
$(OPENSSL_SRC)/x86_64/cpuid.s:
$(VERBOSE)perl $(CONTRIB_DIR)/$(OPENSSL)/crypto/x86_64cpuid.pl elf \
$(CONTRIB_DIR)/$(OPENSSEL)/crypto/perlasm/x86asm.pl elf > $@
$(OPENSSL_SRC)/x86_32/aes_enc.s:
$(VERBOSE)perl $(CONTRIB_DIR)/$(OPENSSL)/crypto/aes/asm/aes-586.pl elf \
$(CONTRIB_DIR)/$(OPENSSEL)/crypto/perlasm/x86asm.pl elf > $@
$(OPENSSL_SRC)/x86_64/aes_enc.s:
$(VERBOSE)perl $(CONTRIB_DIR)/$(OPENSSL)/crypto/aes/asm/aes-x86_64.pl elf \
$(CONTRIB_DIR)/$(OPENSSEL)/crypto/perlasm/x86asm.pl elf > $@
generate_asm: $(OPENSSL_SRC)/x86_64/modexp512.s $(OPENSSL_SRC)/x86_64/rc4_md5.s
$(OPENSSL_SRC)/x86_64/modexp512.s:
$(VERBOSE)perl $(CONTRIB_DIR)/$(OPENSSL)/crypto/bn/asm/modexp512-x86_64.pl \
@ -71,6 +53,6 @@ include/openssl:
$(VERBOSE)ln -fs ../../$(CONTRIB_DIR)/$(OPENSSL)/crypto/store/store.h include/openssl/
clean-openssl:
$(VERBOSE)rm -rf include/OPENSSL
$(VERBOSE)rm -rf include/openssl
$(VERBOSE)rm -rf $(CONTRIB_DIR)/$(OPENSSL)
$(VERBOSE)rm -rf $(OPENSSL_SRC)/x86_32/*.s $(OPENSSL_SRC)/x86_64/*.s

View File

@ -67,8 +67,6 @@
# endif
#endif
#define OPENSSL_CPUID_OBJ
/* crypto/opensslconf.h.in */
/* Generate 80386 code? */

View File

@ -67,8 +67,6 @@
# endif
#endif
#define OPENSSL_CPUID_OBJ
/* crypto/opensslconf.h.in */
/* Generate 80386 code? */