From d7979dece664f3c31d7cb2f4c3b25501e1ab809a Mon Sep 17 00:00:00 2001 From: Chris Johns Date: Mon, 27 May 2019 10:08:27 +1000 Subject: waf: Update the check_cc tests to a newer method supported by waf. - Fix a minor issue in covoar's use of 64bit calls. --- rtemstoolkit/wscript | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) (limited to 'rtemstoolkit') diff --git a/rtemstoolkit/wscript b/rtemstoolkit/wscript index 2c126c8..d9f01b9 100644 --- a/rtemstoolkit/wscript +++ b/rtemstoolkit/wscript @@ -45,8 +45,12 @@ def configure(conf): conf.find_program('m4') conf.check(header_name = 'sys/wait.h', features = 'c', mandatory = False) - conf.check_cc(function_name = 'kill', header_name="signal.h", - features = 'c', mandatory = False) + conf.check_cc(fragment = ''' + #include + #include + int main() { pid_t pid = 1234; int r = kill(pid, SIGKILL); } ''', + cflags = '-Wall', define_name = 'HAVE_KILL', + msg = 'Checking for kill', mandatory = False) conf.write_config_header('config.h') def build(bld): @@ -383,10 +387,13 @@ def conf_libiberty(conf): conf.check(header_name='unistd.h', features = 'c', mandatory = False) conf.check(header_name='vfork.h', features = 'c', mandatory = False) - conf.check_cc(function_name='getrusage', - header_name="sys/time.h sys/resource.h", - features = 'c', mandatory = False) - + conf.check_cc(fragment = ''' + #include + #include + #include + int main() { struct rusage ru = {0}; int r = getrusage(RUSAGE_SELF, &ru); } ''', + cflags = '-Wall', define_name = 'HAVE_GETRUSAGE', + msg = 'Checking for getrusage', mandatory = False) conf.write_config_header('libiberty/config.h') def bld_libiberty(bld, conf): -- cgit v1.2.3