This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 1/4] Document new hard requirement on GNU make
On 2016-11-16 11:29, Eli Zaretskii wrote:
OK.
Should we decide which oldest version of GNU Make we are willing to
support? IOW, which features do we need for the build?
Thanks.
Probably, yes, but I'm not aware of the exact features/bugfix we have to
rely on. From what I can see, pattern rules have been around since
forever (I checked out a commit of make from 1993, and it was already in
the doc). However, if there is a particular bug about pattern rules in
some versions of make we want to avoid, I am not aware of it.
While trying to make GDBserver use pattern rules as well, I was reading
this:
http://stackoverflow.com/questions/11455182/when-multiple-pattern-rules-match-a-target
I wanted to know which rule would get chosen if you wanted to build
foo-ipa.o from foo-ipa.c, and you had the two rules:
%.o: %.c
<generic compilation commands>
%-ipa.o: %-ipa.c
<ipa-specific compilation commands>
With make >= 3.82, it would do the right thing (choose the second one),
by choosing the rule with the shorter stem. Before that, it used the
order of definition (the first that matches wins). So it would be nice
for that reason to require >= 3.82, but it's also possible to work
around if that's too recent.