Here comes the tracker for packages mixing flag variables. Easy way to spot this is to add -Wno-pointer-sign to CFLAGS, it will warn when CFLAGS are used in place of CXXFLAGS or other *FLAGS.