]>
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 | ||
27676bd0 JB |
9 | --- ocaml-4.02.2/asmrun/Makefile.orig 2015-06-28 13:45:16.203456490 +0200 |
10 | +++ ocaml-4.02.2/asmrun/Makefile 2015-06-28 15:07:59.556581531 +0200 | |
fa136354 JR |
11 | @@ -16,11 +16,11 @@ |
12 | -DTARGET_$(ARCH) -DMODEL_$(MODEL) -DSYS_$(SYSTEM) $(IFLEXDIR) \ | |
13 | $(LIBUNWIND_INCLUDE_FLAGS) | |
14 | #CFLAGS=$(FLAGS) -g -O0 | |
15 | -CFLAGS=$(FLAGS) -g -O0 $(NATIVECCCOMPOPTS) | |
04508f14 | 16 | +override CFLAGS += $(FLAGS) $(NATIVECCCOMPOPTS) |
17 | DFLAGS=$(FLAGS) -g -DDEBUG $(NATIVECCCOMPOPTS) | |
fa136354 | 18 | IFLAGS=$(FLAGS) -DCAML_INSTR |
0af1a24b | 19 | PFLAGS=$(FLAGS) -pg -DPROFILING $(NATIVECCPROFOPTS) $(NATIVECCCOMPOPTS) |
fa136354 | 20 | -PICFLAGS=$(FLAGS) $(SHAREDCCCOMPOPTS) $(NATIVECCCOMPOPTS) |
27676bd0 | 21 | +PICFLAGS=$(FLAGS) $(CFLAGS) $(SHAREDCCCOMPOPTS) $(NATIVECCCOMPOPTS) |
04508f14 | 22 | |
fa136354 JR |
23 | COBJS=startup_aux.o startup.o \ |
24 | main.o fail.o roots.o globroots.o signals.o signals_asm.o \ | |
e091ab7c JB |
25 | --- ocaml-4.02.1/asmrun/Makefile.nt.orig 2014-11-06 21:32:19.358167666 +0100 |
26 | +++ ocaml-4.02.1/asmrun/Makefile.nt 2014-11-07 16:19:43.681995569 +0100 | |
27 | @@ -14,7 +14,7 @@ | |
04508f14 | 28 | include ../config/Makefile |
29 | ||
30 | CC=$(NATIVECC) | |
e091ab7c JB |
31 | -CFLAGS=-I../byterun -DNATIVE_CODE -DTARGET_$(ARCH) -DSYS_$(SYSTEM) \ |
32 | +override CFLAGS += -I../byterun -DNATIVE_CODE -DTARGET_$(ARCH) -DSYS_$(SYSTEM) \ | |
33 | $(NATIVECCCOMPOPTS) | |
04508f14 | 34 | |
e091ab7c | 35 | COBJS=startup.$(O) main.$(O) fail.$(O) roots.$(O) signals.$(O) signals_asm.$(O)\ |
27676bd0 JB |
36 | --- ocaml-4.02.2/byterun/Makefile.orig 2015-06-28 13:45:16.206789823 +0200 |
37 | +++ ocaml-4.02.2/byterun/Makefile 2015-06-28 15:08:35.076580040 +0200 | |
38 | @@ -13,7 +13,7 @@ | |
04508f14 | 39 | |
31cbf6d8 JR |
40 | include Makefile.common |
41 | ||
27676bd0 | 42 | -CFLAGS=-DCAML_NAME_SPACE $(BYTECCCOMPOPTS) $(IFLEXDIR) |
31cbf6d8 | 43 | +override CFLAGS += -DCAML_NAME_SPACE $(BYTECCCOMPOPTS) $(IFLEXDIR) |
9de25172 | 44 | DFLAGS=-DCAML_NAME_SPACE -g -DDEBUG $(BYTECCCOMPOPTS) $(IFLEXDIR) |
04508f14 | 45 | |
27676bd0 | 46 | OBJS=$(COMMONOBJS) $(UNIX_OR_WIN32).o main.o |
31cbf6d8 JR |
47 | diff -ur ocaml-3.11.0/byterun/Makefile.nt ocaml-3.11.0.CFLAGS/byterun/Makefile.nt |
48 | --- ocaml-3.11.0/byterun/Makefile.nt 2008-11-26 14:26:53.000000000 +0100 | |
49 | +++ ocaml-3.11.0.CFLAGS/byterun/Makefile.nt 2009-02-16 12:18:01.215883365 +0100 | |
50 | @@ -15,7 +15,7 @@ | |
04508f14 | 51 | |
31cbf6d8 | 52 | include Makefile.common |
04508f14 | 53 | |
31cbf6d8 JR |
54 | -CFLAGS=-DOCAML_STDLIB_DIR='"$(LIBDIR)"' $(IFLEXDIR) |
55 | +override CFLAGS += -DOCAML_STDLIB_DIR='"$(LIBDIR)"' $(IFLEXDIR) | |
fa136354 | 56 | DFLAGS=$(CFLAGS) -DDEBUG |
04508f14 | 57 | |
31cbf6d8 | 58 | DBGO=d.$(O) |
27676bd0 JB |
59 | --- ocaml-4.02.2/otherlibs/Makefile.orig 2015-06-28 13:45:16.210123156 +0200 |
60 | +++ ocaml-4.02.2/otherlibs/Makefile 2015-06-28 15:09:02.573245553 +0200 | |
e091ab7c | 61 | @@ -16,7 +16,7 @@ |
27676bd0 JB |
62 | CAMLC=$(CAMLRUN) $(ROOTDIR)/ocamlc -nostdlib -I $(ROOTDIR)/stdlib |
63 | CAMLOPT=$(CAMLRUN) $(ROOTDIR)/ocamlopt -nostdlib \ | |
e091ab7c | 64 | -I $(ROOTDIR)/stdlib |
27676bd0 JB |
65 | -CFLAGS=-I$(ROOTDIR)/byterun $(SHAREDCCCOMPOPTS) $(EXTRACFLAGS) |
66 | +override CFLAGS += -I$(ROOTDIR)/byterun $(SHAREDCCCOMPOPTS) $(EXTRACFLAGS) | |
04508f14 | 67 | |
31cbf6d8 JR |
68 | include ../Makefile.shared |
69 | # Note .. is the current directory (this makefile is included from | |
27676bd0 JB |
70 | --- ocaml-4.02.2/otherlibs/systhreads/Makefile.orig 2015-06-28 13:45:16.213456489 +0200 |
71 | +++ ocaml-4.02.2/otherlibs/systhreads/Makefile 2015-06-28 15:09:59.356576505 +0200 | |
72 | @@ -36,7 +36,7 @@ | |
e091ab7c | 73 | $(MKLIB) -o threads $(BYTECODE_C_OBJS) $(PTHREAD_LINK) |
04508f14 | 74 | |
9de25172 | 75 | st_stubs_b.o: st_stubs.c st_posix.h |
27676bd0 | 76 | - $(BYTECC) -I../../byterun $(BYTECCCOMPOPTS) $(SHAREDCCCOMPOPTS) \ |
04508f14 | 77 | + $(BYTECC) $(CFLAGS) -I../../byterun $(BYTECCCOMPOPTS) $(SHAREDCCCOMPOPTS) \ |
9de25172 JB |
78 | -c st_stubs.c |
79 | mv st_stubs.o st_stubs_b.o | |
04508f14 | 80 | |
27676bd0 | 81 | @@ -46,7 +46,7 @@ |
04508f14 | 82 | $(AR) rc libthreadsnat.a $(NATIVECODE_C_OBJS) |
83 | ||
9de25172 | 84 | st_stubs_n.o: st_stubs.c st_posix.h |
27676bd0 | 85 | - $(NATIVECC) -I../../asmrun -I../../byterun $(NATIVECCCOMPOPTS) \ |
e091ab7c JB |
86 | + $(NATIVECC) $(CFLAGS) -I../../asmrun -I../../byterun $(NATIVECCCOMPOPTS) \ |
87 | $(SHAREDCCCOMPOPTS) -DNATIVE_CODE -DTARGET_$(ARCH) \ | |
88 | -DSYS_$(SYSTEM) -c st_stubs.c | |
9de25172 | 89 | mv st_stubs.o st_stubs_n.o |
27676bd0 JB |
90 | --- ocaml-4.02.2/otherlibs/systhreads/Makefile.nt.orig 2015-06-28 13:45:16.216789823 +0200 |
91 | +++ ocaml-4.02.2/otherlibs/systhreads/Makefile.nt 2015-06-28 15:10:34.866575013 +0200 | |
31cbf6d8 | 92 | @@ -20,7 +20,7 @@ |
27676bd0 JB |
93 | CAMLOPT=$(CAMLRUN) ../../ocamlopt -I ../../stdlib -I ../win32unix |
94 | COMPFLAGS=-w +33 -warn-error A -g | |
95 | MKLIB=$(CAMLRUN) ../../tools/ocamlmklib | |
31cbf6d8 JR |
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) | |
27676bd0 JB |
101 | --- ocaml-4.02.2/otherlibs/threads/Makefile.orig 2015-06-28 13:45:16.220123156 +0200 |
102 | +++ ocaml-4.02.2/otherlibs/threads/Makefile 2015-06-28 15:11:03.843240464 +0200 | |
103 | @@ -18,7 +18,7 @@ | |
104 | CAMLYACC ?= ../../boot/ocamlyacc | |
04508f14 | 105 | |
106 | CC=$(BYTECC) | |
27676bd0 JB |
107 | -CFLAGS=-I../../byterun $(BYTECCCOMPOPTS) $(SHAREDCCCOMPOPTS) -g |
108 | +override CFLAGS += -I../../byterun $(BYTECCCOMPOPTS) $(SHAREDCCCOMPOPTS) -g | |
e091ab7c | 109 | ROOTDIR=../.. |
27676bd0 | 110 | CAMLC=$(CAMLRUN) $(ROOTDIR)/ocamlc -nostdlib \ |
e091ab7c | 111 | -I $(ROOTDIR)/stdlib -I $(ROOTDIR)/otherlibs/unix |
27676bd0 JB |
112 | --- ocaml-4.02.2/yacc/Makefile.orig 2015-06-28 13:45:16.220123156 +0200 |
113 | +++ ocaml-4.02.2/yacc/Makefile 2015-06-28 15:11:25.473239557 +0200 | |
114 | @@ -15,7 +15,7 @@ | |
04508f14 | 115 | include ../config/Makefile |
116 | ||
117 | CC=$(BYTECC) | |
27676bd0 | 118 | -CFLAGS=-DNDEBUG $(BYTECCCOMPOPTS) |
04508f14 | 119 | +override CFLAGS += -DNDEBUG $(BYTECCCOMPOPTS) |
120 | ||
121 | OBJS= closure.o error.o lalr.o lr0.o main.o mkpar.o output.o reader.o \ | |
122 | skeleton.o symtab.o verbose.o warshall.o |