def METHOD_NAME(self, name, flags):
    flags = list(flags)
    if name == "cxxflags":
        flags.append(self.compiler.cxx11_flag)
    if name == "cflags":
        if "%pgi" not in self.spec and self.spec.satisfies("%gcc@:5.1"):
            flags.append("-std=gnu99")
    return (None, None, flags)