It always use cc to compile netpbm. Even I passed env variable CC=gcc to gmake. So maybe consider add CC build vaiable in Makefile. Thanks
Sorry . I used BSD make to build this . Not gmake.
A commit references this bug: Author: tobik Date: Fri Mar 27 07:35:00 UTC 2020 New revision: 529232 URL: https://svnweb.freebsd.org/changeset/ports/529232 Log: graphics/netpbm: Reexport CC Support inheriting CC from the build environment. `make CC=foo` works like it should but `env CC=foo make` does not. PR: 245076 Changes: head/graphics/netpbm/Makefile