diff options
author | Waldemar Brodkorb <wbx@openadk.org> | 2015-04-16 00:53:18 -0500 |
---|---|---|
committer | Waldemar Brodkorb <wbx@openadk.org> | 2015-04-16 00:53:43 -0500 |
commit | ad02b9e264022b0a1030d78a4531b394b925d3ae (patch) | |
tree | 1031da06a7143b9a1607d6467de33b9e5057af79 /package/openssl | |
parent | 3cbcdddef9541718f9fcfddf00fccf95e2d1e990 (diff) |
fix static build
Diffstat (limited to 'package/openssl')
-rw-r--r-- | package/openssl/Makefile | 25 | ||||
-rw-r--r-- | package/openssl/patches/patch-Configure | 30 |
2 files changed, 34 insertions, 21 deletions
diff --git a/package/openssl/Makefile b/package/openssl/Makefile index 480ce6cc8..3d38ec75e 100644 --- a/package/openssl/Makefile +++ b/package/openssl/Makefile @@ -34,7 +34,15 @@ $(eval $(call HOST_template,OPENSSL,openssl,${PKG_VERSION}-${PKG_RELEASE})) $(eval $(call PKG_template,LIBOPENSSL,libopenssl,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION},$(PKG_OPTS))) $(eval $(call PKG_template,OPENSSL_UTIL,openssl-util,${PKG_VERSION}-${PKG_RELEASE},${PKGSS_OPENSSL_UTIL},${PKGSD_OPENSSL_UTIL},${PKGSC_OPENSSL_UTIL})) -OPENSSL_OPTIONS:= shared threads no-err no-krb5 zlib-dynamic no-engines no-camellia no-idea no-rc5 no-mdc2 no-sha0 no-smime no-aes192 no-cast +ifeq ($(ADK_TARGET_USE_STATIC_LIBS),y) +OPENSSL_OPTIONS:= no-shared zlib no-dso +else +OPENSSL_OPTIONS:= shared zlib-dynamic +ALL_TARGET+= build-shared +TARGET_CFLAGS+= -ldl +endif + +OPENSSL_OPTIONS+= threads no-err no-krb5 no-engines no-camellia no-idea no-rc5 no-mdc2 no-sha0 no-smime no-aes192 no-cast HOST_STYLE:= manual CONFIG_STYLE:= manual @@ -57,11 +65,9 @@ ifeq ($(ADK_TARGET_ARCH_PPC),y) TARGET_CFLAGS:= $(subst g3,g,$(TARGET_CFLAGS)) endif +CONFIG:= linux-generic32 ifeq ($(ADK_TARGET_ARCH_X86_64),y) -CONFIG:= linux-embedded-x86_64 -TARGET_CFLAGS:= $(subst g3,g,$(TARGET_CFLAGS)) -else -CONFIG:= linux-embedded +CONFIG:= linux-x86_64 endif ifneq (,$(filter CYGWIN%,${OStype})) @@ -73,9 +79,9 @@ endif host-configure: ifeq ($(HOSTCONFIG),) - (cd $(WRKBUILD); ./config --prefix='$(STAGING_HOST_DIR)/usr' -fPIC) + (cd $(WRKBUILD); ./config --prefix='$(STAGING_HOST_DIR)/usr' -fPIC -ldl) else - (cd $(WRKBUILD); OPTIMIZATION_FLAGS="-fPIC" ./Configure $(HOSTCONFIG) --prefix='$(STAGING_HOST_DIR)/usr') + (cd $(WRKBUILD); ./Configure $(HOSTCONFIG) --prefix='$(STAGING_HOST_DIR)/usr') endif host-build: @@ -91,7 +97,6 @@ post-extract: do-configure: (cd $(WRKBUILD); \ PATH='$(TARGET_PATH)' \ - OPTIMIZATION_FLAGS="$(TARGET_CFLAGS) -fPIC" \ ./Configure $(CONFIG) \ --prefix=/usr \ --openssldir=/etc/ssl \ @@ -100,14 +105,14 @@ do-configure: -DOPENSSL_SMALL_FOOTPRINT \ $(OPENSSL_OPTIONS) \ ); + $(SED) "s:-O[0-9]:$(TARGET_CFLAGS) -fPIC:" $(WRKBUILD)/Makefile do-build: $(MAKE) -C $(WRKBUILD) \ CC="$(TARGET_CC)" \ AR="$(TARGET_CROSS)ar r" \ RANLIB="$(TARGET_CROSS)ranlib" \ - OPTIMIZATION_FLAGS="$(TARGET_CFLAGS) -fPIC" \ - all build-shared + $(ALL_TARGET) libopenssl-install: ${INSTALL_DIR} ${IDIR_LIBOPENSSL}/usr/lib diff --git a/package/openssl/patches/patch-Configure b/package/openssl/patches/patch-Configure index 19d3ef1a8..24f2a1a54 100644 --- a/package/openssl/patches/patch-Configure +++ b/package/openssl/patches/patch-Configure @@ -1,12 +1,20 @@ ---- openssl-1.0.2a.orig/Configure 2015-03-19 14:30:36.000000000 +0100 -+++ openssl-1.0.2a/Configure 2015-04-06 10:56:31.333266600 +0200 -@@ -443,6 +443,9 @@ my %table=( - "linux-alpha-ccc","ccc:-fast -readonly_strings -DL_ENDIAN::-D_REENTRANT:::SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_PTR DES_RISC1 DES_UNROLL:${alpha_asm}", - "linux-alpha+bwx-ccc","ccc:-fast -readonly_strings -DL_ENDIAN::-D_REENTRANT:::SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_INT DES_PTR DES_RISC1 DES_UNROLL:${alpha_asm}", +--- openssl-1.0.2a.orig/Configure 2015-03-19 08:30:36.000000000 -0500 ++++ openssl-1.0.2a/Configure 2015-04-12 04:42:12.590283489 -0500 +@@ -348,7 +348,7 @@ my %table=( + #### + # *-generic* is endian-neutral target, but ./config is free to + # throw in -D[BL]_ENDIAN, whichever appropriate... +-"linux-generic32","gcc:-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)", ++"linux-generic32","gcc:-O3 -fomit-frame-pointer -Wall::-D_REENTRANT:::BN_LLONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", + "linux-ppc", "gcc:-DB_ENDIAN -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)", -+"linux-embedded","gcc: \$(OPTIMIZATION_FLAGS) -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)", -+"linux-embedded-x86_64","gcc:-m64 -DL_ENDIAN \$(OPTIMIZATION_FLAGS) -Wall::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_UNROLL:${x86_64_asm}:elf:dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR):::64", -+ - # Android: linux-* but without pointers to headers and libs. - "android","gcc:-mandroid -I\$(ANDROID_DEV)/include -B\$(ANDROID_DEV)/lib -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)", - "android-x86","gcc:-mandroid -I\$(ANDROID_DEV)/include -B\$(ANDROID_DEV)/lib -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:".eval{my $asm=${x86_elf_asm};$asm=~s/:elf/:android/;$asm}.":dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", + ####################################################################### +@@ -397,7 +397,7 @@ my %table=( + "linux-ppc64le","gcc:-m64 -DL_ENDIAN -O3 -Wall::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_RISC1 DES_UNROLL:$ppc64_asm:linux64le:dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR):::", + "linux-ia64", "gcc:-DL_ENDIAN -DTERMIO -O3 -Wall::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_UNROLL DES_INT:${ia64_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", + "linux-ia64-icc","icc:-DL_ENDIAN -O2 -Wall::-D_REENTRANT::-ldl -no_cpprt:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_RISC1 DES_INT:${ia64_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", +-"linux-x86_64", "gcc:-m64 -DL_ENDIAN -O3 -Wall::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_UNROLL:${x86_64_asm}:elf:dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR):::64", ++"linux-x86_64", "gcc:-m64 -DL_ENDIAN -O3 -Wall::-D_REENTRANT:::SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_UNROLL:${x86_64_asm}:elf:dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR):::64", + "linux-x86_64-clang", "clang: -m64 -DL_ENDIAN -O3 -Weverything $clang_disabled_warnings -Qunused-arguments::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_UNROLL:${x86_64_asm}:elf:dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR):::64", + "linux-x86_64-icc", "icc:-DL_ENDIAN -O2::-D_REENTRANT::-ldl -no_cpprt:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_UNROLL:${x86_64_asm}:elf:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR):::64", + "linux-x32", "gcc:-mx32 -DL_ENDIAN -O3 -Wall::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT RC4_CHUNK_LL DES_INT DES_UNROLL:${x86_64_asm}:elf:dlfcn:linux-shared:-fPIC:-mx32:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR):::x32", |