diff options
author | Sébastien Hinderer <seb@tarides.com> | 2023-03-09 10:51:28 +0100 |
---|---|---|
committer | Sébastien Hinderer <seb@tarides.com> | 2023-03-14 17:34:27 +0100 |
commit | 4b87f5b676314f14cfe4581db6f3623423205f14 (patch) | |
tree | 09b308bad719414f7cd9b4532c282df1170ca96c /Makefile | |
parent | bcffd84a9b0e38a3ca02a1ffd2de54541f3bcb9f (diff) | |
download | ocaml-4b87f5b676314f14cfe4581db6f3623423205f14.tar.gz |
Build system: do not use SHAREDLIB_CFLAGS when computing dependencies
This commit contains two changes to the root Makefile:
1. Removal of the following line:
$(DEPDIR)/runtime/%.bpic.$(D): OC_CFLAGS += $(SHAREDLIB_CFLAGS)
This line is useless because it makes no sense to alter any variable
in the CFLAGS category for the computation of dependencies, since only
the C preprocessor is involved in this stage and it does not take
C flags into account anyway, only C preprocessor flags.
2. When computing the dependencies for $(DEPDIR)/runtime/%.npic.$(D),
one should not refer to $(SHAREDLIB_CFLAGS), for a similar reason.
It has been verified that SHAREDLIB_CFLAGS is either empty, or contains
just -fPIC which is indeed not necessary for computing dependencies
(it is indeed a C flag rather than a C preprocessor flag).
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 4 |
1 files changed, 1 insertions, 3 deletions
@@ -912,7 +912,6 @@ runtime/%.bi.$(O): OC_CPPFLAGS += $(ocamlruni_CPPFLAGS) $(DEPDIR)/runtime/%.bi.$(D): OC_CPPFLAGS += $(ocamlruni_CPPFLAGS) runtime/%.bpic.$(O): OC_CFLAGS += $(SHAREDLIB_CFLAGS) -$(DEPDIR)/runtime/%.bpic.$(D): OC_CFLAGS += $(SHAREDLIB_CFLAGS) runtime/%.n.$(O): OC_CPPFLAGS += $(OC_NATIVE_CPPFLAGS) $(DEPDIR)/runtime/%.n.$(D): OC_CPPFLAGS += $(OC_NATIVE_CPPFLAGS) @@ -926,8 +925,7 @@ $(DEPDIR)/runtime/%.ni.$(D): \ OC_CPPFLAGS += $(OC_NATIVE_CPPFLAGS) $(ocamlruni_CPPFLAGS) runtime/%.npic.$(O): OC_CFLAGS += $(OC_NATIVE_CPPFLAGS) $(SHAREDLIB_CFLAGS) -$(DEPDIR)/runtime/%.npic.$(D): \ - OC_CPPFLAGS += $(OC_NATIVE_CPPFLAGS) $(SHAREDLIB_CFLAGS) +$(DEPDIR)/runtime/%.npic.$(D): OC_CPPFLAGS += $(OC_NATIVE_CPPFLAGS) ## Compilation of runtime C files |