From: Sven Luther <luther@dpt-info.u-strasbg.fr>
To: Xavier Leroy <xavier.leroy@inria.fr>
Cc: Sven Luther <luther@dpt-info.u-strasbg.fr>,
Yang Shouxun <yangsx@fltrp.com>,
caml-list@inria.fr
Subject: Re: [Caml-list] on the -pack option
Date: Tue, 22 Oct 2002 21:30:30 +0200 [thread overview]
Message-ID: <20021022193030.GA4687@iliana> (raw)
In-Reply-To: <20021022191424.B28301@pauillac.inria.fr>
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
next prev parent reply other threads:[~2002-10-22 19:30 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-10-22 5:33 [Caml-list] Error during partial linking Yang Shouxun
2002-10-22 8:42 ` Xavier Leroy
2002-10-22 9:21 ` Sven Luther
2002-10-22 16:17 ` Chris Hecker
2002-10-22 16:47 ` Sven Luther
2002-10-22 17:14 ` [Caml-list] on the -pack option Xavier Leroy
2002-10-22 19:30 ` Sven Luther [this message]
2002-10-22 9:37 ` [Caml-list] Error during partial linking Yang Shouxun
2002-10-22 16:07 ` Chris Hecker
2002-10-22 17:00 ` Xavier Leroy
2002-10-22 17:12 ` Chris Hecker
2002-10-22 17:21 ` brogoff
2002-10-22 20:06 ` Dmitry Bely
2002-10-22 20:25 ` Alain Frisch
2002-10-22 20:37 ` Dmitry Bely
2002-10-22 20:53 ` Alain Frisch
2002-10-22 21:10 ` Dmitry Bely
2002-10-23 7:15 ` Alessandro Baretta
[not found] ` <Pine.LNX.4.44.0210221008100.6093-100000@grace.speakeasy.ne t>
2002-10-22 17:44 ` Chris Hecker
2002-10-22 19:31 ` Sven Luther
2002-10-22 23:38 ` Chris Hecker
2002-10-23 4:16 ` David Brown
2002-10-23 10:01 ` Diego Olivier Fernandez Pons
2002-10-23 10:36 ` Sven Luther
2002-10-23 11:41 ` Alessandro Baretta
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20021022193030.GA4687@iliana \
--to=luther@dpt-info.u-strasbg.fr \
--cc=caml-list@inria.fr \
--cc=xavier.leroy@inria.fr \
--cc=yangsx@fltrp.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox