diff --git a/configure.ac b/configure.ac index 48f82427..18df2b0e 100644 --- a/configure.ac +++ b/configure.ac @@ -80,12 +80,16 @@ if test "x$enable_coverage" = xno && test "x$enable_debug" = xno && test "x$enab FLAGS="$FLAGS -O3 -D_FORTIFY_SOURCE=2" fi +# check if assembler can generate missing build notes, binutils >= 2.31 or older with backport is needed +AX_CHECK_COMPILE_FLAG([-Wa,--generate-missing-build-notes=yes], [ICA_ASFLAGS="-Wa,--generate-missing-build-notes=yes"]) + # restore cmdline flags (ignore PROG_AS/PROG_CC defaults) CFLAGS="$cmdline_CFLAGS" CCASFLAGS="$cmdline_CFLAGS" AC_SUBST([FLAGS], $FLAGS) AC_SUBST([LIBS], $LIBS) +AC_SUBST([ICA_ASFLAGS], $ICA_ASFLAGS) AC_CONFIG_FILES([Makefile doc/Makefile include/Makefile src/Makefile test/Makefile]) AC_OUTPUT diff --git a/src/Makefile.am b/src/Makefile.am index c7cecf6e..0f70cfd8 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -8,7 +8,7 @@ lib_LTLIBRARIES = libica.la libica_la_CFLAGS = ${AM_CFLAGS} -I${srcdir}/include -I${srcdir}/../include \ -fvisibility=hidden -libica_la_CCASFLAGS = ${AM_CFLAGS} +libica_la_CCASFLAGS = ${AM_CFLAGS} @ICA_ASFLAGS@ libica_la_LIBADD = @LIBS@ -lrt -lcrypto libica_la_LDFLAGS = -Wl,--version-script=${srcdir}/../libica.map \ -version-number ${VERSION}