]> git.ipfire.org Git - ipfire-2.x.git/blobdiff - lfs/openssl
toolchain: fix full toolchain crossbuild
[ipfire-2.x.git] / lfs / openssl
index 6872f103ed50889dfff55d86a8fa9ebd2b996ad4..1dc24ac2a6922be3e8dfdce8a97b99a8e3653b55 100644 (file)
 
 include Config
 
-VER        = 1.0.2a
+VER        = 1.0.2e
 
 THISAPP    = openssl-$(VER)
 DL_FILE    = $(THISAPP).tar.gz
 DL_FROM    = $(URL_IPFIRE)
 DIR_APP    = $(DIR_SRC)/$(THISAPP)
 
-ifeq "$(SSE2)" "1"
-       TARGET = $(DIR_INFO)/$(THISAPP)-sse2
+TARGET = $(DIR_INFO)/$(THISAPP)$(KCFG)
+
+ifneq "$(KCFG)" "-sse2"
+CFLAGS += -DPURIFY
 else
-       TARGET = $(DIR_INFO)/$(THISAPP)
+CFLAGS =-O2 -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fPIC
+CFLAGS+= -fstack-protector-all --param=ssp-buffer-size=4
+CFLAGS+= -march=i686 -mmmx -msse -msse2 -mfpmath=sse
+CFLAGS+= -fomit-frame-pointer -DPURIFY
+CXXFLAGS="${CFLAGS}"
 endif
 
-CFLAGS += -DPURIFY
 export RPM_OPT_FLAGS = $(CFLAGS)
 
 CONFIGURE_OPTIONS = \
@@ -57,16 +62,20 @@ CONFIGURE_OPTIONS = \
        no-srp \
        -DSSL_FORBID_ENULL
 
+ifeq "$(MACHINE)" "x86_64"
+       CONFIGURE_OPTIONS += linux-x86_64
+endif
+
 ifeq "$(MACHINE)" "i586"
        CONFIGURE_OPTIONS += linux-elf
 
-ifneq "$(SSE2)" "1"
+ifneq "$(KCFG)" "-sse2"
        CONFIGURE_OPTIONS += no-sse2
 endif
 endif
 
 ifeq "$(MACHINE)" "armv5tel"
-       CONFIGURE_OPIONS += linux-generic32
+       CONFIGURE_OPTIONS += linux-generic32
 endif
 
 ###############################################################################
@@ -77,7 +86,7 @@ objects = $(DL_FILE)
 
 $(DL_FILE) = $(DL_FROM)/$(DL_FILE)
 
-$(DL_FILE)_MD5 = a06c547dac9044161a477211049f60ef
+$(DL_FILE)_MD5 = 2218c1a6f807f7206c11eb3ee3a5ec80
 
 install : $(TARGET)
 
@@ -112,6 +121,16 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
        cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/openssl-1.0.1m-weak-ciphers.patch
        cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/openssl-disable-sslv2-sslv3.patch
 
+       # i586 specific patches
+ifeq "$(MACHINE)" "i586"
+       cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/openssl-1.0.2a_auto_enable_padlock.patch
+       cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/openssl-1.0.2a_disable_ssse3_for_amd.patch
+endif
+
+       # With openssl 1.0.2e, pod2mantest is missing
+       echo -e "#!/bin/bash\necho \$$(which pod2man)" > $(DIR_APP)/util/pod2mantest
+       chmod a+x $(DIR_APP)/util/pod2mantest
+
        # Apply our CFLAGS
        cd $(DIR_APP) && sed -i Configure \
                -e "s/-O3 -fomit-frame-pointer/$(CFLAGS)/g"
@@ -124,10 +143,10 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
        cd $(DIR_APP) && make depend
        cd $(DIR_APP) && make
 
-ifeq "$(SSE2)" "1"
+ifeq "$(KCFG)" "-sse2"
        -mkdir -pv /usr/lib/sse2
        cd $(DIR_APP) && install -m 755 \
-               libcrypto.so.10 libssl.so.10 /usr/lib/sse2
+               libcrypto.so.10 /usr/lib/sse2
 else
        # Install everything.
        cd $(DIR_APP) && make install