You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Merge #584: configure: Use CFLAGS_FOR_BUILD when checking native compiler
a34bcaa Actually pass CFLAGS_FOR_BUILD and LDFLAGS_FOR_BUILD to linker (Tim Ruffing)
2d5f4ce configure: Use CFLAGS_FOR_BUILD when checking native compiler (Tim Ruffing)
Pull request description:
This fixes a bug where configure would fail or disable static
ecmult tables because it wrongly checks the native compiler using
the target CFLAGS (instead of the native CFLAGS_FOR_BUILD).
Moreover, this commit adds tests to figure out whether the native
compiler supports the warning flags passed during the build, and it
contains a few minor improvements to the code that checks the native
compiler.
Tree-SHA512: 31a92a5516cf2f9801c918edfba0059aa4f8549b0c1de94fc166b5e92ad1868a480c48cdc5ff62679ba20e26f4a0e2948c71fd2b3e80766673d2bf7512da3875
AC_MSG_CHECKING([for working native compiler: ${CC_FOR_BUILD}])
170
188
AC_RUN_IFELSE(
171
-
[AC_LANG_PROGRAM([], [return 0])],
189
+
[AC_LANG_PROGRAM([], [])],
172
190
[working_native_cc=yes],
173
191
[working_native_cc=no],[dnl])
174
-
CC="$TEMP_CC"
192
+
193
+
CFLAGS_FOR_BUILD="$CFLAGS"
194
+
195
+
# Restore the environment
175
196
cross_compiling=$save_cross_compiling
197
+
CC="$SAVE_CC"
198
+
CFLAGS="$SAVE_CFLAGS"
199
+
CPPFLAGS="$SAVE_CPPFLAGS"
200
+
LDFLAGS="$SAVE_LDFLAGS"
176
201
177
202
if test x"$working_native_cc" = x"no"; then
203
+
AC_MSG_RESULT([no])
178
204
set_precomp=no
205
+
m4_define([please_set_for_build], [Please set CC_FOR_BUILD, CFLAGS_FOR_BUILD, CPPFLAGS_FOR_BUILD, and/or LDFLAGS_FOR_BUILD.])
179
206
if test x"$use_ecmult_static_precomputation" = x"yes"; then
180
-
AC_MSG_ERROR([${CC_FOR_BUILD} does not produce working binaries. Please set CC_FOR_BUILD])
207
+
AC_MSG_ERROR([native compiler ${CC_FOR_BUILD} does not produce working binaries. please_set_for_build])
181
208
else
182
-
AC_MSG_RESULT([${CC_FOR_BUILD} does not produce working binaries. Please set CC_FOR_BUILD])
209
+
AC_MSG_WARN([Disabling statically generated ecmult table because the native compiler ${CC_FOR_BUILD} does not produce working binaries. please_set_for_build])
0 commit comments