Changeset 14375


Ignorieren:
Zeitstempel:
07.08.2017 21:39:21 (vor 9 Tagen)
Autor:
er13
Nachricht:

bip, mcabber, ngircd, php, shellinabox, stunnel, vsftpd, vtun, wget, xmail:

  • support static linking against OpenSSL built with zlib support enabled
  • still work-in-progress, there are some other packages affected by r14372
Ort:
trunk/make
Dateien:
2 hinzugefügt
5 gelöscht
12 bearbeitet
1 verschoben

Legende:

Unverändert
Hinzugefügt
Entfernt
  • trunk/make/bip/bip.mk

    r12669 r14375  
    88$(PKG)_BINARIES_TARGET_DIR:=$($(PKG)_BINARIES:%=$($(PKG)_DEST_DIR)/usr/bin/%) 
    99 
     10$(PKG)_PATCH_POST_CMDS += $(call PKG_ADD_EXTRA_FLAGS,LDFLAGS|LIBS) 
     11 
    1012ifeq ($(strip $(FREETZ_PACKAGE_BIP_WITH_SSL)),y) 
    1113$(PKG)_REBUILD_SUBOPTS += FREETZ_OPENSSL_SHLIB_VERSION 
     
    1517ifeq ($(strip $(FREETZ_PACKAGE_BIP_STATIC)),y) 
    1618$(PKG)_LDFLAGS := -static 
     19ifeq ($(strip $(FREETZ_PACKAGE_BIP_WITH_SSL)),y) 
     20$(PKG)_STATIC_LIBS += $(OPENSSL_LIBCRYPTO_EXTRA_LIBS) 
     21endif 
    1722endif 
    1823 
     
    3136$($(PKG)_BINARIES_BUILD_DIR): $($(PKG)_DIR)/.configured 
    3237    $(SUBMAKE) -C $(BIP_DIR) \ 
    33         LDFLAGS="$(BIP_LDFLAGS)" 
     38        EXTRA_LDFLAGS="$(BIP_LDFLAGS)" \ 
     39        EXTRA_LIBS="$(BIP_STATIC_LIBS)" 
    3440 
    3541$(foreach binary,$($(PKG)_BINARIES_BUILD_DIR),$(eval $(call INSTALL_BINARY_STRIP_RULE,$(binary),/usr/bin))) 
  • trunk/make/mcabber/mcabber.mk

    r12669 r14375  
    33$(PKG)_SOURCE_MD5:=887415d16c32af58eab2ec2d9bb17fa6 
    44$(PKG)_SITE:=http://mirror.mcabber.com/files 
     5 
     6$(PKG)_PATCH_POST_CMDS += $(call PKG_ADD_EXTRA_FLAGS,LDFLAGS|LIBS,src) 
    57 
    68$(PKG)_BINARY:=$($(PKG)_DIR)/src/mcabber 
     
    1921ifeq ($(strip $(FREETZ_PACKAGE_MCABBER_STATIC)),y) 
    2022$(PKG)_LDFLAGS := -static 
     23ifeq ($(strip $(FREETZ_PACKAGE_MCABBER_WITH_SSL)),y) 
     24$(PKG)_STATIC_LIBS += $(OPENSSL_LIBCRYPTO_EXTRA_LIBS) 
     25endif 
    2126endif 
    2227 
     
    3035$($(PKG)_BINARY): $($(PKG)_DIR)/.configured 
    3136    $(SUBMAKE) -C $(MCABBER_DIR) \ 
    32         LDFLAGS="$(MCABBER_LDFLAGS)" 
     37        EXTRA_LDFLAGS="$(MCABBER_LDFLAGS)" \ 
     38        EXTRA_LIBS="$(MCABBER_STATIC_LIBS)" 
    3339 
    3440$($(PKG)_TARGET_BINARY): $($(PKG)_BINARY) 
  • trunk/make/ngircd/ngircd.mk

    r12934 r14375  
    33$(PKG)_SOURCE_SHA1:=39e8c2c354a5f820e84ad9284009b7d5d80d50cc 
    44$(PKG)_SITE:=http://ngircd.barton.de/pub/ngircd 
     5 
     6$(PKG)_PATCH_POST_CMDS += $(call PKG_ADD_EXTRA_FLAGS,LDFLAGS|LIBS) 
    57 
    68$(PKG)_BINARY:=$($(PKG)_DIR)/src/$(pkg)/$(pkg) 
     
    2426$(PKG)_REBUILD_SUBOPTS += FREETZ_OPENSSL_SHLIB_VERSION 
    2527$(PKG)_DEPENDS_ON += openssl 
     28ifeq ($(strip $(FREETZ_PACKAGE_NGIRCD_STATIC)),y) 
     29$(PKG)_STATIC_LIBS += $(OPENSSL_LIBCRYPTO_EXTRA_LIBS) 
     30endif 
    2631endif 
    2732 
     
    4954$($(PKG)_BINARY): $($(PKG)_DIR)/.configured 
    5055    $(SUBMAKE) -C $(NGIRCD_DIR) \ 
    51         LDFLAGS="$(TARGET_LDFLAGS) $(NGIRCD_LDFLAGS)" 
     56        EXTRA_LDFLAGS="$(NGIRCD_LDFLAGS)" \ 
     57        EXTRA_LIBS="$(NGIRCD_STATIC_LIBS)" 
    5258 
    5359$($(PKG)_TARGET_BINARY): $($(PKG)_BINARY) 
  • trunk/make/openssl/Config.in.libs

    r14372 r14375  
    6969    default "1.0.0" if FREETZ_OPENSSL_VERSION_1 
    7070 
     71config FREETZ_OPENSSL_LIBCRYPTO_EXTRA_LIBS 
     72    string 
     73    default "-ldl -lz" if FREETZ_LIB_libcrypto_WITH_ZLIB 
     74    default "-ldl" 
    7175 
    7276menu "OpenSSL configuration" 
  • trunk/make/php/php.mk

    r14334 r14375  
    119119$(PKG)_DEPENDS_ON += openssl 
    120120$(PKG)_CONFIGURE_OPTIONS += --with-openssl="$(TARGET_TOOLCHAIN_STAGING_DIR)/usr" 
    121 $(PKG)_LIBS += -ldl 
     121ifeq ($(strip $(FREETZ_PACKAGE_PHP_STATIC)),y) 
     122$(PKG)_LIBS += $(OPENSSL_LIBCRYPTO_EXTRA_LIBS) 
     123endif 
    122124endif 
    123125 
  • trunk/make/shellinabox/shellinabox.mk

    r13758 r14375  
    3737$(PKG)_REBUILD_SUBOPTS += FREETZ_OPENSSL_SHLIB_VERSION 
    3838$(PKG)_DEPENDS_ON += openssl 
     39$(PKG)_EXTRA_LIBS += $(if $(FREETZ_PACKAGE_SHELLINABOX_STATIC),$(OPENSSL_LIBCRYPTO_EXTRA_LIBS)) 
    3940$(PKG)_CONFIGURE_OPTIONS += --enable-ssl 
    4041# will not work with SSL disabled, I suspect a bug in source?? 
  • trunk/make/stunnel/stunnel.mk

    r14360 r14375  
    2222$(PKG)_REBUILD_SUBOPTS += FREETZ_TARGET_IPV6_SUPPORT 
    2323 
    24 # add EXTRA_CFLAGS, EXTRA_LDFLAGS variables to all Makefile.in's 
    25 $(PKG)_CONFIGURE_PRE_CMDS += $(SED) -i -r -e 's,^((C|LD)FLAGS)[ \t]*=[ \t]*@\1@,& $$$$(EXTRA_\1),' `find . -name Makefile.in`; 
     24$(PKG)_PATCH_POST_CMDS += $(call PKG_ADD_EXTRA_FLAGS,(C|LD)FLAGS|LIBS) 
    2625 
    2726# reduce binary size by setting appropriate CFLAGS/LDFLAGS 
     
    3231$(PKG)_EXTRA_CFLAGS += -DCUSTOM_PRIVATEKEYPASSWORD_METHOD=PRIVATEKEYPASSWORD_METHOD_PROXY 
    3332$(PKG)_EXTRA_LDFLAGS += -all-static 
     33$(PKG)_STATIC_LIBS += $(OPENSSL_LIBCRYPTO_EXTRA_LIBS) 
    3434endif 
    3535 
     
    5353    $(SUBMAKE) -C $(STUNNEL_DIR) \ 
    5454        EXTRA_CFLAGS="$(STUNNEL_EXTRA_CFLAGS)" \ 
    55         EXTRA_LDFLAGS="$(STUNNEL_EXTRA_LDFLAGS)" 
     55        EXTRA_LDFLAGS="$(STUNNEL_EXTRA_LDFLAGS)" \ 
     56        EXTRA_LIBS="$(STUNNEL_STATIC_LIBS)" 
    5657 
    5758$($(PKG)_TARGET_BINARY): $($(PKG)_BINARY) 
  • trunk/make/vsftpd/patches/111-find_libs.patch

    r13052 r14375  
    77-LIBS   =   `./vsf_findlibs.sh` 
    88-LINK   =   -Wl,-s 
    9 +LIBS   =   -lcrypt 
     9+LIBS   =   -lcrypt $(EXTRA_LIBS) 
    1010+LINK   = 
    1111 LDFLAGS    =   -fPIE -pie -Wl,-z,relro -Wl,-z,now 
  • trunk/make/vsftpd/vsftpd.mk

    r13427 r14375  
    1313$(PKG)_REBUILD_SUBOPTS += FREETZ_OPENSSL_SHLIB_VERSION 
    1414$(PKG)_DEPENDS_ON += openssl 
    15 $(PKG)_CFLAGS := -DFREETZ_PACKAGE_VSFTPD_WITH_SSL 
    16 $(PKG)_LDFLAGS := -lssl -lcrypto -ldl 
     15$(PKG)_CFLAGS += -DFREETZ_PACKAGE_VSFTPD_WITH_SSL 
     16$(PKG)_EXTRA_LIBS += -lssl -lcrypto 
     17$(PKG)_EXTRA_LIBS += $(if $(FREETZ_PACKAGE_VSFTPD_STATIC),$(OPENSSL_LIBCRYPTO_EXTRA_LIBS)) 
    1718endif 
    1819 
     
    2930        CC="$(TARGET_CC)" \ 
    3031        CFLAGS="$(TARGET_CFLAGS) $(VSFTPD_CFLAGS)" \ 
    31         LDFLAGS="$(TARGET_LDFLAGS) $(VSFTPD_LDFLAGS)" 
     32        LDFLAGS="$(TARGET_LDFLAGS) $(VSFTPD_LDFLAGS)" \ 
     33        EXTRA_LIBS="$(VSFTPD_EXTRA_LIBS)" 
    3234 
    3335$($(PKG)_TARGET_BINARY): $($(PKG)_BINARY) 
  • trunk/make/vtun/patches/100-extra_flags.patch

    r14374 r14375  
    11--- Makefile.in 
    22+++ Makefile.in 
    3 @@ -59,7 +59,7 @@ 
    4     $(CC) $(CFLAGS) $(DEFS) -c $< 
     3@@ -19,7 +19,7 @@ 
     4 #   
     5 CC = @CC@ 
     6 CFLAGS = @CFLAGS@ @CPPFLAGS@ 
     7-LDFLAGS = @LDFLAGS@ @LIBS@ 
     8+LDFLAGS = @LDFLAGS@ $(EXTRA_LDFLAGS) @LIBS@ $(EXTRA_LIBS) 
    59  
    6  vtund: $(OBJS) 
    7 -   $(CC) $(CFLAGS) -o vtund $(OBJS) $(LFD_OBJS) $(LDFLAGS) 
    8 +   $(CC) $(CFLAGS) -o vtund $(OBJS) $(LFD_OBJS) $(LDFLAGS) $(EXTRA_LDFLAGS) 
    9   
    10  cfg_file.tab.h: 
    11     $(YACC) $(YACCFLAGS) -b cfg_file cfg_file.y 
     10 YACC = @YACC@ 
     11 YACCFLAGS = -d 
  • trunk/make/vtun/vtun.mk

    r9421 r14375  
    1919 
    2020ifeq ($(strip $(FREETZ_PACKAGE_VTUN_STATIC)),y) 
    21 $(PKG)_LDFLAGS:= -static 
     21$(PKG)_LDFLAGS += -static 
     22ifeq ($(strip $(FREETZ_PACKAGE_VTUN_WITH_SSL)),y) 
     23$(PKG)_STATIC_LIBS += $(OPENSSL_LIBCRYPTO_EXTRA_LIBS) 
     24endif 
    2225endif 
    2326 
     
    4144$($(PKG)_BINARY): $($(PKG)_DIR)/.configured 
    4245    $(SUBMAKE) -C $(VTUN_DIR) \ 
    43         EXTRA_LDFLAGS="$(VTUN_LDFLAGS)" 
     46        EXTRA_LDFLAGS="$(VTUN_LDFLAGS)" \ 
     47        EXTRA_LIBS="$(VTUN_STATIC_LIBS)" 
    4448 
    4549$($(PKG)_TARGET_BINARY): $($(PKG)_BINARY) 
  • trunk/make/wget/wget.mk

    r14373 r14375  
    1313$(PKG)_PATCH_POST_CMDS += $(call PKG_MAKE_AC_VARIABLES_PACKAGE_SPECIFIC,lib_z_compress) 
    1414 
    15 # add EXTRA_(C|LD)FLAGS 
    16 $(PKG)_PATCH_POST_CMDS += find $(abspath $($(PKG)_DIR)) -name Makefile.in -type f \ 
    17     -exec $(SED) -i -r -e 's,^(C|LD)FLAGS[ \t]*=[ \t]*@\1FLAGS@,& $$$$(EXTRA_\1FLAGS),' \{\} \+; 
     15$(PKG)_PATCH_POST_CMDS += $(call PKG_ADD_EXTRA_FLAGS,(C|LD)FLAGS|LIBS) 
     16 
    1817$(PKG)_EXTRA_CFLAGS  += -ffunction-sections -fdata-sections 
    1918$(PKG)_EXTRA_LDFLAGS += -Wl,--gc-sections 
     
    2827$(PKG)_CONFIGURE_OPTIONS += --without-libgnutls-prefix 
    2928ifeq ($(strip $(FREETZ_PACKAGE_WGET_STATIC)),y) 
    30 $(PKG)_STATIC_LIBS := $(if $(FREETZ_LIB_libcrypto_WITH_ZLIB),-lz) 
     29$(PKG)_STATIC_LIBS := $(OPENSSL_LIBCRYPTO_EXTRA_LIBS) 
    3130endif 
    3231endif 
     
    7271        EXTRA_CFLAGS="$(WGET_EXTRA_CFLAGS)" \ 
    7372        EXTRA_LDFLAGS="$(WGET_EXTRA_LDFLAGS)" \ 
    74         STATIC_LIBS="$(WGET_STATIC_LIBS)" 
     73        EXTRA_LIBS="$(WGET_STATIC_LIBS)" 
    7574 
    7675$($(PKG)_TARGET_BINARY): $($(PKG)_BINARY) 
  • trunk/make/xmail/xmail.mk

    r12669 r14375  
    1010 
    1111$(PKG)_DEPENDS_ON += $(STDCXXLIB) 
    12 $(PKG)_LDFLAGS := -ldl -lpthread 
    1312$(PKG)_CFLAGS := -I$(XMAIL_DIR) -D__LINUX__ -DSYS_HAS_SENDFILE -D_REENTRANT=1 -D_THREAD_SAFE=1 -DHAS_SYSMACHINE -D_GNU_SOURCE -D_POSIX_PTHREAD_SEMANTICS 
    1413 
     
    2221endif 
    2322 
    24 ifeq ($(strip $(FREETZ_PACKAGE_XMAIL_STATIC)),y) 
    25 $(PKG)_LDFLAGS += -static 
    26 endif 
    2723ifeq ($(strip $(FREETZ_PACKAGE_XMAIL_WITH_SSL)),y) 
    2824$(PKG)_REBUILD_SUBOPTS += FREETZ_OPENSSL_SHLIB_VERSION 
    2925$(PKG)_DEPENDS_ON += openssl 
    30 $(PKG)_LDFLAGS += -lssl -lcrypto 
    3126$(PKG)_CFLAGS += -DWITH_SSL 
     27$(PKG)_SSLLIBS += -lssl -lcrypto $(if $(FREETZ_PACKAGE_XMAIL_STATIC),$(OPENSSL_LIBCRYPTO_EXTRA_LIBS)) 
     28endif 
     29 
     30ifeq ($(strip $(FREETZ_PACKAGE_XMAIL_STATIC)),y) 
     31$(PKG)_LDFLAGS += -static 
    3232endif 
    3333 
     
    4141        LD="$(TARGET_CXX)" \ 
    4242        CFLAGS="$(TARGET_CFLAGS) $(XMAIL_CFLAGS)" \ 
    43         LDFLAGS="$(TARGED_LDFLAGS) $(XMAIL_LDFLAGS)" \ 
     43        EXTRA_LDFLAGS="$(XMAIL_LDFLAGS)" \ 
     44        SSLLIBS="$(XMAIL_SSLLIBS)" \ 
    4445        STRIP="$(TARGET_STRIP)" 
    4546    $(TARGET_CC) $(TARGET_CFLAGS) -o $(XMAIL_DIR)/bin/compartment $(XMAIL_DIR)/docs/compartment.c 
Hinweis: Hilfe zur Verwendung der Changeset-Ansicht finden Sie unter TracChangeset.