pkgsrc-Users archive

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

Re: The correct way to configure compiler flags.

Roland Illig <> writes:

> Am 18.10.2010 23:53, schrieb Charles McGarvey:
>> Unless I'm misunderstanding, the pkgsrc guide is at odds with the
>> mk.conf manual page with regards to configuring compiler flags.  Section
>> 5.4.2 in the pkgsrc guide says that compiler flags should be explicitly
>> appended to CFLAGS, whereas mk.conf(5) says to use COPTS and CPUFLAGS
>> and never to set CFLAGS in mk.conf.  Which is correct?
>> Also see:
>> mk.conf(5)
> mk.conf(5) describes the build configuration for the base system. This
> is something very different from pkgsrc. It's just that they happen to
> use the same file for configuration (mostly for historic reasons).
> And this is the reason for the "preprocessor directive" BSD_PKG_MK that
> can be used in mk.conf:
>     .ifdef BSD_PKG_MK
>     # pkgsrc configuration follows
>     CFLAGS += -Os
>     .else
>     # base system configuration follows
>     COPT += -Os
>     .endif

A user had the same problem on IRC today, perhaps this should be stressed.


Attachment: pgps3FHU_4lyy.pgp
Description: PGP signature

Home | Main Index | Thread Index | Old Index