From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id VAA01175; Tue, 22 Oct 2002 21:30:34 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id VAA01482 for ; Tue, 22 Oct 2002 21:30:33 +0200 (MET DST) Received: from mel-rto4.wanadoo.fr (smtp-out-4.wanadoo.fr [193.252.19.23]) by nez-perce.inria.fr (8.11.1/8.11.1) with ESMTP id g9MJUWD16329; Tue, 22 Oct 2002 21:30:32 +0200 (MET DST) Received: from mel-rta10.wanadoo.fr (193.252.19.193) by mel-rto4.wanadoo.fr (6.5.007) id 3DA24D3200961AD5; Tue, 22 Oct 2002 21:30:31 +0200 Received: from iliana (80.14.193.120) by mel-rta10.wanadoo.fr (6.5.007) id 3DA24C0A009C3824; Tue, 22 Oct 2002 21:30:31 +0200 Received: from luther by iliana with local (Exim 3.36 #1 (Debian)) id 1844jW-0001ZC-00; Tue, 22 Oct 2002 21:30:30 +0200 Date: Tue, 22 Oct 2002 21:30:30 +0200 To: Xavier Leroy Cc: Sven Luther , Yang Shouxun , caml-list@inria.fr Subject: Re: [Caml-list] on the -pack option Message-ID: <20021022193030.GA4687@iliana> References: <200210221333.36858.yangsx@fltrp.com> <20021022104215.A9456@pauillac.inria.fr> <20021022092103.GA1344@iliana> <20021022191424.B28301@pauillac.inria.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20021022191424.B28301@pauillac.inria.fr> User-Agent: Mutt/1.4i From: Sven Luther Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk On Tue, Oct 22, 2002 at 07:14:24PM +0200, Xavier Leroy wrote: > > Is there a particular reason why ocamlmklib does not support the pack > > option ? > > Well, basically because I think it wouldn't make much sense. > The job of ocamlmklib is to build a mixed C/Caml library, that is: > - a ".cma" Caml library > - a ".a" and/or ".so" C library > - the necessary annotations in the ".cma" so that the C part is > automatically linked. > > I feel that packing a set of Caml object files (.cmo) into > substructures of a single Caml object file (which is what -pack does) > is best done by a separate invocation of ocamlc -pack. That is, > you can always do > ocamlc -pack -o mylib.cmo a.cmo b.cmo c.cmo > ocamlmklib -o mylib ... mylib.cmo Well, one more step in the makefile, it would be no problem, but since ocamlmklib is a wrapper anyway, what about making : ocamlmklib -pack -o mylib a.cmo b.cmo c.cmo To just be a shortcut for the above two ? This would seem more logical from a user perspective point, and you would be able to simply use ocamlmklib for doing libraries, and to simply specify -pack if you want the .cmos packed. > > [about not linking unused code] > > BTW, if you pack the .cmos into a single .cmo and then put this one in a > > .cma, you should get the same benefit as what you describe, isn't it ? > > Unfortunately not. The .cma contains only one .cmo, which is either > not linked at all or linked in full. For the bytecode compiler, it > could be possible to eliminate unused code with a finer grain. But Would it make sense doing this for bytecode and not native code ? > for the native-code, we are severely constrained by what the Unix and > Win32 linkers know how to do, and they can only eliminate whole object > files, not parts of them. > > For some libraries, this isn't really a problem: by design, you'll > generally use most of their modules. For other libraries (e.g. Baire :-) So you suggest Shouxun should better forget about using -pack in the Baire makefile ? > > BTW, advi build fails on ia64 > > Yes, your bug report is in the database and will be addressed in due time. Err, sorry, i forgot i had filled a bugreport. BTW, like i said, maybe i am spoiled by the debian BTS, but should the ocaml BTS not give some feedback when a bug report you submit is being processed ? Maybe you could request this feature by setting a flag that your bug report processor will recognize and trigger feedback mails ? Friendly, Sven Luther ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners