Need help: alternative module inclusion - duplicate symbols
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 an emulation.
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;
};
...
and then give pci_fpga or pci_fpga_emu on the build but then I get duplicate symbols error.
For using different packages than common like this module = {
name = pci_fpga;
pci_fpga = startlib/board/pci_fpga.c; enable = pci_fpga;
};
I could not find means to get pci_fpga included.
Same problem if trying to approach it via different enable flag: How to?
Can anybody help? In docs I couldn't find usable hints.
--
KR
Michael
Sorry forget about this, wrong mailing list !
Am 26.02.2024 um 11:36 schrieb Michael Lawnick:
Quoted 43 lines
Hi group,
hope you can help me:
I have modulespci_fpga.candpci_fpga_emul.cwith same functions in them but different implementation, one for the real device, the other one is an emulation.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;
};
...and then give
pci_fpgaorpci_fpga_emuon the build but then I get duplicate symbols error.For using different packages than common like this module = {
name =pci_fpga;
pci_fpga=startlib/board/pci_fpga.c; enable =pci_fpga;
};
I could not find means to getpci_fpgaincluded.Same problem if trying to approach it via different enable flag: How to?
Can anybody help? In docs I couldn't find usable hints.
--
KR
Michael