]> git.pld-linux.org Git - packages/ocaml.git/commitdiff
- patches
authorArkadiusz Miśkiewicz <arekm@maven.pl>
Mon, 27 Mar 2000 15:51:05 +0000 (15:51 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    ocaml-ext_prof.patch -> 1.1
    ocaml-opt.patch -> 1.1

ocaml-ext_prof.patch [new file with mode: 0644]
ocaml-opt.patch [new file with mode: 0644]

diff --git a/ocaml-ext_prof.patch b/ocaml-ext_prof.patch
new file mode 100644 (file)
index 0000000..161506f
--- /dev/null
@@ -0,0 +1,601 @@
+--- utils/config.mlp.orig      Mon Aug 17 05:00:36 1998
++++ utils/config.mlp   Thu Sep 10 19:11:08 1998
+@@ -49,3 +49,4 @@
+ let ext_obj = "%%EXT_OBJ%%"
+ let ext_asm = "%%EXT_ASM%%"
+ let ext_lib = "%%EXT_LIB%%"
++let ext_prof = "%%EXT_PROF%%"
+--- utils/config.mli.orig      Wed May 27 10:10:13 1998
++++ utils/config.mli   Thu Sep 10 19:14:58 1998
+@@ -73,3 +73,9 @@
+         (* Extension for assembler files, e.g. [.s] under Unix. *)
+ val ext_lib: string
+         (* Extension for library files, e.g. [.a] under Unix. *)
++val ext_prof: string
++        (* [.p] For OSs that support gprof call graph profiling:
++         * an extra extension for obj/asm/lib files. 
++         * The full extension would be created by adding both ext_prof
++         * and corresponding ext_obj/asm/lib extension, e.g.
++         * profiled version of name.a would be named name.p.a *)
+--- asmcomp/asmgen.ml.orig     Mon Apr 27 11:16:44 1998
++++ asmcomp/asmgen.ml  Thu Sep 10 19:23:26 1998
+@@ -82,6 +82,8 @@
+   | Cdata dl -> Emit.data dl
+ let compile_implementation prefixname (size, lam) =
++  let ext_asm = if !Clflags.gprofile then ext_prof ^ ext_asm else ext_asm in
++  let ext_obj = if !Clflags.gprofile then ext_prof ^ ext_obj else ext_obj in
+   let asmfile =
+     if !keep_asm_file
+     then prefixname ^ ext_asm
+--- asmcomp/asmlibrarian.mli.orig      Tue Apr 30 10:42:09 1996
++++ asmcomp/asmlibrarian.mli   Thu Sep 10 20:08:16 1998
+@@ -11,6 +11,10 @@
+ (* $Id$ *)
++(* Get filename based on the gprofile flag *)
++
++val get_filename: string -> string -> string
++
+ (* Build libraries of .cmx files *)
+ val create_archive: string list -> string -> unit
+--- asmcomp/asmlink.ml.orig    Thu Aug  6 09:27:36 1998
++++ asmcomp/asmlink.ml Thu Sep 10 20:15:21 1998
+@@ -173,7 +173,7 @@
+ let call_linker file_list startup_file =
+   let libname =
+     if !Clflags.gprofile
+-    then "libasmrunp" ^ ext_lib
++    then "libasmrun" ^ ext_prof ^ ext_lib 
+     else "libasmrun" ^ ext_lib in
+   let runtime_lib =
+     try
+@@ -229,19 +229,18 @@
+     with Not_found ->
+       fatal_error "Asmlink.object_file_name: not found" in
+   if Filename.check_suffix file_name ".cmx" then
+-    Filename.chop_suffix file_name ".cmx" ^ ext_obj
++    Asmlibrarian.get_filename (Filename.chop_suffix file_name ".cmx") ext_obj
+   else if Filename.check_suffix file_name ".cmxa" then
+-    Filename.chop_suffix file_name ".cmxa" ^ ext_lib
++    Asmlibrarian.get_filename (Filename.chop_suffix file_name ".cmxa") ext_lib
+   else
+     fatal_error "Asmlink.object_file_name: bad ext"
+ (* Main entry point *)
+ let link objfiles =
+-  let objfiles =
+-    if !Clflags.gprofile
+-    then "stdlib.p.cmxa" :: (objfiles @ ["std_exit.p.cmx"])
+-    else "stdlib.cmxa" :: (objfiles @ ["std_exit.cmx"]) in
++  let ext_asm = if !Clflags.gprofile then ext_prof ^ ext_asm else ext_asm in
++  let ext_obj = if !Clflags.gprofile then ext_prof ^ ext_obj else ext_obj in
++  let objfiles = "stdlib.cmxa" :: (objfiles @ ["std_exit.cmx"]) in
+   let units_tolink = List.fold_right scan_file objfiles [] in
+   Array.iter remove_required Runtimedef.builtin_exceptions;
+   if not (StringSet.is_empty !missing_globals) then
+--- asmcomp/asmlibrarian.ml.orig       Thu Nov  7 05:55:00 1996
++++ asmcomp/asmlibrarian.ml    Thu Sep 10 21:10:52 1998
+@@ -23,6 +23,17 @@
+ exception Error of error
++let get_filename basename ext =
++  if !Clflags.gprofile then begin
++    let profname = basename ^ ext_prof ^ ext in
++    if Sys.file_exists profname then profname else
++    let unprofname = basename ^ ext in
++      print_string "Warning: Profiled file ";
++      print_string profname;
++      print_string " not found, using the unprofiled one. The gprof call graph timing information would be inaccurate.\n";
++      unprofname
++  end else basename ^ ext
++
+ let read_info name =
+   let filename =
+     try
+@@ -36,9 +47,10 @@
+      The linker, which is the only one that reads .cmxa files, does not
+      need the approximation. *)
+   info.ui_approx <- Clambda.Value_unknown;
+-  (Filename.chop_suffix filename ".cmx" ^ ext_obj, (info, crc))
++  (get_filename (Filename.chop_suffix filename ".cmx") ext_obj, (info, crc))
+ let create_archive file_list lib_name =
++  let ext_lib = if !Clflags.gprofile then ext_prof ^ ext_lib else ext_lib in
+   let archive_name = Filename.chop_suffix lib_name ".cmxa" ^ ext_lib in
+   let outchan = open_out_bin lib_name in
+   try
+--- otherlibs/db/Makefile.orig Mon Feb 23 07:42:22 1998
++++ otherlibs/db/Makefile      Thu Sep 10 21:33:18 1998
+@@ -22,6 +22,7 @@
+       $(CAMLC) -a -o db.cma db.cmo
+ db.cmxa: db.cmx
++      $(CAMLOPT) -p -a -o db.cmxa db.cmx
+       $(CAMLOPT) -a -o db.cmxa db.cmx
+ partialclean:
+@@ -36,7 +37,7 @@
+       cp db.cma db.cmi db.mli $(LIBDIR)
+ installopt:
+-      cp db.cmx db.cmxa db.a $(LIBDIR)
++      cp db.cmx db.cmxa db*.a $(LIBDIR)
+       cd $(LIBDIR); $(RANLIB) db.a
+ .SUFFIXES: .ml .mli .cmo .cmi .cmx
+@@ -48,6 +49,7 @@
+       $(CAMLC) -c $(COMPFLAGS) $<
+ .ml.cmx:
++      $(CAMLOPT) -p -c $(COMPFLAGS) $<
+       $(CAMLOPT) -c $(COMPFLAGS) $<
+ depend:
+--- otherlibs/dbm/Makefile.orig        Tue Apr 21 12:08:31 1998
++++ otherlibs/dbm/Makefile     Thu Sep 10 21:36:00 1998
+@@ -22,6 +22,7 @@
+       $(CAMLC) -a -o dbm.cma dbm.cmo
+ dbm.cmxa: dbm.cmx
++      $(CAMLOPT) -p -a -o dbm.cmxa dbm.cmx
+       $(CAMLOPT) -a -o dbm.cmxa dbm.cmx
+ partialclean:
+@@ -36,7 +37,7 @@
+       cp dbm.cma dbm.cmi dbm.mli $(LIBDIR)
+ installopt:
+-      cp dbm.cmx dbm.cmxa dbm.a $(LIBDIR)
++      cp dbm.cmx dbm.cmxa dbm*.a $(LIBDIR)
+       cd $(LIBDIR); $(RANLIB) dbm.a
+ .SUFFIXES: .ml .mli .cmo .cmi .cmx
+@@ -48,6 +49,7 @@
+       $(CAMLC) -c $(COMPFLAGS) $<
+ .ml.cmx:
++      $(CAMLOPT) -p -c $(COMPFLAGS) $<
+       $(CAMLOPT) -c $(COMPFLAGS) $<
+ depend:
+--- otherlibs/graph/Makefile.orig      Tue Apr 21 12:08:41 1998
++++ otherlibs/graph/Makefile   Thu Sep 10 21:38:44 1998
+@@ -24,6 +24,7 @@
+       $(CAMLC) -a -o graphics.cma graphics.cmo
+ graphics.cmxa: graphics.cmx
++      $(CAMLOPT) -p -a -o graphics.cmxa graphics.cmx
+       $(CAMLOPT) -a -o graphics.cmxa graphics.cmx
+ partialclean:
+@@ -38,7 +39,7 @@
+       cp graphics.cm[ia] graphics.mli $(LIBDIR)
+ installopt:
+-      cp graphics.cmxa graphics.a $(LIBDIR)
++      cp graphics.cmxa graphics*.a $(LIBDIR)
+       cd $(LIBDIR); $(RANLIB) graphics.a
+ .SUFFIXES: .ml .mli .cmo .cmi .cmx
+@@ -48,6 +49,7 @@
+ .ml.cmo:
+       $(CAMLC) -c $<
+ .ml.cmx:
++      $(CAMLOPT) -p -c $(COMPFLAGS) $<
+       $(CAMLOPT) -c $(COMPFLAGS) $<
+ depend:
+--- otherlibs/num/Makefile.orig        Tue Apr 21 12:08:46 1998
++++ otherlibs/num/Makefile     Thu Sep 10 21:39:10 1998
+@@ -23,6 +23,7 @@
+       $(CAMLC) -a -o nums.cma $(CAMLOBJS)
+ nums.cmxa: $(CAMLOBJS:.cmo=.cmx)
++      $(CAMLOPT) -p -a -o nums.cmxa $(CAMLOBJS:.cmo=.cmx)
+       $(CAMLOPT) -a -o nums.cmxa $(CAMLOBJS:.cmo=.cmx)
+ libnums.a: bignum/libbignum.a $(COBJS)
+@@ -41,7 +42,7 @@
+       cp nums.cma $(CMIFILES) $(CMIFILES:.cmi=.mli) $(LIBDIR)
+ installopt:
+-      cp $(CAMLOBJS:.cmo=.cmx) nums.cmxa nums.a $(LIBDIR)
++      cp $(CAMLOBJS:.cmo=.cmx) nums.cmxa nums*.a $(LIBDIR)
+       cd $(LIBDIR); $(RANLIB) nums.a
+ partialclean:
+@@ -61,6 +62,7 @@
+       $(CAMLC) -c $(COMPFLAGS) $<
+ .ml.cmx:
++      $(CAMLOPT) -p -c $(COMPFLAGS) $<
+       $(CAMLOPT) -c $(COMPFLAGS) $<
+ nat_stubs.o: nat.h
+--- otherlibs/str/Makefile.orig        Tue Apr 21 12:08:52 1998
++++ otherlibs/str/Makefile     Thu Sep 10 21:39:47 1998
+@@ -23,6 +23,7 @@
+       $(CAMLC) -a -o str.cma str.cmo
+ str.cmxa: str.cmx
++      $(CAMLOPT) -p -a -o str.cmxa str.cmx
+       $(CAMLOPT) -a -o str.cmxa str.cmx
+ $(REGEXLIB)/regex.o: $(REGEXLIB)/regex.c $(REGEXLIB)/regex.h
+@@ -43,7 +44,7 @@
+       cp str.cma str.cmi str.mli $(LIBDIR)
+ installopt:
+-      cp str.cmx str.cmxa str.a $(LIBDIR)
++      cp str.cmx str.cmxa str*.a $(LIBDIR)
+       cd $(LIBDIR); $(RANLIB) str.a
+ .SUFFIXES: .ml .mli .cmo .cmi .cmx
+@@ -55,6 +56,7 @@
+       $(CAMLC) -c $(COMPFLAGS) $<
+ .ml.cmx:
++      $(CAMLOPT) -p -c $(COMPFLAGS) $<
+       $(CAMLOPT) -c $(COMPFLAGS) $<
+ depend:
+--- otherlibs/threads/Makefile.orig    Sat Aug  8 14:42:20 1998
++++ otherlibs/threads/Makefile Thu Sep 10 21:43:42 1998
+@@ -70,6 +70,7 @@
+       $(CAMLC) -c $(COMPFLAGS) $<
+ .ml.cmx:
++      $(CAMLOPT) -p -c $(COMPFLAGS) $<
+       $(CAMLOPT) -c $(COMPFLAGS) $<
+ depend:
+--- configure.orig     Thu Aug  6 10:25:22 1998
++++ configure  Fri Sep 11 15:37:38 1998
+@@ -724,6 +724,8 @@
+ echo "OTHERLIBRARIES=$otherlibraries" >> Makefile
+ echo "DEBUGGER=$debugger" >> Makefile
++echo "EXT_PROF=.p" >> Makefile
++
+ rm -f tst hasgot.c
+ rm -f ../m.h ../s.h ../Makefile
+ mv m.h s.h Makefile ..
+--- otherlibs/systhreads/Makefile.orig Sat Aug  8 14:42:21 1998
++++ otherlibs/systhreads/Makefile      Fri Sep 11 15:50:11 1998
+@@ -5,6 +5,7 @@
+ BYTECODE_C_OBJS=posix_b.o
+ NATIVECODE_C_OBJS=posix_n.o
++PNATIVECODE_C_OBJS=$(NATIVECODE_C_OBJS:.o=$(EXT_PROF).o)
+ THREAD_OBJS= thread.cmo mutex.cmo condition.cmo event.cmo threadUnix.cmo
+@@ -12,7 +13,7 @@
+ all: libthreads.a threads.cma
+-allopt: libthreadsnat.a threads.cmxa
++allopt: libthreadsnat.a libthreadsnat$(EXT_PROF).a threads.cmxa
+ libthreads.a: $(BYTECODE_C_OBJS)
+       rm -f libthreads.a
+@@ -26,14 +27,23 @@
+       rm -f libthreadsnat.a
+       ar rc libthreadsnat.a $(NATIVECODE_C_OBJS)
++libthreadsnat$(EXT_PROF).a: $(PNATIVECODE_C_OBJS)
++      rm -f libthreadsnat$(EXT_PROF).a
++      ar rc libthreadsnat$(EXT_PROF).a $(PNATIVECODE_C_OBJS)
++
+ posix_n.o: posix.c
+       $(NATIVECC) -O -I../../asmrun -I../../byterun $(NATIVECCCOMPOPTS) -DNATIVE_CODE -DTARGET_$(ARCH) -DSYS_$(SYSTEM) -c posix.c
+       mv posix.o posix_n.o
++posix_n$(EXT_PROF).o: posix.c
++      $(NATIVECC) -p -O -I../../asmrun -I../../byterun $(NATIVECCCOMPOPTS) -DNATIVE_CODE -DTARGET_$(ARCH) -DSYS_$(SYSTEM) -c posix.c
++      mv posix.o posix_n$(EXT_PROF).o
++
+ threads.cma: $(THREAD_OBJS)
+       $(CAMLC) -a -o threads.cma $(THREAD_OBJS)
+ threads.cmxa: $(THREAD_OBJS:.cmo=.cmx)
++      $(CAMLOPT) -p -a -o threads.cmxa $(THREAD_OBJS:.cmo=.cmx)
+       $(CAMLOPT) -a -o threads.cmxa $(THREAD_OBJS:.cmo=.cmx)
+ $(THREAD_OBJS:.cmo=.cmx): ../../ocamlopt
+@@ -56,7 +66,7 @@
+ installopt:
+-      cp libthreadsnat.a $(LIBDIR)/libthreadsnat.a
+-      cp $(THREAD_OBJS:.cmo=.cmx) threads.cmxa threads.a $(LIBDIR)/threads
++      cp libthreadsnat*.a $(LIBDIR)
++      cp $(THREAD_OBJS:.cmo=.cmx) threads.cmxa threads*.a $(LIBDIR)/threads
+ .SUFFIXES: .ml .mli .cmo .cmi .cmx
+@@ -67,6 +77,7 @@
+       $(CAMLC) -c $(COMPFLAGS) $<
+ .ml.cmx:
++      $(CAMLOPT) -p -c $(COMPFLAGS) $<
+       $(CAMLOPT) -c $(COMPFLAGS) $<
+ depend: $(GENFILES)
+--- otherlibs/unix/Makefile.orig       Sat Aug  8 12:53:16 1998
++++ otherlibs/unix/Makefile    Fri Sep 11 16:13:07 1998
+@@ -24,19 +24,27 @@
+   time.o times.o truncate.o umask.o unixsupport.o unlink.o \
+   utimes.o wait.o write.o
++POBJS=$(OBJS:.o=$(EXT_PROF).o)
++
+ all: libunix.a unix.cmi unix.cma
+-allopt: libunix.a unix.cmi unix.cmxa
++allopt: libunix.a libunix$(EXT_PROF).a unix.cmi unix.cmxa
+ libunix.a: $(OBJS)
+       rm -f libunix.a
+       ar rc libunix.a $(OBJS)
+       $(RANLIB) libunix.a
++libunix$(EXT_PROF).a: $(POBJS)
++      rm -f libunix$(EXT_PROF).a
++      ar rc libunix$(EXT_PROF).a $(POBJS)
++      $(RANLIB) libunix$(EXT_PROF).a
++
+ unix.cma: unix.cmo
+       $(CAMLC) -a -linkall -o unix.cma unix.cmo
+ unix.cmxa: unix.cmx
++      $(CAMLOPT) -p -a -linkall -o unix.cmxa unix.cmx
+       $(CAMLOPT) -a -linkall -o unix.cmxa unix.cmx
+ unix.cmx: ../../ocamlopt
+@@ -53,10 +61,11 @@
+       cp unix.cmi unix.cma unix.mli $(LIBDIR)
+ installopt:
+-      cp unix.cmx unix.cmxa unix.a $(LIBDIR)
+-      cd $(LIBDIR); $(RANLIB) unix.a
++      cp libunix?*.a $(LIBDIR)
++      cp unix.cmx unix.cmxa unix*.a $(LIBDIR)
++      cd $(LIBDIR); $(RANLIB) unix*.a
+-.SUFFIXES: .ml .mli .cmo .cmi .cmx
++.SUFFIXES: .ml .mli .cmo .cmi .cmx .c $(EXT_PROF).o
+ .mli.cmi:
+       $(CAMLC) -c $(COMPFLAGS) $<
+@@ -65,7 +74,11 @@
+       $(CAMLC) -c $(COMPFLAGS) $<
+ .ml.cmx:
++      $(CAMLOPT) -p -c $(COMPFLAGS) $<
+       $(CAMLOPT) -c $(COMPFLAGS) $<
++
++.c$(EXT_PROF).o:
++      $(CC) -c -p $(CFLAGS) $< -o $*$(EXT_PROF).o
+ depend:
+       gcc -MM $(CFLAGS) *.c > .depend
+--- Makefile.orig      Wed Nov 18 13:10:50 1998
++++ Makefile   Thu Dec 10 23:50:23 1998
+@@ -60,7 +60,7 @@
+   asmcomp/printlinear.cmo asmcomp/linearize.cmo \
+   asmcomp/schedgen.cmo asmcomp/scheduling.cmo \
+   asmcomp/emitaux.cmo asmcomp/emit.cmo asmcomp/asmgen.cmo \
+-  asmcomp/asmlink.cmo asmcomp/asmlibrarian.cmo
++  asmcomp/asmlibrarian.cmo asmcomp/asmlink.cmo
+ DRIVER=driver/errors.cmo driver/compile.cmo driver/main_args.cmo driver/main.cmo
+@@ -256,6 +256,7 @@
+             -e 's|%%EXT_OBJ%%|.o|' \
+             -e 's|%%EXT_ASM%%|.s|' \
+             -e 's|%%EXT_LIB%%|.a|' \
++            -e 's|%%EXT_PROF%%|$(EXT_PROF)|' \
+             utils/config.mlp > utils/config.ml
+       @chmod -w utils/config.ml
+@@ -425,6 +426,8 @@
+       cd asmrun; $(MAKE) all
+       if test -f stdlib/libasmrun.a; then :; else \
+           ln -s ../asmrun/libasmrun.a stdlib/libasmrun.a; fi
++      if test -f stdlib/libasmrun$(EXT_PROF).a; then :; else \
++          ln -s ../asmrun/libasmrun$(EXT_PROF).a stdlib/libasmrun$(EXT_PROF).a; fi
+ clean::
+       cd asmrun; $(MAKE) clean
+       rm -f stdlib/libasmrun.a
+--- asmrun/Makefile.orig       Wed Jan 27 05:52:54 1999
++++ asmrun/Makefile    Fri Mar  5 17:16:49 1999
+@@ -16,7 +16,7 @@
+ OBJS=$(COBJS) $(ASMOBJS)
+ DOBJS=$(COBJS:.o=.d.o) $(ASMOBJS)
+-POBJS=$(COBJS:.o=.p.o) $(ASMOBJS:.o=.p.o)
++POBJS=$(COBJS:.o=$(EXT_PROF).o) $(ASMOBJS:.o=$(EXT_PROF).o)
+ all: libasmrun.a all-$(PROFILING)
+@@ -32,12 +32,12 @@
+ all-noprof:
+-all-prof: libasmrunp.a
++all-prof: libasmrun$(EXT_PROF).a
+-libasmrunp.a: $(POBJS)
+-      rm -f libasmrunp.a
+-      ar rc libasmrunp.a $(POBJS)
+-      $(RANLIB) libasmrunp.a
++libasmrun$(EXT_PROF).a: $(POBJS)
++      rm -f libasmrun$(EXT_PROF).a
++      ar rc libasmrun$(EXT_PROF).a $(POBJS)
++      $(RANLIB) libasmrun$(EXT_PROF).a
+ install: install-default install-$(PROFILING)
+@@ -46,17 +46,17 @@
+       cd $(LIBDIR); $(RANLIB) libasmrun.a
+ install-noprof:
+-      rm -f $(LIBDIR)/libasmrunp.a; ln -s libasmrun.a $(LIBDIR)/libasmrunp.a
++      rm -f $(LIBDIR)/libasmrun$(EXT_PROF).a; ln -s libasmrun.a $(LIBDIR)/libasmrun$(EXT_PROF).a
+ install-prof:
+-      cp libasmrunp.a $(LIBDIR)/libasmrunp.a
+-      cd $(LIBDIR); $(RANLIB) libasmrunp.a
++      cp libasmrun$(EXT_PROF).a $(LIBDIR)/libasmrun$(EXT_PROF).a
++      cd $(LIBDIR); $(RANLIB) libasmrun$(EXT_PROF).a
+ power.o: power-$(SYSTEM).o
+       cp power-$(SYSTEM).o power.o
+-power.p.o: power-$(SYSTEM).o
+-      cp power-$(SYSTEM).o power.p.o
++power$(EXT_PROF).o: power-$(SYSTEM).o
++      cp power-$(SYSTEM).o power$(EXT_PROF).o
+ main.c: ../byterun/main.c
+       ln -s ../byterun/main.c main.c
+@@ -123,13 +123,13 @@
+ clean::
+       rm -f $(LINKEDFILES)
+-.SUFFIXES: .S .d.o .p.o
++.SUFFIXES: .S .d.o $(EXT_PROF).o
+ .S.o:
+       $(ASPP) $(ASPPFLAGS) -o $*.o $*.S
+-.S.p.o:
+-      $(ASPP) $(ASPPFLAGS) $(ASPPPROFFLAGS) -o $*.p.o $*.S
++.S$(EXT_PROF).o:
++      $(ASPP) $(ASPPFLAGS) $(ASPPPROFFLAGS) -o $*$(EXT_PROF).o $*.S
+ .c.d.o:
+       @ if test -f $*.o; then mv $*.o $*.f.o; else :; fi
+@@ -137,17 +137,17 @@
+       mv $*.o $*.d.o
+       @ if test -f $*.f.o; then mv $*.f.o $*.o; else :; fi
+-.c.p.o:
++.c$(EXT_PROF).o:
+       @ if test -f $*.o; then mv $*.o $*.f.o; else :; fi
+       $(CC) -c $(PFLAGS) $<
+-      mv $*.o $*.p.o
++      mv $*.o $*$(EXT_PROF).o
+       @ if test -f $*.f.o; then mv $*.f.o $*.o; else :; fi
+ .s.o:
+       $(ASPP) $(ASPPFLAGS) -o $*.o $*.s
+-.s.p.o:
+-      $(ASPP) $(ASPPFLAGS) $(ASPPPROFFLAGS) -o $*.p.o $*.s
++.s$(EXT_PROF).o:
++      $(ASPP) $(ASPPFLAGS) $(ASPPPROFFLAGS) -o $*$(EXT_PROF).o $*.s
+ clean::
+       rm -f *.o *.a *~
+@@ -155,7 +155,7 @@
+ depend: $(COBJS:.o=.c)
+       gcc -MM $(FLAGS) *.c > .depend
+       gcc -MM $(FLAGS) -DDEBUG *.c | sed -e 's/\.o/.d.o/' >> .depend
+-      gcc -MM $(FLAGS) -DDEBUG *.c | sed -e 's/\.o/.p.o/' >> .depend
++      gcc -MM $(FLAGS) -DDEBUG *.c | sed -e 's/\.o/$(EXT_PROF).o/' >> .depend
+ include .depend
+--- stdlib/Makefile.orig       Thu Feb 25 05:26:36 1999
++++ stdlib/Makefile    Fri Mar  5 17:19:43 1999
+@@ -23,7 +23,7 @@
+ allopt-noprof:
+-allopt-prof: stdlib.p.cmxa std_exit.p.cmx
++allopt-prof:
+ install:
+       cp stdlib.cma std_exit.cmo *.cmi *.mli *.ml camlheader camlheader_ur $(LIBDIR)
+@@ -35,23 +35,20 @@
+       cd $(LIBDIR); $(RANLIB) stdlib.a
+ installopt-noprof:
+-      rm -f $(LIBDIR)/stdlib.p.cmxa; ln -s stdlib.cmxa $(LIBDIR)/stdlib.p.cmxa
+-      rm -f $(LIBDIR)/stdlib.p.a; ln -s stdlib.a $(LIBDIR)/stdlib.p.a
+-      rm -f $(LIBDIR)/std_exit.p.cmx; ln -s std_exit.cmx $(LIBDIR)/std_exit.p.cmx
+-      rm -f $(LIBDIR)/std_exit.p.o; ln -s std_exit.o $(LIBDIR)/std_exit.p.o
++      rm -f $(LIBDIR)/stdlib$(EXT_PROF).a; ln -s stdlib.a $(LIBDIR)/stdlib$(EXT_PROF).a
++      rm -f $(LIBDIR)/std_exit$(EXT_PROF).o; ln -s std_exit.o $(LIBDIR)/std_exit$(EXT_PROF).o
+ installopt-prof:
+-      cp stdlib.p.cmxa stdlib.p.a std_exit.p.cmx std_exit.p.o $(LIBDIR)
+-      cd $(LIBDIR); $(RANLIB) stdlib.p.a
++      cp stdlib$(EXT_PROF).a std_exit$(EXT_PROF).o $(LIBDIR)
++      cd $(LIBDIR); $(RANLIB) stdlib$(EXT_PROF).a
+ stdlib.cma: $(OBJS)
+       $(CAMLC) -a -o stdlib.cma $(OBJS)
+ stdlib.cmxa: $(OBJS:.cmo=.cmx)
+       $(CAMLOPT) -a -o stdlib.cmxa $(OBJS:.cmo=.cmx)
++      $(CAMLOPT) -p -a -o stdlib.cmxa $(OBJS:.cmo=.cmx)
+-stdlib.p.cmxa: $(OBJS:.cmo=.p.cmx)
+-      $(CAMLOPT) -a -o stdlib.p.cmxa $(OBJS:.cmo=.p.cmx)
+ camlheader camlheader_ur: header.c ../config/Makefile
+       if $(SHARPBANGSCRIPTS); then \
+@@ -73,22 +70,14 @@
+       $(CAMLC) $(COMPFLAGS) -nopervasives -c pervasives.ml
+ pervasives.cmx: pervasives.ml
++      $(CAMLOPT) -p $(OPTCOMPFLAGS) -nopervasives -c pervasives.ml
+       $(CAMLOPT) $(OPTCOMPFLAGS) -nopervasives -c pervasives.ml
+-pervasives.p.cmx: pervasives.ml
+-      @if test -f pervasives.cmx; then mv pervasives.cmx pervasives.n.cmx; else :; fi
+-      @if test -f pervasives.o; then mv pervasives.o pervasives.n.o; else :; fi
+-      $(CAMLOPT) $(OPTCOMPFLAGS) -p -nopervasives -c pervasives.ml
+-      mv pervasives.cmx pervasives.p.cmx
+-      mv pervasives.o pervasives.p.o
+-      @if test -f pervasives.n.cmx; then mv pervasives.n.cmx pervasives.cmx; else :; fi
+-      @if test -f pervasives.n.o; then mv pervasives.n.o pervasives.o; else :; fi
+-
+ # oo.cmi must be compiled with -nopervasives for applets
+ oo.cmi: oo.mli
+       $(CAMLC) $(COMPFLAGS) -nopervasives -c oo.mli
+-.SUFFIXES: .mli .ml .cmi .cmo .cmx .p.cmx
++.SUFFIXES: .mli .ml .cmi .cmo .cmx
+ .mli.cmi:
+       $(CAMLC) $(COMPFLAGS) -c $<
+@@ -97,20 +86,11 @@
+       $(CAMLC) $(COMPFLAGS) -c $<
+ .ml.cmx:
++      $(CAMLOPT) -p $(OPTCOMPFLAGS) -c $<
+       $(CAMLOPT) $(OPTCOMPFLAGS) -c $<
+-.ml.p.cmx:
+-      @if test -f $*.cmx; then mv $*.cmx $*.n.cmx; else :; fi
+-      @if test -f $*.o; then mv $*.o $*.n.o; else :; fi
+-      $(CAMLOPT) $(OPTCOMPFLAGS) -p -c $<
+-      mv $*.cmx $*.p.cmx
+-      mv $*.o $*.p.o
+-      @if test -f $*.n.cmx; then mv $*.n.cmx $*.cmx; else :; fi
+-      @if test -f $*.n.o; then mv $*.n.o $*.o; else :; fi
+-
+ $(OBJS) std_exit.cmo: pervasives.cmi $(COMPILER)
+ $(OBJS:.cmo=.cmx) std_exit.cmx: pervasives.cmi $(OPTCOMPILER)
+-$(OBJS:.cmo=.p.cmx) std_exit.p.cmx: pervasives.cmi $(OPTCOMPILER)
+ $(OBJS:.cmo=.cmi) std_exit.cmi: $(COMPILER)
+ clean::
diff --git a/ocaml-opt.patch b/ocaml-opt.patch
new file mode 100644 (file)
index 0000000..97725fb
--- /dev/null
@@ -0,0 +1,152 @@
+diff -urN ocaml-2.02.org/asmrun/Makefile ocaml-2.02/asmrun/Makefile
+--- ocaml-2.02.org/asmrun/Makefile     Fri Mar 24 16:57:06 2000
++++ ocaml-2.02/asmrun/Makefile Fri Mar 24 17:02:22 2000
+@@ -2,9 +2,9 @@
+ CC=$(NATIVECC)
+ FLAGS=-I../byterun -DNATIVE_CODE -DTARGET_$(ARCH) -DSYS_$(SYSTEM) 
+-CFLAGS=$(FLAGS) -O $(NATIVECCCOMPOPTS)
++CFLAGS=$(FLAGS) $(NATIVECCCOMPOPTS)
+ DFLAGS=$(FLAGS) -g -DDEBUG $(NATIVECCCOMPOPTS)
+-PFLAGS=$(FLAGS) -pg -O -DPROFILING $(NATIVECCCOMPOPTS)
++PFLAGS=$(FLAGS) -pg -DPROFILING $(NATIVECCCOMPOPTS)
+ COBJS=startup.o main.o fail.o roots.o signals.o \
+   misc.o freelist.o major_gc.o minor_gc.o memory.o alloc.o compare.o ints.o \
+diff -urN ocaml-2.02.org/byterun/Makefile ocaml-2.02/byterun/Makefile
+--- ocaml-2.02.org/byterun/Makefile    Fri Mar 24 16:57:06 2000
++++ ocaml-2.02/byterun/Makefile        Fri Mar 24 17:02:37 2000
+@@ -1,7 +1,7 @@
+ include ../config/Makefile
+ CC=$(BYTECC)
+-CFLAGS=-O $(BYTECCCOMPOPTS)
++CFLAGS=$(BYTECCCOMPOPTS)
+ DFLAGS=-g -DDEBUG $(BYTECCCOMPOPTS)
+ OBJS=interp.o misc.o stacks.o fix_code.o startup.o main.o \
+diff -urN ocaml-2.02.org/configure ocaml-2.02/configure
+--- ocaml-2.02.org/configure   Fri Mar 24 16:57:05 2000
++++ ocaml-2.02/configure       Fri Mar 24 16:59:09 2000
+@@ -410,7 +410,7 @@
+ # For the terminfo module
+-for libs in "" "-lcurses" "-ltermcap" "-lcurses -ltermcap"; do
++for libs in "" "-ltinfo" "-lcurses" "-ltermcap" "-lcurses -ltermcap"; do
+   if sh ./hasgot $libs tgetent tgetstr tgetnum tputs; then
+     echo "termcap functions found (with libraries '$libs')"
+     echo "#define HAS_TERMCAP" >> s.h
+diff -urN ocaml-2.02.org/otherlibs/db/Makefile ocaml-2.02/otherlibs/db/Makefile
+--- ocaml-2.02.org/otherlibs/db/Makefile       Fri Mar 24 16:57:10 2000
++++ ocaml-2.02/otherlibs/db/Makefile   Fri Mar 24 17:03:03 2000
+@@ -3,10 +3,10 @@
+ include ../../config/Makefile
+ # Compilation optiosn
+-CC=$(BYTECC) -g
++CC=$(BYTECC)
+ CAMLC=../../boot/ocamlrun ../../boot/ocamlc -I ../../stdlib
+ CAMLOPT=../../boot/ocamlrun ../../ocamlopt -I ../../stdlib
+-CFLAGS=-I../../byterun -O $(BYTECCCOMPOPTS)
++CFLAGS=-I../../byterun $(BYTECCCOMPOPTS)
+ COBJS=dbstubs.o
+ all: libmldb.a db.cmi db.cma
+diff -urN ocaml-2.02.org/otherlibs/dbm/Makefile ocaml-2.02/otherlibs/dbm/Makefile
+--- ocaml-2.02.org/otherlibs/dbm/Makefile      Fri Mar 24 16:57:10 2000
++++ ocaml-2.02/otherlibs/dbm/Makefile  Fri Mar 24 17:03:13 2000
+@@ -3,10 +3,10 @@
+ include ../../config/Makefile
+ # Compilation optiosn
+-CC=$(BYTECC) -g
++CC=$(BYTECC)
+ CAMLC=../../boot/ocamlrun ../../boot/ocamlc -I ../../stdlib
+ CAMLOPT=../../boot/ocamlrun ../../ocamlopt -I ../../stdlib
+-CFLAGS=-I../../byterun -O $(BYTECCCOMPOPTS)
++CFLAGS=-I../../byterun $(BYTECCCOMPOPTS)
+ COBJS=cldbm.o
+ all: libmldbm.a dbm.cmi dbm.cma
+diff -urN ocaml-2.02.org/otherlibs/num/Makefile ocaml-2.02/otherlibs/num/Makefile
+--- ocaml-2.02.org/otherlibs/num/Makefile      Fri Mar 24 16:57:10 2000
++++ ocaml-2.02/otherlibs/num/Makefile  Fri Mar 24 17:03:41 2000
+@@ -15,7 +15,7 @@
+ # Compilation options
+ CC=$(BYTECC)
+-CFLAGS=-O -I./bignum/h -I../../byterun $(BYTECCCOMPOPTS)
++CFLAGS=-I./bignum/h -I../../byterun $(BYTECCCOMPOPTS)
+ CAMLC=../../boot/ocamlrun ../../boot/ocamlc -I ../../stdlib -w s
+ CAMLOPT=../../boot/ocamlrun ../../ocamlopt -I ../../stdlib -w s
+diff -urN ocaml-2.02.org/otherlibs/str/Makefile ocaml-2.02/otherlibs/str/Makefile
+--- ocaml-2.02.org/otherlibs/str/Makefile      Fri Mar 24 16:57:11 2000
++++ ocaml-2.02/otherlibs/str/Makefile  Fri Mar 24 17:04:04 2000
+@@ -4,7 +4,7 @@
+ # Compilation options
+ CC=$(BYTECC)
+-CFLAGS=-O -I$(REGEXLIB) -I../../byterun $(BYTECCCOMPOPTS)
++CFLAGS=-I$(REGEXLIB) -I../../byterun $(BYTECCCOMPOPTS)
+ CAMLC=../../boot/ocamlrun ../../boot/ocamlc -I ../../stdlib
+ CAMLOPT=../../boot/ocamlrun ../../ocamlopt -I ../../stdlib
+ REGEXLIB=regex-0.12
+diff -urN ocaml-2.02.org/otherlibs/systhreads/Makefile ocaml-2.02/otherlibs/systhreads/Makefile
+--- ocaml-2.02.org/otherlibs/systhreads/Makefile       Fri Mar 24 16:57:11 2000
++++ ocaml-2.02/otherlibs/systhreads/Makefile   Fri Mar 24 17:04:28 2000
+@@ -19,7 +19,7 @@
+       ar rc libthreads.a $(BYTECODE_C_OBJS)
+ posix_b.o: posix.c
+-      $(BYTECC) -O -I../../byterun $(BYTECCCOMPOPTS) -c posix.c
++      $(BYTECC) -I../../byterun $(BYTECCCOMPOPTS) -c posix.c
+       mv posix.o posix_b.o
+ libthreadsnat.a: $(NATIVECODE_C_OBJS)
+@@ -27,7 +27,7 @@
+       ar rc libthreadsnat.a $(NATIVECODE_C_OBJS)
+ posix_n.o: posix.c
+-      $(NATIVECC) -O -I../../asmrun -I../../byterun $(NATIVECCCOMPOPTS) -DNATIVE_CODE -DTARGET_$(ARCH) -DSYS_$(SYSTEM) -c posix.c
++      $(NATIVECC) -I../../asmrun -I../../byterun $(NATIVECCCOMPOPTS) -DNATIVE_CODE -DTARGET_$(ARCH) -DSYS_$(SYSTEM) -c posix.c
+       mv posix.o posix_n.o
+ threads.cma: $(THREAD_OBJS)
+diff -urN ocaml-2.02.org/otherlibs/threads/Makefile ocaml-2.02/otherlibs/threads/Makefile
+--- ocaml-2.02.org/otherlibs/threads/Makefile  Fri Mar 24 16:57:11 2000
++++ ocaml-2.02/otherlibs/threads/Makefile      Fri Mar 24 17:04:43 2000
+@@ -1,7 +1,7 @@
+ include ../../config/Makefile
+ CC=$(BYTECC)
+-CFLAGS=-I../../byterun -O $(BYTECCCOMPOPTS)
++CFLAGS=-I../../byterun $(BYTECCCOMPOPTS)
+ CAMLC=../../boot/ocamlrun ../../boot/ocamlc -I ../../stdlib -I ../unix
+ C_OBJS=scheduler.o
+diff -urN ocaml-2.02.org/otherlibs/unix/Makefile ocaml-2.02/otherlibs/unix/Makefile
+--- ocaml-2.02.org/otherlibs/unix/Makefile     Fri Mar 24 16:57:11 2000
++++ ocaml-2.02/otherlibs/unix/Makefile Fri Mar 24 17:04:53 2000
+@@ -4,7 +4,7 @@
+ # Compilation options
+ CC=$(BYTECC)
+-CFLAGS=-I../../byterun -O $(BYTECCCOMPOPTS)
++CFLAGS=-I../../byterun $(BYTECCCOMPOPTS)
+ CAMLC=../../boot/ocamlrun ../../boot/ocamlc -I ../../stdlib
+ CAMLOPT=../../boot/ocamlrun ../../ocamlopt -I ../../stdlib
+diff -urN ocaml-2.02.org/yacc/Makefile ocaml-2.02/yacc/Makefile
+--- ocaml-2.02.org/yacc/Makefile       Fri Mar 24 16:57:13 2000
++++ ocaml-2.02/yacc/Makefile   Fri Mar 24 17:05:12 2000
+@@ -3,7 +3,7 @@
+ include ../config/Makefile
+ CC=$(BYTECC)
+-CFLAGS=-O -DNDEBUG $(BYTECCCOMPOPTS)
++CFLAGS=-DNDEBUG $(BYTECCCOMPOPTS)
+ OBJS= closure.o error.o lalr.o lr0.o main.o mkpar.o output.o reader.o \
+   skeleton.o symtab.o verbose.o warshall.o
This page took 0.075995 seconds and 4 git commands to generate.