From d8072e1460a65b1daf07f93999081a9077ace061 Mon Sep 17 00:00:00 2001 From: Gabe Black Date: Sun, 7 Feb 2021 01:50:53 -0800 Subject: [PATCH] scons: Move a displaced have_posix_clock check back where it goes. 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 Maintainer: Gabe Black Reviewed-by: Andreas Sandberg --- SConstruct | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/SConstruct b/SConstruct index 214aa4834..45a0df6e9 100755 --- a/SConstruct +++ b/SConstruct @@ -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 (C99 FP environment control) have_fenv = conf.CheckHeader('fenv.h', '<>') if not have_fenv: -- 2.30.2