diff --git a/.travis.yml b/.travis.yml index 2e69d36c..30b2113a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -44,13 +44,6 @@ matrix: - env: BUILD_TYPE=default CURVE=tweetnacl IPv6=ON os: linux dist: precise - - env: BUILD_TYPE=default CURVE=tweetnacl USE_NSS=yes - os: linux - dist: precise - addons: - apt: - packages: - - libnss3-dev - env: BUILD_TYPE=coverage CURVE=tweetnacl DRAFT=enabled os: linux addons: @@ -77,7 +70,7 @@ matrix: - libsodium-dev - asciidoc - xmlto - - env: BUILD_TYPE=default CURVE=libsodium DRAFT=enabled GSSAPI=enabled PGM=enabled NORM=enabled TIPC=enabled + - env: BUILD_TYPE=default CURVE=libsodium DRAFT=enabled GSSAPI=enabled PGM=enabled NORM=enabled TIPC=enabled USE_NSS=yes os: linux addons: apt: @@ -89,6 +82,7 @@ matrix: - libnorm-dev - libpgm-dev - libsodium-dev + - libnss3-dev - env: BUILD_TYPE=default CURVE=libsodium DRAFT=enabled os: osx - env: BUILD_TYPE=default CURVE=tweetnacl DRAFT=enabled ADDRESS_SANITIZER=enabled diff --git a/configure.ac b/configure.ac index 9511bd72..2abf0a33 100644 --- a/configure.ac +++ b/configure.ac @@ -949,6 +949,20 @@ AX_CHECK_COMPILE_FLAG([-Wno-tautological-constant-compare], [], [-Werror]) +# LTO is enabled by default on SUSE Tumbleweed and RPM lint generates an error if +# the flag is not used to compile archives: +# E: lto-no-text-in-archive +AC_LANG_PUSH([C]) +AX_CHECK_COMPILE_FLAG([-ffat-lto-objects], + [CFLAGS+=" -ffat-lto-objects"], + [], + [-Werror]) +AC_LANG_POP([C]) +AX_CHECK_COMPILE_FLAG([-ffat-lto-objects], + [CXXFLAGS+=" -ffat-lto-objects"], + [], + [-Werror]) + # Subst LIBZMQ_EXTRA_CFLAGS & CXXFLAGS & LDFLAGS AC_SUBST(LIBZMQ_EXTRA_CFLAGS) AC_SUBST(LIBZMQ_EXTRA_CXXFLAGS) diff --git a/packaging/debian/control b/packaging/debian/control index 028a6c7e..2bcc6fce 100644 --- a/packaging/debian/control +++ b/packaging/debian/control @@ -9,6 +9,7 @@ Build-Depends: debhelper (>= 9), libpgm-dev, libsodium-dev, libunwind-dev | libunwind8-dev | libunwind7-dev, + libnss3-dev, pkg-config, asciidoc-base | asciidoc, xmlto, Standards-Version: 3.9.8 @@ -38,6 +39,7 @@ Depends: libzmq5 (= ${binary:Version}), ${misc:Depends}, libpgm-dev, libsodium-dev, libunwind-dev | libunwind8-dev | libunwind7-dev, + libnss3-dev, Conflicts: libzmq-dev, libzmq5-dev Replaces: libzmq5-dev Provides: libzmq5-dev diff --git a/packaging/debian/rules b/packaging/debian/rules index 5839df35..6a7b4ca5 100755 --- a/packaging/debian/rules +++ b/packaging/debian/rules @@ -43,7 +43,7 @@ override_dh_clean: rm -f config.log override_dh_auto_configure: - dh_auto_configure -- --with-pgm --with-libsodium --enable-drafts=$(DRAFTS) --with-libgssapi_krb5=yes --with-norm=yes + dh_auto_configure -- --with-pgm --with-libsodium --enable-drafts=$(DRAFTS) --with-libgssapi_krb5=yes --with-norm=yes --with-nss=yes override_dh_auto_test: ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS))) diff --git a/packaging/debian/zeromq.dsc.obs b/packaging/debian/zeromq.dsc.obs index 73d3574f..94c78973 100644 --- a/packaging/debian/zeromq.dsc.obs +++ b/packaging/debian/zeromq.dsc.obs @@ -6,7 +6,7 @@ Version: 4.3.3 Maintainer: libzmq Developers Homepage: http://www.zeromq.org/ Standards-Version: 3.9.8 -Build-Depends: debhelper (>= 9), dh-autoreconf, libkrb5-dev, libpgm-dev, libnorm-dev, libsodium-dev, libunwind-dev | libunwind8-dev | libunwind7-dev, pkg-config, asciidoc-base | asciidoc, xmlto +Build-Depends: debhelper (>= 9), dh-autoreconf, libkrb5-dev, libpgm-dev, libnorm-dev, libsodium-dev, libunwind-dev | libunwind8-dev | libunwind7-dev, libnss3-dev, pkg-config, asciidoc-base | asciidoc, xmlto Package-List: libzmq3-dev deb libdevel optional arch=any libzmq5 deb libs optional arch=any diff --git a/packaging/redhat/zeromq.spec b/packaging/redhat/zeromq.spec index 0741265b..b7c063f0 100644 --- a/packaging/redhat/zeromq.spec +++ b/packaging/redhat/zeromq.spec @@ -45,6 +45,13 @@ BuildRequires: libsodium-devel %else %define SODIUM no %endif +%bcond_with nss +%if %{with nss} +BuildRequires: nss-devel +%define NSS yes +%else +%define NSS no +%endif BuildRequires: gcc, make, gcc-c++, libstdc++-devel, asciidoc, xmlto Requires: libstdc++ @@ -60,6 +67,7 @@ Requires: libstdc++ %{!?_with_libgssapi_krb5: %{!?_without_libgssapi_krb5: %define _without_libgssapi_krb5 --without-liblibgssapi_krb5}} %{!?_with_libsodium: %{!?_without_libsodium: %define _without_libsodium --without-libsodium}} %{!?_with_pgm: %{!?_without_pgm: %define _without_pgm --without-pgm}} +%{!?_with_nss: %{!?_without_nss: %define _without_nss --without-nss}} # It's an error if both --with and --without options are specified %{?_with_libgssapi_krb5: %{?_without_libgssapi_krb5: %{error: both _with_libgssapi_krb5 and _without_libgssapi_krb5}}} @@ -75,6 +83,9 @@ Requires: libstdc++ %{?_with_pgm:BuildRequires: openpgm-devel} %{?_with_pgm:Requires: openpgm} +%{?_with_nss:BuildRequires: nss-devel} +%{?_with_nss:Requires: nss} + %ifarch pentium3 pentium4 athlon i386 i486 i586 i686 x86_64 %{!?_with_pic: %{!?_without_pic: %define _with_pic --with-pic}} %{!?_with_gnu_ld: %{!?_without_gnu_ld: %define _with_gnu_ld --with-gnu_ld}} @@ -110,7 +121,6 @@ This package contains the ZeroMQ shared library. Summary: Development files and static library for the ZeroMQ library Group: Development/Libraries Requires: %{lib_name} = %{version}-%{release}, pkgconfig -Requires: libsodium-devel %bcond_with pgm %if %{with pgm} Requires: openpgm-devel @@ -123,6 +133,10 @@ Requires: krb5-devel %if %{with libsodium} Requires: libsodium-devel %endif +%bcond_with nss +%if %{with nss} +Requires: nss-devel +%endif %description devel The 0MQ lightweight messaging kernel is a library which extends the @@ -164,6 +178,7 @@ autoreconf -fi --with-pgm=%{PGM} \ --with-libsodium=%{SODIUM} \ --with-libgssapi_krb5=%{GSSAPI} \ + --with-nss=%{NSS} \ %{?_with_pic} \ %{?_without_pic} \ %{?_with_gnu_ld} \ @@ -216,6 +231,9 @@ autoreconf -fi %{_bindir}/curve_keygen %changelog +* Wed Sep 11 2019 Luca Boccassi +- Add macro for optional NSS dependency + * Sat Aug 19 2017 Luca Boccassi - Fix parsing and usage of conditionals for sodium/pgm/krb5 so that they work in OBS