grub-devel.gnu.org archive mirror
 help / color / mirror / Atom feed
From: Michael Lawnick via Grub-devel <grub-devel@gnu.org>
To: grub-devel@gnu.org
Cc: Michael Lawnick <ml.lawnick@gmx.de>
Subject: Need help: alternative module inclusion - duplicate symbols
Date: Mon, 26 Feb 2024 11:50:12 +0100	[thread overview]
Message-ID: <3de0a942-cf6d-45d6-b60e-031a09b15bb4@gmx.de> (raw)

Hi group,

hope you can help me:
I have modules pci_fpga.c and pci_fpga_emul.c with same functions in
them but different implementation, one for the real device, the other
one is just emulating.

What I now want is being able to include one of both versions through
build command. I started with this:

Makefile.core.def:
...
module = {
  name = pci_fpga;
  common = startlib/board/pci_fpga.c;
  enable = efi;
};

module = {
  name = pci_fpga_emul;
  common = startlib/board/pci_fpga_emul.c;
  enable = efi;
};
...

but then I get duplicate symbols error even without giving pci_fpga or
pci_fpga_emul on the build.

For using different packages than 'common' like this
module = {
  name = pci_fpga;
  pci_fpga = startlib/board/pci_fpga.c;
  enable = efi;
};
I could not find means to get pci_fpga included.

Same problem if trying to approach it via different enable flag: How to do?

Can anybody help? In docs I couldn't find usable hints.

--
KR
Michael

_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel

             reply	other threads:[~2024-02-26 10:51 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-26 10:50 Michael Lawnick via Grub-devel [this message]
2024-02-26 13:38 ` Need help: alternative module inclusion - duplicate symbols Vladimir 'phcoder' Serbinenko
2024-02-26 13:54   ` Michael Lawnick via Grub-devel

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=3de0a942-cf6d-45d6-b60e-031a09b15bb4@gmx.de \
    --to=grub-devel@gnu.org \
    --cc=ml.lawnick@gmx.de \
    /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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).