Changeset d7979de in rtems-tools


Ignore:
Timestamp:
May 27, 2019, 12:08:27 AM (6 months ago)
Author:
Chris Johns <chrisj@…>
Branches:
master
Children:
b7b19f4
Parents:
6c79a16
Message:

waf: Update the check_cc tests to a newer method supported by waf.

  • Fix a minor issue in covoar's use of 64bit calls.
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • misc/wscript

    r6c79a16 rd7979de  
    3434    conf.load('compiler_c')
    3535
    36     conf.check_cc(function_name = 'strnlen', header_name="string.h",
    37                   features = 'c', mandatory = False)
     36    conf.check_cc(fragment = '''
     37                     #include <string.h>
     38                     int main() { size_t l = strnlen("string", 10); } ''',
     39                  cflags = '-Wall', define_name = 'HAVE_STRNLEN',
     40                  msg = 'Checking for strnlen', mandatory = False)
    3841    conf.write_config_header('config.h')
    3942
  • rtemstoolkit/wscript

    r6c79a16 rd7979de  
    4646
    4747    conf.check(header_name = 'sys/wait.h',  features = 'c', mandatory = False)
    48     conf.check_cc(function_name = 'kill', header_name="signal.h",
    49                   features = 'c', mandatory = False)
     48    conf.check_cc(fragment = '''
     49                    #include <sys/types.h>
     50                    #include <signal.h>
     51                    int main() { pid_t pid = 1234; int r = kill(pid, SIGKILL); } ''',
     52                  cflags = '-Wall', define_name = 'HAVE_KILL',
     53                  msg = 'Checking for kill', mandatory = False)
    5054    conf.write_config_header('config.h')
    5155
     
    384388    conf.check(header_name='vfork.h',     features = 'c', mandatory = False)
    385389
    386     conf.check_cc(function_name='getrusage',
    387                   header_name="sys/time.h sys/resource.h",
    388                   features = 'c', mandatory = False)
    389 
     390    conf.check_cc(fragment = '''
     391                    #include <sys/types.h>
     392                    #include <sys/time.h>
     393                    #include <sys/resource.h>
     394                  int main() { struct rusage ru = {0}; int r = getrusage(RUSAGE_SELF, &ru); } ''',
     395                  cflags = '-Wall', define_name = 'HAVE_GETRUSAGE',
     396                  msg = 'Checking for getrusage', mandatory = False)
    390397    conf.write_config_header('libiberty/config.h')
    391398
  • tester/covoar/CoverageReaderQEMU.cc

    r6c79a16 rd7979de  
    2222#include "qemu-traces.h"
    2323
    24 #if HAVE_STAT64
     24#if HAVE_OPEN64
    2525#define OPEN fopen64
    2626#else
  • tester/covoar/wscript

    r6c79a16 rd7979de  
    5555def configure(conf):
    5656    conf.load('compiler_cxx')
    57     conf.check_cc(function_name='open64', header_name="stdlib.h", mandatory = False)
    58     conf.check_cc(function_name='stat64', header_name="stdlib.h", mandatory = False)
     57    conf.check_cc(fragment = '''
     58                    #include <stdlib.h>
     59                    int main() { FILE* f = fopen64("name", "r"); } ''',
     60                  cflags = '-Wall', define_name = 'HAVE_OPEN64',
     61                  msg = 'Checking for fopen64', mandatory = False)
     62    conf.check_cc(fragment = '''
     63                    #include <sys/stat.h>
     64                    int main() { struct stat64 sb; int f = 3; int r = stat64(f, &sb); } ''',
     65                  cflags = '-Wall', define_name = 'HAVE_STAT64',
     66                  msg = 'Checking for stat64', mandatory = False)
    5967    conf.write_config_header('covoar-config.h')
    6068
Note: See TracChangeset for help on using the changeset viewer.