Follow-up Comment #4, bug #31002 (project make):

In this case GNU make 3.82 does exactly what it claims it will do.
Unfortunately the expected (from glibc's perspective) behavior falls into that
0.01% of cases where the more qualified rule is not what needs to be
selected.

The assumption here is that a more specialized rule should be preferred over
a more general one. For example:

%.o: %.c; $(CC) -o $@ $<
%-pic.o: %.c; $(CC) -fPIC -o $@ $<

Here we want make to select the second rule when building foo-pic.o and the
first rule when building foo.o.

Similar thing happens in your case: make looks for a rule to build
rtld-memset.so and chooses a rule specific to building the 'rtld' kind of
targets rather than any kind. The way to resolve this would be to add two more
rules before the existing 'rtld-%' ones:

rtld-%.os: rtld-%.S
        @echo $@: rtld-%os: rtld-%.S: $<
rtld-%.os: rtld-%.c
        @echo $@: rtld-%os: rtld-%.c: $<

With this change I get

rtld-memset.os: rtld-%os: rtld-%.c: rtld-memset.c

with 3.82 and the old behavior with 3.81.




    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?31002>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/


_______________________________________________
Bug-make mailing list
Bug-make@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-make

Reply via email to