From: "Ludovic Courtès" <ludo@gnu.org>
To: Greg Hogan <code@greghogan.com>
Cc: guix-devel@gnu.org
Subject: Re: Building a library as both static and dynamic
Date: Mon, 05 Oct 2020 15:39:14 +0200 [thread overview]
Message-ID: <87blhgzta5.fsf@gnu.org> (raw)
In-Reply-To: <5F6328DA-112E-45F9-B6F0-2132E43A6BB0@greghogan.com> (Greg Hogan's message of "Sun, 27 Sep 2020 07:57:19 -0400")
Hi,
Greg Hogan <code@greghogan.com> skribis:
> Is there a best practice or example for building a library twice, both
> static and dynamic? I submitted patch #43620, and in working on
> another library have the same issue. These are cmake builds with a
> parameter declaration for either a static or dynamic build, not
> both. I would like to create a single package with both “out” and
> “static” outputs, which looks to be standard across Guix.
Yes, a “static” output is the preferred method if you want to keep .a
files around.
> One idea is to run the configure / make / make install phases
> twice. modify-phases does not currently support copying phases (though
> add-after could work with the right function reference from
> cmake-build) and #:configure-flags would need to be set differently.
Build systems from Autoconf/Automake/Libtool and those using CMake can
produce both shared libraries (position-independent code, PIC) and
static libraries at once. No need to run it twice.
HTH,
Ludo’.
prev parent reply other threads:[~2020-10-05 13:39 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-27 11:57 Building a library as both static and dynamic Greg Hogan
2020-09-29 5:09 ` Efraim Flashner
2020-10-05 13:39 ` Ludovic Courtès [this message]
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
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87blhgzta5.fsf@gnu.org \
--to=ludo@gnu.org \
--cc=code@greghogan.com \
--cc=guix-devel@gnu.org \
/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.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).