summaryrefslogtreecommitdiff
path: root/pkg/strace/gen.lua
diff options
context:
space:
mode:
authorMichael Forney <mforney@mforney.org>2019-08-11 02:31:34 +0000
committerMichael Forney <mforney@mforney.org>2019-08-12 02:24:38 +0000
commitc99cffd412a041586e8a475bbb75212f3746ca1d (patch)
tree7cd1538269ae21024285b2d5d2d02abc4c2513f7 /pkg/strace/gen.lua
parent43c67768e8b6655c9ae3276f3c2704181437bfea (diff)
strace: Probe for __builtin_popcount
Diffstat (limited to 'pkg/strace/gen.lua')
-rw-r--r--pkg/strace/gen.lua9
1 files changed, 7 insertions, 2 deletions
diff --git a/pkg/strace/gen.lua b/pkg/strace/gen.lua
index b48aecae..f5874e7e 100644
--- a/pkg/strace/gen.lua
+++ b/pkg/strace/gen.lua
@@ -1,6 +1,5 @@
cflags{
'-D HAVE_CONFIG_H',
- '-I $dir',
-- it is important that the arch-specific directory is searched first
'-I $srcdir/linux/x86_64',
'-I $srcdir/linux',
@@ -8,6 +7,11 @@ cflags{
'-I $outdir',
}
+build('cat', '$outdir/config.h', {
+ '$builddir/probe/HAVE___BUILTIN_POPCOUNT',
+ '$dir/config.h',
+})
+
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']],
@@ -39,7 +43,7 @@ end)
local mpers = lines('mpers.txt')
for _, f in ipairs(mpers) do
- build('cpp', '$outdir/'..f..'.mpers.i', '$srcdir/'..f, {
+ build('cpp', '$outdir/'..f..'.mpers.i', {'$srcdir/'..f, '|', '$outdir/config.h'}, {
cflags='$cflags -DIN_MPERS_BOOTSTRAP',
})
end
@@ -327,6 +331,7 @@ build('sed', '$outdir/sys_func.h', expand{'$srcdir/', {libsrcs, srcs}}, {
})
pkg.deps = {
+ '$outdir/config.h',
'$outdir/ioctlent0.h',
'$outdir/ioctlent1.h',
'$outdir/ioctlent2.h',