summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorSébastien Hinderer <seb@tarides.com>2023-03-09 10:51:28 +0100
committerSébastien Hinderer <seb@tarides.com>2023-03-14 17:34:27 +0100
commit4b87f5b676314f14cfe4581db6f3623423205f14 (patch)
tree09b308bad719414f7cd9b4532c282df1170ca96c /Makefile
parentbcffd84a9b0e38a3ca02a1ffd2de54541f3bcb9f (diff)
downloadocaml-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--Makefile4
1 files changed, 1 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index 4ce297cfea..e2f0c1c8a2 100644
--- a/Makefile
+++ b/Makefile
@@ -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