From 4b0e0b88fb0dfd9ab649a8e9f8d34ccc7e329193 Mon Sep 17 00:00:00 2001 From: Daniel Pouzzner Date: Thu, 26 Jan 2023 14:53:56 -0600 Subject: [PATCH] configure.ac: restore CPPFLAGS and CFLAGS to list of iterated options rendered into options.h; delete stale .build_params when ENABLED_REPRODUCIBLE_BUILD. --- configure.ac | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/configure.ac b/configure.ac index f28c177ba..ebd79df6b 100644 --- a/configure.ac +++ b/configure.ac @@ -8571,9 +8571,11 @@ fi if test "$ENABLED_REPRODUCIBLE_BUILD" != "yes" then - echo "#define LIBWOLFSSL_CONFIGURE_ARGS \"$ac_configure_args\"" > ${output_objdir}/.build_params && - echo "#define LIBWOLFSSL_GLOBAL_CFLAGS \"$CPPFLAGS $AM_CPPFLAGS $CFLAGS $AM_CFLAGS\" LIBWOLFSSL_GLOBAL_EXTRA_CFLAGS" >> ${output_objdir}/.build_params || + echo "#define LIBWOLFSSL_CONFIGURE_ARGS \"$ac_configure_args\"" > "${output_objdir}/.build_params" && + echo "#define LIBWOLFSSL_GLOBAL_CFLAGS \"$CPPFLAGS $AM_CPPFLAGS $CFLAGS $AM_CFLAGS\" LIBWOLFSSL_GLOBAL_EXTRA_CFLAGS" >> "${output_objdir}/.build_params" || AC_MSG_ERROR([Couldn't create ${output_objdir}/.build_params.]) +else + rm -f "${output_objdir}/.build_params" fi # generate user options header @@ -8602,7 +8604,7 @@ echo "extern \"C\" {" >> $OPTION_FILE echo "#endif" >> $OPTION_FILE echo "" >> $OPTION_FILE -for option in $AM_CPPFLAGS $AM_CFLAGS; do +for option in $CPPFLAGS $AM_CPPFLAGS $CFLAGS $AM_CFLAGS; do opt_type=$(echo $option | colrm 3) case "$opt_type" in -D)