[PATCH] Prevent GCC 6 <cstdlib> from including /usr/include/stdlib.h

Florian Weimer fweimer@redhat.com
Sat Jun 11 09:46:00 GMT 2016


On 06/09/2016 09:31 PM, Mike Frysinger wrote:
> On 08 Jun 2016 17:08, Florian Weimer wrote:
>> Otherwise, /usr/include/stdlib.h turns up as a make dependency,
>> and an implicit rule will kick and make will try to install
>> stdlib/stdlib.h as /usr/include/stdlib.h because the target
>> is out of date.
>
> i've wondered why we use -M in the first place.  why not change to -MM ?

In this case, it helped to catch an invalid test. :)  Including 
/usr/include/stdlib.h cannot be the right thing to do.

Using implicit rules for the install target is rather dubious, 
particularly if these rules are always active (i.e. not just when “make 
install” is running).  This is quite risky, and the massive count of 
implicit rules we have causes real pain during day-to-day development.

And see my reply to Roland, /usr/include should never be on the include 
search path.

Florian



More information about the Libc-alpha mailing list