From ff964eba541028c8027f3104b50641ed285f06d4 Mon Sep 17 00:00:00 2001 From: PerfectLaugh Date: Mon, 10 Nov 2025 02:15:49 +0800 Subject: [PATCH] Add `:standard` in c flags The flags without `:standard` causes compilation error on OCaml 5.4.0 and gcc (GCC) 15.2.1 20251022 (Red Hat 15.2.1-3) Log: ``` File "src/dune", lines 1-8, characters 0-162: 1 | (library 2 | (name bitstring) 3 | (public_name bitstring) 4 | (foreign_stubs 5 | (language c) 6 | (names bitstring_fastpath) 7 | (flags -I.)) 8 | (libraries str unix stdlib-shims)) /usr/bin/ld: src/bitstring_fastpath.o: relocation R_X86_64_32S against `.data' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: failed to set dynamic section sizes: bad value collect2: error: ld returned 1 exit status ``` --- src/dune | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dune b/src/dune index 782857a..87728e8 100644 --- a/src/dune +++ b/src/dune @@ -4,5 +4,5 @@ (foreign_stubs (language c) (names bitstring_fastpath) - (flags -I.)) + (flags :standard -I.)) (libraries str unix stdlib-shims))