Hi, Le 08/02/2023 à 10:58, Emilio Pozuelo Monfort a écrit :
What is the purpose of having the build flags in a file in the .deb?
ocamlc can act as a driver for the C compiler, to compile C stubs with the "right" flags. These flags are basically the CFLAGS ocaml was compiled with, plus some additional OCaml-specific flags (like -fwrapv).
But I wonder now: shouldn't the CFLAGS part be queried from the environment at use time, rather than at OCaml compilation time? This setting of a non-C compiler calling a C compiler must happen often... I don't know what's the practice elsewhere.
If I push the reasoning to the extreme, why doesn't gcc take into account CFLAGS itself?
Cheers, -- Stéphane