tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Fixing configure failures from newer gcc



Paolo Vincenzo Olivo <vins%NetBSD.org@localhost> writes:

> Thanks for the pointer, this is very useful, and could be added to the
> pkgsrc developer's guide, if it hasn't been already.
> I have been adding FORCE_C_STD to packages claiming to be written in
> C99 but not passing -std=c99 in CFLAGS.

Sure, but it's basically pointing out the FORCE_C_STD definition, as
well as taking the viewpoint that adding a FORCE-type variable is
equivalent to a patch and thus needs patch comment and upstream bug
report.

> For what it's worth the most common cause of breakage I've come across,
> is software insisting to pass -std=c99 (or even c89), but using
> alloca(3), getopt(3), strdup(3) and so on.
>
> The most transparent solution in this case is to add:  
>
>     BUILDLINK_TRANSFORM+=		opt:-std=c99:-std=gnu99
>
> to the package Makefile. 

Good point; I wasn't thinking of that.   And upstream bug report URL too :-)


Home | Main Index | Thread Index | Old Index