unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Greg Hogan <code@greghogan.com>
To: guix-devel@gnu.org
Subject: Building a library as both static and dynamic
Date: Sun, 27 Sep 2020 07:57:19 -0400	[thread overview]
Message-ID: <5F6328DA-112E-45F9-B6F0-2132E43A6BB0@greghogan.com> (raw)

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.

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.

Another option would be to patch the source build files, but this problem feels solvable in Guix without duplicating the code from cmake-build’s configure.

Thanks,
Greg

             reply	other threads:[~2020-09-27 13:11 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-27 11:57 Greg Hogan [this message]
2020-09-29  5:09 ` Building a library as both static and dynamic Efraim Flashner
2020-10-05 13:39 ` Ludovic Courtès

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=5F6328DA-112E-45F9-B6F0-2132E43A6BB0@greghogan.com \
    --to=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).