[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH] tools/ocaml/Makefile.rules: use correct C flags when compiling OCaml C stubs
> On 25 Oct 2023, at 14:52, Edwin Török <edvin.torok@xxxxxxxxxx> wrote: > > From: Edwin Török <edwin.torok@xxxxxxxxx> > > The code currently uses GCC to compile OCaml C stubs directly, > and although in most cases this works, it is not entirely correct. > > This will fail if the OCaml runtime has been recompiled to use and link with > ASAN for example > (or other situations where a flag needs to be used consistently in everything > that is linked into the same binary). > > Use the OCaml compiler instead, which knows how to invoke the correct C > compiler with the correct flags, > and append the Xen specific CFLAGS to that instead. > > Drop the explicit -fPIC and -I$(ocamlc -where): these will now be provided by > the compiler as needed. > > Use -verbose so we see the actuall full C compiler command line invocation > done by the OCaml compiler. > > Signed-off-by: Edwin Török <edwin.torok@xxxxxxxxx> Acked-by: Christian Lindig <christian.lindig@xxxxxxxxx> I like using the OCaml compiler to compile stubs as it knows how to handle C files and will invoke the C compiler with the correct flags. However, this is the kind of change that would be good to have tested on all supported platforms. I therefore invite comments from those who maintain the build process. — C
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |