On Wed, Oct 13, 2021 at 03:24:31PM +0100, Anthony PERARD wrote: > On Mon, Oct 11, 2021 at 04:02:22PM +0200, Jan Beulich wrote: > > On 24.08.2021 12:50, Anthony PERARD wrote: > > > ifeq ($(CONFIG_ENFORCE_UNIQUE_SYMBOLS),y) > > > cmd_cc_o_c = $(CC) $(c_flags) -c $< -o $(dot-target).tmp -MQ $@ > > > ifeq ($(CONFIG_CC_IS_CLANG),y) > > > - cmd_objcopy_fix_sym = $(OBJCOPY) --redefine-sym $<=$(SRCPATH)/$< > > > $(dot-target).tmp $@ > > > + cmd_objcopy_fix_sym = $(OBJCOPY) --redefine-sym $(<F)=$< > > > $(dot-target).tmp $@ > > > > Are you sure about the $< => $(<F) transformation here? Previoiusly it > > was present only ... > > I have to check again. Maybe $< didn't work and it's more obvious with > this patch. Or maybe that depends on the version of clang.
With clang 12, the original line doesn't work for the few objects that are built from "subdir/source.c". I guess it is just by luck that they aren't any duplicated symbols. > > > else > > > - cmd_objcopy_fix_sym = $(OBJCOPY) --redefine-sym > > > $(<F)=$(SRCPATH)/$< $(dot-target).tmp $@ > > > + cmd_objcopy_fix_sym = $(OBJCOPY) --redefine-sym $(<F)=$< > > > $(dot-target).tmp $@ > > > > ... here. -- Anthony PERARD
