From e2e5e98bcd0badcd437b8a67aa0986ed6d6678a9 Mon Sep 17 00:00:00 2001 From: Michael Forney Date: Fri, 5 Jul 2019 20:31:33 -0700 Subject: Use a separate preprocessor rule Otherwise, we end up passing both -c and -E to the compiler. --- pkg/strace/gen.lua | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'pkg/strace') diff --git a/pkg/strace/gen.lua b/pkg/strace/gen.lua index b60effb6..f016398e 100644 --- a/pkg/strace/gen.lua +++ b/pkg/strace/gen.lua @@ -8,9 +8,7 @@ cflags{ '-I $outdir', } -build('cc', '$outdir/ioctl_iocdef.i', '$srcdir/ioctl_iocdef.c', { - cflags='$cflags -P -E -MT $outdir/ioctl_iocdef.i', -}) +build('cpp', '$outdir/ioctl_iocdef.i', '$srcdir/ioctl_iocdef.c') build('sed', '$outdir/ioctl_iocdef.h', '$outdir/ioctl_iocdef.i', { expr=[[-n 's/^DEFINE HOST/#define /p']], }) @@ -41,8 +39,8 @@ end) local mpers = lines('mpers.txt') for _, f in ipairs(mpers) do - build('cc', '$outdir/'..f..'.mpers.i', '$srcdir/'..f, { - cflags='$cflags -P -E -MT $outdir/'..f..'.mpers.i -DIN_MPERS_BOOTSTRAP', + build('cpp', '$outdir/'..f..'.mpers.i', '$srcdir/'..f, { + cflags='$cflags -DIN_MPERS_BOOTSTRAP', }) end @@ -56,9 +54,7 @@ makempers('printers.h', 'printers.awk') makempers('native_printer_decls.h', 'printerdecls.awk') makempers('native_printer_defs.h', 'printerdefs.awk') -build('cc', '$outdir/syscallent.i', '$srcdir/linux/x86_64/syscallent.h', { - cflags='$cflags -P -E -MT $outdir/syscallent.i', -}) +build('cpp', '$outdir/syscallent.i', '$srcdir/linux/x86_64/syscallent.h') build('awk', '$outdir/scno-syscallent.h', {'$outdir/syscallent.i', '|', '$dir/scno.awk'}, { expr='-f $dir/scno.awk', }) -- cgit v1.2.3