@@ -262,6 +262,13 @@ AC_ARG_ENABLE([gprof],
262
262
[ enable_gprof=$enableval] ,
263
263
[ enable_gprof=no] )
264
264
265
+ dnl Pass compiler & liner flags that make builds deterministic
266
+ AC_ARG_ENABLE ( [ determinism] ,
267
+ [ AS_HELP_STRING ( [ --enable-determinism] ,
268
+ [ Enable compilation flags that make builds deterministic (default is no)] ) ] ,
269
+ [ enable_determinism=$enableval] ,
270
+ [ enable_determinism=no] )
271
+
265
272
dnl Turn warnings into errors
266
273
AC_ARG_ENABLE ( [ werror] ,
267
274
[ AS_HELP_STRING ( [ --enable-werror] ,
@@ -764,6 +771,12 @@ if test x$TARGET_OS = xdarwin; then
764
771
AX_CHECK_LINK_FLAG ( [ [ -Wl,-bind_at_load] ] , [ HARDENED_LDFLAGS="$HARDENED_LDFLAGS -Wl,-bind_at_load"] )
765
772
fi
766
773
774
+ if test x$enable_determinism = xyes; then
775
+ if test x$TARGET_OS = xwindows; then
776
+ AX_CHECK_LINK_FLAG ( [ [ -Wl,--no-insert-timestamp] ] , [ LDFLAGS="$LDFLAGS -Wl,--no-insert-timestamp"] )
777
+ fi
778
+ fi
779
+
767
780
AC_CHECK_HEADERS ( [ endian.h sys/endian.h byteswap.h stdio.h stdlib.h unistd.h strings.h sys/types.h sys/stat.h sys/select.h sys/prctl.h sys/sysctl.h vm/vm_param.h sys/vmmeter.h sys/resources.h] )
768
781
769
782
dnl FD_ZERO may be dependent on a declaration of memcpy, e.g. in SmartOS
0 commit comments