// #include <errno.h>
        import "C"
 
-CPPFLAGS, CFLAGS, CXXFLAGS and LDFLAGS may be defined with pseudo #cgo directives
+CFLAGS, CPPFLAGS, CXXFLAGS and LDFLAGS may be defined with pseudo #cgo directives
 within these comments to tweak the behavior of gcc.  Values defined
 in multiple directives are concatenated together.  Options prefixed
 by $GOOS, $GOARCH, or $GOOS/$GOARCH are only defined in matching
        // #include <png.h>
        import "C"
 
-The CGO_CPPFLAGS, CGO_CFLAGS, CGO_CXXFLAGS and CGO_LDFLAGS environment variables are added
+The CGO_CFLAGS, CGO_CPPFLAGS, CGO_CXXFLAGS and CGO_LDFLAGS environment variables are added
 to the flags derived from these directives.  Package-specific flags should
 be set using the directives, not the environment variables, so that builds
 work in unmodified environments.
 
         CXXFiles []string       // .cc, .cxx and .cpp source files
         HFiles   []string       // .h, .hh, .hpp and .hxx source files
         SFiles   []string       // .s source files
-        SysoFiles []string      // .syso object files to add to archive
         SwigFiles []string      // .swig files
         SwigCXXFiles []string   // .swigcxx files
+        SysoFiles []string      // .syso object files to add to archive
 
         // Cgo directives
-        CgoCPPFLAGS  []string // cgo: flags for C preprocessor
         CgoCFLAGS    []string // cgo: flags for C compiler
+        CgoCPPFLAGS  []string // cgo: flags for C preprocessor
         CgoCXXFLAGS  []string // cgo: flags for C++ compiler
         CgoLDFLAGS   []string // cgo: flags for linker
         CgoPkgConfig []string // cgo: pkg-config names
 
         CXXFiles []string       // .cc, .cxx and .cpp source files
         HFiles   []string       // .h, .hh, .hpp and .hxx source files
         SFiles   []string       // .s source files
-        SysoFiles []string      // .syso object files to add to archive
         SwigFiles []string      // .swig files
         SwigCXXFiles []string   // .swigcxx files
+        SysoFiles []string      // .syso object files to add to archive
 
         // Cgo directives
-        CgoCPPFLAGS  []string // cgo: flags for C preprocessor
         CgoCFLAGS    []string // cgo: flags for C compiler
+        CgoCPPFLAGS  []string // cgo: flags for C preprocessor
         CgoCXXFLAGS  []string // cgo: flags for C++ compiler
         CgoLDFLAGS   []string // cgo: flags for linker
         CgoPkgConfig []string // cgo: pkg-config names
 
        CXXFiles       []string `json:",omitempty"` // .cc, .cpp and .cxx source files
        HFiles         []string `json:",omitempty"` // .h, .hh, .hpp and .hxx source files
        SFiles         []string `json:",omitempty"` // .s source files
-       SysoFiles      []string `json:",omitempty"` // .syso system object files added to package
        SwigFiles      []string `json:",omitempty"` // .swig files
        SwigCXXFiles   []string `json:",omitempty"` // .swigcxx files
+       SysoFiles      []string `json:",omitempty"` // .syso system object files added to package
 
        // Cgo directives
-       CgoCPPFLAGS  []string `json:",omitempty"` // cgo: flags for C preprocessor
        CgoCFLAGS    []string `json:",omitempty"` // cgo: flags for C compiler
+       CgoCPPFLAGS  []string `json:",omitempty"` // cgo: flags for C preprocessor
        CgoCXXFLAGS  []string `json:",omitempty"` // cgo: flags for C++ compiler
        CgoLDFLAGS   []string `json:",omitempty"` // cgo: flags for linker
        CgoPkgConfig []string `json:",omitempty"` // cgo: pkg-config names
        p.CXXFiles = pp.CXXFiles
        p.HFiles = pp.HFiles
        p.SFiles = pp.SFiles
-       p.SysoFiles = pp.SysoFiles
        p.SwigFiles = pp.SwigFiles
        p.SwigCXXFiles = pp.SwigCXXFiles
-       p.CgoCPPFLAGS = pp.CgoCPPFLAGS
+       p.SysoFiles = pp.SysoFiles
        p.CgoCFLAGS = pp.CgoCFLAGS
+       p.CgoCPPFLAGS = pp.CgoCPPFLAGS
        p.CgoCXXFLAGS = pp.CgoCXXFLAGS
        p.CgoLDFLAGS = pp.CgoLDFLAGS
        p.CgoPkgConfig = pp.CgoPkgConfig
 
        CXXFiles       []string // .cc, .cpp and .cxx source files
        HFiles         []string // .h, .hh, .hpp and .hxx source files
        SFiles         []string // .s source files
-       SysoFiles      []string // .syso system object files to add to archive
        SwigFiles      []string // .swig files
        SwigCXXFiles   []string // .swigcxx files
+       SysoFiles      []string // .syso system object files to add to archive
 
        // Cgo directives
-       CgoCPPFLAGS  []string // Cgo CPPFLAGS directives
        CgoCFLAGS    []string // Cgo CFLAGS directives
+       CgoCPPFLAGS  []string // Cgo CPPFLAGS directives
        CgoCXXFLAGS  []string // Cgo CXXFLAGS directives
        CgoLDFLAGS   []string // Cgo LDFLAGS directives
        CgoPkgConfig []string // Cgo pkg-config directives
 }
 
 // saveCgo saves the information from the #cgo lines in the import "C" comment.
-// These lines set CPPCFLAGS, CFLAGS, CXXFLAGS and LDFLAGS and pkg-config directives
+// These lines set CFLAGS, CPPFLAGS, CXXFLAGS and LDFLAGS and pkg-config directives
 // that affect the way cgo's C code is built.
 //
 // TODO(rsc): This duplicates code in cgo.