]>
Commit | Line | Data |
---|---|---|
9de25172 | 1 | # allow pass CFLAGS, replace -O, -pg,-DPROFILING with $(CFLAGS) |
04508f14 | 2 | Makefiles=$(find . -type f -name Makefile\*) |
3 | %{__sed} -i -e 's@^CFLAGS[ \t]*=@override CFLAGS += @' $Makefiles | |
4 | %{__sed} -i -e 's@\(^override CFLAGS += .*\)-O \(.*\)@\1\2@' $Makefiles | |
5 | %{__sed} -i -e 's@^CCFLAGS[ \t]*=\(.*\)@override CCFLAGS += \1 $(CFLAGS)@' $Makefiles | |
6 | %{__sed} -i -e 's@-pg -O -DPROFILING@ $(CFLAGS) @' asmrun/Makefile | |
7 | %{__sed} -i -e 's@-O@$(CFLAGS)@' otherlibs/systhreads/Makefile | |
8 | ||
31cbf6d8 JR |
9 | diff -ur ocaml-3.11.0/asmrun/Makefile ocaml-3.11.0.CFLAGS/asmrun/Makefile |
10 | --- ocaml-3.11.0/asmrun/Makefile 2007-11-15 14:21:15.000000000 +0100 | |
11 | +++ ocaml-3.11.0.CFLAGS/asmrun/Makefile 2009-02-16 12:18:06.599221049 +0100 | |
04508f14 | 12 | @@ -18,9 +18,9 @@ |
13 | CC=$(NATIVECC) | |
14 | FLAGS=-I../byterun -DCAML_NAME_SPACE -DNATIVE_CODE \ | |
31cbf6d8 | 15 | -DTARGET_$(ARCH) -DSYS_$(SYSTEM) $(IFLEXDIR) |
04508f14 | 16 | -CFLAGS=$(FLAGS) -O $(NATIVECCCOMPOPTS) |
17 | +override CFLAGS += $(FLAGS) $(NATIVECCCOMPOPTS) | |
18 | DFLAGS=$(FLAGS) -g -DDEBUG $(NATIVECCCOMPOPTS) | |
19 | -PFLAGS=$(FLAGS) -pg -O -DPROFILING $(NATIVECCPROFOPTS) | |
20 | +PFLAGS=$(FLAGS) $(CFLAGS) $(NATIVECCPROFOPTS) | |
21 | ||
31cbf6d8 | 22 | COBJS=startup.o main.o fail.o roots.o globroots.o signals.o signals_asm.o \ |
04508f14 | 23 | misc.o freelist.o major_gc.o minor_gc.o memory.o alloc.o compare.o ints.o \ |
e091ab7c JB |
24 | --- ocaml-4.02.1/asmrun/Makefile.nt.orig 2014-11-06 21:32:19.358167666 +0100 |
25 | +++ ocaml-4.02.1/asmrun/Makefile.nt 2014-11-07 16:19:43.681995569 +0100 | |
26 | @@ -14,7 +14,7 @@ | |
04508f14 | 27 | include ../config/Makefile |
28 | ||
29 | CC=$(NATIVECC) | |
e091ab7c JB |
30 | -CFLAGS=-I../byterun -DNATIVE_CODE -DTARGET_$(ARCH) -DSYS_$(SYSTEM) \ |
31 | +override CFLAGS += -I../byterun -DNATIVE_CODE -DTARGET_$(ARCH) -DSYS_$(SYSTEM) \ | |
32 | $(NATIVECCCOMPOPTS) | |
04508f14 | 33 | |
e091ab7c | 34 | COBJS=startup.$(O) main.$(O) fail.$(O) roots.$(O) signals.$(O) signals_asm.$(O)\ |
9de25172 JB |
35 | --- ocaml-3.12.0/byterun/Makefile 2008-11-08 17:29:02.000000000 +0100 |
36 | +++ ocaml-3.12.0.CFLAGS/byterun/Makefile 2009-02-16 12:18:01.212550815 +0100 | |
31cbf6d8 | 37 | @@ -15,7 +15,7 @@ |
04508f14 | 38 | |
31cbf6d8 JR |
39 | include Makefile.common |
40 | ||
41 | -CFLAGS=-DCAML_NAME_SPACE -O $(BYTECCCOMPOPTS) $(IFLEXDIR) | |
42 | +override CFLAGS += -DCAML_NAME_SPACE $(BYTECCCOMPOPTS) $(IFLEXDIR) | |
9de25172 | 43 | DFLAGS=-DCAML_NAME_SPACE -g -DDEBUG $(BYTECCCOMPOPTS) $(IFLEXDIR) |
04508f14 | 44 | |
31cbf6d8 JR |
45 | OBJS=$(COMMONOBJS) unix.o main.o |
46 | diff -ur ocaml-3.11.0/byterun/Makefile.nt ocaml-3.11.0.CFLAGS/byterun/Makefile.nt | |
47 | --- ocaml-3.11.0/byterun/Makefile.nt 2008-11-26 14:26:53.000000000 +0100 | |
48 | +++ ocaml-3.11.0.CFLAGS/byterun/Makefile.nt 2009-02-16 12:18:01.215883365 +0100 | |
49 | @@ -15,7 +15,7 @@ | |
04508f14 | 50 | |
31cbf6d8 | 51 | include Makefile.common |
04508f14 | 52 | |
31cbf6d8 JR |
53 | -CFLAGS=-DOCAML_STDLIB_DIR='"$(LIBDIR)"' $(IFLEXDIR) |
54 | +override CFLAGS += -DOCAML_STDLIB_DIR='"$(LIBDIR)"' $(IFLEXDIR) | |
04508f14 | 55 | |
31cbf6d8 JR |
56 | DBGO=d.$(O) |
57 | OBJS=$(COMMONOBJS:.o=.$(O)) win32.$(O) main.$(O) | |
e091ab7c JB |
58 | --- ocaml-4.02.1/otherlibs/Makefile.orig 2014-11-06 21:32:19.361500999 +0100 |
59 | +++ ocaml-4.02.1/otherlibs/Makefile 2014-11-07 16:20:23.921993882 +0100 | |
60 | @@ -16,7 +16,7 @@ | |
61 | CAMLC=$(ROOTDIR)/boot/ocamlrun $(ROOTDIR)/ocamlc -nostdlib -I $(ROOTDIR)/stdlib | |
62 | CAMLOPT=$(ROOTDIR)/boot/ocamlrun $(ROOTDIR)/ocamlopt -nostdlib \ | |
63 | -I $(ROOTDIR)/stdlib | |
31cbf6d8 | 64 | -CFLAGS=-I$(ROOTDIR)/byterun -O $(SHAREDCCCOMPOPTS) $(EXTRACFLAGS) |
e091ab7c | 65 | +override CFLAGS += -I$(ROOTDIR)/byterun -O $(SHAREDCCCOMPOPTS) $(EXTRACFLAGS) |
04508f14 | 66 | |
31cbf6d8 JR |
67 | include ../Makefile.shared |
68 | # Note .. is the current directory (this makefile is included from | |
e091ab7c JB |
69 | --- ocaml-4.02.1/otherlibs/systhreads/Makefile.orig 2014-10-03 14:25:00.000000000 +0200 |
70 | +++ ocaml-4.02.1/otherlibs/systhreads/Makefile 2014-11-07 16:21:22.471991426 +0100 | |
71 | @@ -34,7 +34,7 @@ | |
72 | $(MKLIB) -o threads $(BYTECODE_C_OBJS) $(PTHREAD_LINK) | |
04508f14 | 73 | |
9de25172 | 74 | st_stubs_b.o: st_stubs.c st_posix.h |
04508f14 | 75 | - $(BYTECC) -O -I../../byterun $(BYTECCCOMPOPTS) $(SHAREDCCCOMPOPTS) \ |
76 | + $(BYTECC) $(CFLAGS) -I../../byterun $(BYTECCCOMPOPTS) $(SHAREDCCCOMPOPTS) \ | |
9de25172 JB |
77 | -c st_stubs.c |
78 | mv st_stubs.o st_stubs_b.o | |
04508f14 | 79 | |
e091ab7c | 80 | @@ -44,7 +44,7 @@ |
04508f14 | 81 | $(AR) rc libthreadsnat.a $(NATIVECODE_C_OBJS) |
82 | ||
9de25172 | 83 | st_stubs_n.o: st_stubs.c st_posix.h |
e091ab7c JB |
84 | - $(NATIVECC) -O -I../../asmrun -I../../byterun $(NATIVECCCOMPOPTS) \ |
85 | + $(NATIVECC) $(CFLAGS) -I../../asmrun -I../../byterun $(NATIVECCCOMPOPTS) \ | |
86 | $(SHAREDCCCOMPOPTS) -DNATIVE_CODE -DTARGET_$(ARCH) \ | |
87 | -DSYS_$(SYSTEM) -c st_stubs.c | |
9de25172 | 88 | mv st_stubs.o st_stubs_n.o |
31cbf6d8 JR |
89 | diff -ur ocaml-3.11.0/otherlibs/systhreads/Makefile.nt ocaml-3.11.0.CFLAGS/otherlibs/systhreads/Makefile.nt |
90 | --- ocaml-3.11.0/otherlibs/systhreads/Makefile.nt 2007-11-06 16:16:56.000000000 +0100 | |
91 | +++ ocaml-3.11.0.CFLAGS/otherlibs/systhreads/Makefile.nt 2009-02-16 12:18:01.285892127 +0100 | |
92 | @@ -20,7 +20,7 @@ | |
93 | CAMLOPT=../../boot/ocamlrun ../../ocamlopt -I ../../stdlib -I ../win32unix | |
94 | COMPFLAGS=-warn-error A -g | |
95 | MKLIB=../../boot/ocamlrun ../../tools/ocamlmklib | |
96 | -CFLAGS=-I../../byterun $(EXTRACFLAGS) | |
97 | +override CFLAGS += -I../../byterun $(EXTRACFLAGS) | |
98 | ||
99 | CAMLOBJS=thread.cmo mutex.cmo condition.cmo event.cmo threadUnix.cmo | |
100 | CMIFILES=$(CAMLOBJS:.cmo=.cmi) | |
e091ab7c JB |
101 | --- ocaml-4.02.1/otherlibs/threads/Makefile.orig 2014-11-06 21:32:19.381500998 +0100 |
102 | +++ ocaml-4.02.1/otherlibs/threads/Makefile 2014-11-07 16:21:47.581990371 +0100 | |
103 | @@ -14,7 +14,7 @@ | |
04508f14 | 104 | include ../../config/Makefile |
105 | ||
106 | CC=$(BYTECC) | |
107 | -CFLAGS=-I../../byterun -O $(BYTECCCOMPOPTS) $(SHAREDCCCOMPOPTS) -g | |
e091ab7c JB |
108 | +override CFLAGS += -I../../byterun -O $(BYTECCCOMPOPTS) $(SHAREDCCCOMPOPTS) -g |
109 | ROOTDIR=../.. | |
110 | CAMLC=$(ROOTDIR)/boot/ocamlrun $(ROOTDIR)/ocamlc -nostdlib \ | |
111 | -I $(ROOTDIR)/stdlib -I $(ROOTDIR)/otherlibs/unix | |
31cbf6d8 JR |
112 | diff -ur ocaml-3.11.0/yacc/Makefile ocaml-3.11.0.CFLAGS/yacc/Makefile |
113 | --- ocaml-3.11.0/yacc/Makefile 2007-02-07 15:49:42.000000000 +0100 | |
114 | +++ ocaml-3.11.0.CFLAGS/yacc/Makefile 2009-02-16 12:18:01.289259949 +0100 | |
04508f14 | 115 | @@ -17,7 +17,7 @@ |
116 | include ../config/Makefile | |
117 | ||
118 | CC=$(BYTECC) | |
119 | -CFLAGS=-O -DNDEBUG $(BYTECCCOMPOPTS) | |
120 | +override CFLAGS += -DNDEBUG $(BYTECCCOMPOPTS) | |
121 | ||
122 | OBJS= closure.o error.o lalr.o lr0.o main.o mkpar.o output.o reader.o \ | |
123 | skeleton.o symtab.o verbose.o warshall.o |