Commit 3e4c90bb authored by Luca Boccassi's avatar Luca Boccassi

Problem: package build fails on SUSE Tumbleweed

Solution: add -ffat-lto-objects if the compiler supports it
parent 79535f39
......@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment