Apparently you were linking to a dynamic library which was linked with dynamic libgcc. Since you had a static version of that library, too, -static "fixed" your "problem" (if you didn't have a static version of that library, -static would be of no avail). It doesn't change the fact that -static-libgcc is the proper way to link libgcc statically, though.