Skip to content

Commit 7939cd5

Browse files
build: List *CPPFLAGS before *CFLAGS like on the compiler command line
1 parent 595e8a3 commit 7939cd5

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

configure.ac

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -367,8 +367,8 @@ if test x"$use_ecmult_static_precomputation" != x"no"; then
367367
fi
368368
# If we're not cross-compiling, simply use the same compiler for building the static precompation code.
369369
CC_FOR_BUILD="$CC"
370-
SECP_CFLAGS_FOR_BUILD="$SECP_CFLAGS"
371370
CPPFLAGS_FOR_BUILD="$CPPFLAGS"
371+
SECP_CFLAGS_FOR_BUILD="$SECP_CFLAGS"
372372
CFLAGS_FOR_BUILD="$CFLAGS"
373373
LDFLAGS_FOR_BUILD="$LDFLAGS"
374374
else
@@ -379,10 +379,10 @@ if test x"$use_ecmult_static_precomputation" != x"no"; then
379379
cross_compiling=no
380380
SAVE_CC="$CC"
381381
CC="$CC_FOR_BUILD"
382-
SAVE_CFLAGS="$CFLAGS"
383-
CFLAGS="$CFLAGS_FOR_BUILD"
384382
SAVE_CPPFLAGS="$CPPFLAGS"
385383
CPPFLAGS="$CPPFLAGS_FOR_BUILD"
384+
SAVE_CFLAGS="$CFLAGS"
385+
CFLAGS="$CFLAGS_FOR_BUILD"
386386
SAVE_LDFLAGS="$LDFLAGS"
387387
LDFLAGS="$LDFLAGS_FOR_BUILD"
388388

@@ -397,14 +397,14 @@ if test x"$use_ecmult_static_precomputation" != x"no"; then
397397
# Restore the environment
398398
cross_compiling=$save_cross_compiling
399399
CC="$SAVE_CC"
400-
CFLAGS="$SAVE_CFLAGS"
401400
CPPFLAGS="$SAVE_CPPFLAGS"
401+
CFLAGS="$SAVE_CFLAGS"
402402
LDFLAGS="$SAVE_LDFLAGS"
403403

404404
if test x"$working_native_cc" = x"no"; then
405405
AC_MSG_RESULT([no])
406406
set_precomp=no
407-
m4_define([please_set_for_build], [Please set CC_FOR_BUILD, CFLAGS_FOR_BUILD, CPPFLAGS_FOR_BUILD, and/or LDFLAGS_FOR_BUILD.])
407+
m4_define([please_set_for_build], [Please set CC_FOR_BUILD, CPPFLAGS_FOR_BUILD, CFLAGS_FOR_BUILD, and/or LDFLAGS_FOR_BUILD.])
408408
if test x"$use_ecmult_static_precomputation" = x"yes"; then
409409
AC_MSG_ERROR([native compiler ${CC_FOR_BUILD} does not produce working binaries. please_set_for_build])
410410
else
@@ -417,9 +417,9 @@ if test x"$use_ecmult_static_precomputation" != x"no"; then
417417
fi
418418

419419
AC_SUBST(CC_FOR_BUILD)
420+
AC_SUBST(CPPFLAGS_FOR_BUILD)
420421
AC_SUBST(SECP_CFLAGS_FOR_BUILD)
421422
AC_SUBST(CFLAGS_FOR_BUILD)
422-
AC_SUBST(CPPFLAGS_FOR_BUILD)
423423
AC_SUBST(LDFLAGS_FOR_BUILD)
424424
else
425425
set_precomp=no
@@ -532,15 +532,15 @@ fi
532532
echo
533533
echo " valgrind = $enable_valgrind"
534534
echo " CC = $CC"
535+
echo " CPPFLAGS = $CPPFLAGS"
535536
echo " SECP_CFLAGS = $SECP_CFLAGS"
536537
echo " CFLAGS = $CFLAGS"
537-
echo " CPPFLAGS = $CPPFLAGS"
538538
echo " LDFLAGS = $LDFLAGS"
539539
echo
540540
if test x"$set_precomp" = x"yes"; then
541541
echo " CC_FOR_BUILD = $CC_FOR_BUILD"
542+
echo " CPPFLAGS_FOR_BUILD = $CPPFLAGS_FOR_BUILD"
542543
echo " SECP_CFLAGS_FOR_BUILD = $SECP_CFLAGS_FOR_BUILD"
543544
echo " CFLAGS_FOR_BUILD = $CFLAGS_FOR_BUILD"
544-
echo " CPPFLAGS_FOR_BUILD = $CPPFLAGS_FOR_BUILD"
545545
echo " LDFLAGS_FOR_BUILD = $LDFLAGS_FOR_BUILD"
546546
fi

0 commit comments

Comments
 (0)