summaryrefslogtreecommitdiff
path: root/rtemstoolkit
diff options
context:
space:
mode:
authorChris Johns <chrisj@rtems.org>2019-05-27 10:08:27 +1000
committerChris Johns <chrisj@rtems.org>2019-05-27 10:08:27 +1000
commitd7979dece664f3c31d7cb2f4c3b25501e1ab809a (patch)
treefc62cfdbdaaf8cca1382984863beabf218ab2407 /rtemstoolkit
parent6c79a16e209e9f61904114ad82bac650417508e2 (diff)
waf: Update the check_cc tests to a newer method supported by waf.
- Fix a minor issue in covoar's use of 64bit calls.
Diffstat (limited to 'rtemstoolkit')
-rw-r--r--rtemstoolkit/wscript19
1 files changed, 13 insertions, 6 deletions
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 <sys/types.h>
+ #include <signal.h>
+ 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 <sys/types.h>
+ #include <sys/time.h>
+ #include <sys/resource.h>
+ 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):