pkgsrc-Bugs archive

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

pkg/56352: pkglint doesn't complain about invalid CFLAGS.mumble

>Number:         56352
>Category:       pkg
>Synopsis:       pkglint doesn't complain about invalid CFLAGS.mumble
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Sun Aug 08 18:40:00 +0000 2021
>Originator:     David A. Holland
>Release:        NetBSD 9.99.85 (20210623) pkgsrc 20210808 pkglint 21.2.1nb1
System: NetBSD valkyrie 9.99.85 NetBSD 9.99.85 (VALKYRIE) #7: Wed Jun 23 18:32:25 EDT 2021  dholland@valkyrie:/usr/src/sys/arch/amd64/compile/VALKYRIE amd64
Architecture: x86_64
Machine: amd64

pkglint doesn't notice if you write CFLAGS.NebTSD+=foo. Shouldn't it
have a known list of platforms and compilers so it can flag typos like

(also, it doesn't complain if you assign CFLAGS with = instead of +=;
I would have sworn it used to, but pkglint4 apparently doesn't either.
Should it? What about CFLAGS.mumble? This is more interesting for
CFLAGS.mumble than plain CFLAGS because flatly assigning CFLAGS is
likely to unconditionally break the build but per-target stuff can go

(all of the above also applies to LDFLAGS and LIBS and I think all the
other similar variables)


Notice e.g. in games/neverball/Makefile:

   LDFLAGS.DragonFly=      -lX11 -lm
   LDFLAGS.SunOS+=         -lX11 -lm

Then run pkglint -Wall on it, try a bunch of stuff, become confused...


probably not difficult, can try to write a patch if desired

Home | Main Index | Thread Index | Old Index