On Fri, Nov 20, 2015 at 2:21 PM Rich Felker wrote: > I think this is failing to replicate the current behavior where a .sub > file in src/*/$(ARCH)$(ASMSUBARCH) replaces the .s file in > src/*/$(ARCH). In cases where both exist we'll end up with duplicate > symbol errors linking libc.so and both present (with the wrong one > likely getting used) in libc.a. > I tried various combinations of ARCH and SUBARCH and the behavior seems to be the same as in current implementation. Do you have any examples? > This problem will of course disappear when we get rid of .sub files, > but that doesn't help unless we remove .sub files first. > > I suppose all that's needed for now is to add more EXCLUDE_OBJS using > the same input but with: > > $(subst /$(ARCH)$(ASMSUBARCH)/,/$(ARCH)/,... > > instead of: > > $(subst /$(ARCH)$(ASMSUBARCH)/,/,... > > Does this sound right? > When I tried this change, I started getting duplicate symbol errors when linking libc.so, but with the original it seems to be working fine (this particular case was when ARCH=arm SUBARCH=hf ASMSUBARCH=ebhf).