[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug #31002] make picks wrong pattern rule
From: |
Boris Kolpackov |
Subject: |
[bug #31002] make picks wrong pattern rule |
Date: |
Thu, 09 Sep 2010 21:27:42 +0000 |
User-agent: |
Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.0.12) Gecko/2009072219 Iceweasel/3.0.12 (Debian-3.0.12-1) |
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/