Using a polynomial approach to linear codes, one derives necessary and sufficient conditions for cyclic

-ary codes to be invariant under the general linear group of substitutions over an extension field of

. The important class of polynomial codes, introduced by Kasami, Lin, and Peterson, satisfy the conditions and several new results are obtained about some of these codes.