summaryrefslogtreecommitdiff
path: root/probe
diff options
context:
space:
mode:
authorMichael Forney <mforney@mforney.org>2021-05-07 22:54:42 -0700
committerMichael Forney <mforney@mforney.org>2021-07-25 21:11:05 -0700
commit5548313d47e37e966b1ac3bf5deaad8e0c42666b (patch)
tree089ab9fb7ef70508f2ee043f5ae85c8c17f73816 /probe
parenta02412b3637ff39935c2df2cce98d274b7eab480 (diff)
ffmpeg: Probe for PIC
For nasm, we cannot just use __PIC__ from the preprocessor, so add a probe test for it.
Diffstat (limited to 'probe')
-rw-r--r--probe/PIC3
-rw-r--r--probe/gen.lua1
2 files changed, 4 insertions, 0 deletions
diff --git a/probe/PIC b/probe/PIC
new file mode 100644
index 00000000..e93a37d2
--- /dev/null
+++ b/probe/PIC
@@ -0,0 +1,3 @@
+int main(void) {
+ return __PIC__ == 0;
+}
diff --git a/probe/gen.lua b/probe/gen.lua
index 92f26769..d8c48958 100644
--- a/probe/gen.lua
+++ b/probe/gen.lua
@@ -10,6 +10,7 @@ probe('HAVE___BUILTIN_CHOOSE_EXPR')
probe('HAVE___BUILTIN_CLZ')
probe('HAVE___BUILTIN_CTZL')
probe('HAVE___BUILTIN_POPCOUNT')
+probe('PIC')
local function probesize(var)
build('probe-size', '$outdir/'..var, {'$dir/'..var, '|', '$basedir/scripts/probe-size.sh'}, {var=var})