scons: Move a displaced have_posix_clock check back where it goes.
authorGabe Black <gabe.black@gmail.com>
Sun, 7 Feb 2021 09:50:53 +0000 (01:50 -0800)
committerGabe Black <gabe.black@gmail.com>
Thu, 11 Feb 2021 19:33:24 +0000 (19:33 +0000)
This check had been separated from the code handling have_posix_clock by
some intervening code doing something else. Bring the check back
alongside the code setting that variable.

Change-Id: I6acb54fddbb5c41d6c38d4b93e649835a4775fa0
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/40862
Tested-by: kokoro <noreply+kokoro@google.com>
Maintainer: Gabe Black <gabe.black@gmail.com>
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
SConstruct

index 214aa4834f7b288973cbba8cf65b4c7cfaac6149..45a0df6e96d974d43f4591fb1d517e5d2598dcd2 100755 (executable)
@@ -633,6 +633,8 @@ have_posix_clock = \
                             'clock_nanosleep(0,0,NULL,NULL);') or \
     conf.CheckLibWithHeader('rt', 'time.h', 'C',
                             'clock_nanosleep(0,0,NULL,NULL);')
+if not have_posix_clock:
+    warning("Can't find library for POSIX clocks.")
 
 have_posix_timers = \
     conf.CheckLibWithHeader([None, 'rt'], [ 'time.h', 'signal.h' ], 'C',
@@ -667,9 +669,6 @@ if backtrace_impls[-1] == "none":
     default_backtrace_impl = "none"
     warning("No suitable back trace implementation found.")
 
-if not have_posix_clock:
-    warning("Can't find library for POSIX clocks.")
-
 # Check for <fenv.h> (C99 FP environment control)
 have_fenv = conf.CheckHeader('fenv.h', '<>')
 if not have_fenv: