You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/dev-lang/ocaml/files/ocaml-4.09.0-cflags.patch

66 lines
2.2 KiB

--- a/runtime/Makefile
+++ b/runtime/Makefile
@@ -335,7 +335,7 @@
# (without the extension, which is added by the macro)
define COMPILE_C_FILE
$(1).$(O): %.c
- $$(CC) -c $$(OC_CFLAGS) $$(OC_CPPFLAGS) $$(OUTPUTOBJ)$$@ $$<
+ $$(CC) -c $$(OC_CFLAGS) $(CFLAGS) $$(OC_CPPFLAGS) $$(OUTPUTOBJ)$$@ $$<
endef
object_types := % %_b %_bd %_bi %_bpic %_n %_nd %_ni %_np %_npic
--- a/yacc/Makefile
+++ b/yacc/Makefile
@@ -63,4 +63,4 @@
# also works for .obj files.
%.$(O): %.c
- $(CC) -c $(OC_CFLAGS) $(OC_CPPFLAGS) $(OUTPUTOBJ)$@ $<
+ $(CC) -c $(OC_CFLAGS) $(CFLAGS) $(OC_CPPFLAGS) $(OUTPUTOBJ)$@ $<
--- a/otherlibs/Makefile.otherlibs.common
+++ b/otherlibs/Makefile.otherlibs.common
@@ -138,4 +138,4 @@
$(CAMLOPT) -c $(COMPFLAGS) $(OPTCOMPFLAGS) $<
.c.$(O):
- $(CC) -c $(OC_CFLAGS) $(OC_CPPFLAGS) $(OUTPUTOBJ)$@ $<
+ $(CC) -c $(OC_CFLAGS) $(CFLAGS) $(OC_CPPFLAGS) $(OUTPUTOBJ)$@ $<
--- a/ocamltest/Makefile
+++ b/ocamltest/Makefile
@@ -221,7 +221,7 @@
$(ocamllex) -q $<
%.$(O): %.c
- $(CC) $(OC_CFLAGS) $(OC_CPPFLAGS) -c $<
+ $(CC) $(OC_CFLAGS) $(CFLAGS) $(OC_CPPFLAGS) -c $<
ocamltest_config.ml: ocamltest_config.ml.in Makefile ../Makefile.config
sed \
--- a/otherlibs/systhreads/Makefile
+++ b/otherlibs/systhreads/Makefile
@@ -93,11 +93,11 @@
# twice, each time with different options).
st_stubs_b.$(O): st_stubs.c $(HEADER)
- $(CC) -c $(OC_CFLAGS) $(OC_CPPFLAGS) -I$(ROOTDIR)/runtime \
+ $(CC) -c $(OC_CFLAGS) $(CFLAGS) $(OC_CPPFLAGS) -I$(ROOTDIR)/runtime \
$(SHAREDLIB_CFLAGS) $(OUTPUTOBJ)$@ $<
st_stubs_n.$(O): st_stubs.c $(HEADER)
- $(CC) $(OC_CFLAGS) $(OC_CPPFLAGS) \
+ $(CC) $(OC_CFLAGS) $(CFLAGS) $(OC_CPPFLAGS) \
-I$(ROOTDIR)/runtime $(SHAREDLIB_CFLAGS) -DNATIVE_CODE \
-DTARGET_$(ARCH) -DMODEL_$(MODEL) -DSYS_$(SYSTEM) \
$(OUTPUTOBJ)$@ -c $<
--- a/tools/Makefile
+++ b/tools/Makefile
@@ -322,7 +322,7 @@
endif
objinfo_helper$(EXE): objinfo_helper.c $(ROOTDIR)/runtime/caml/s.h
- $(CC) $(OC_CFLAGS) $(OC_CPPFLAGS) -I$(ROOTDIR)/runtime $(OUTPUTEXE)$@ \
+ $(CC) $(OC_CFLAGS) $(CFLAGS) $(OC_CPPFLAGS) -I$(ROOTDIR)/runtime $(OUTPUTEXE)$@ \
$(DEF_SYMBOL_PREFIX) $(LIBBFD_INCLUDE) $< $(LIBBFD_LINK)
OBJINFO=$(ROOTDIR)/compilerlibs/ocamlcommon.cma \