On 25/01/19 15:53, Thomas Huth wrote: > Since the ioport code clearly depends on ISA, I think you could also > simply do: > > common-obj-$(CONFIG_ISA_BUS) += ioport.o > > instead of adding it to three different lines here?
No, because that would add the function even if !IDE && ISA_BUS, causing undefined symbols from ide_ioport_read and friends. > Well, the linker should be smart enough to deal with multiple entries, > so it's likely just a matter of taste. It's not the linker, rules.mak explicitly drops duplicates.