Set CONFIG_SHARE_GCM automatically depending on build with or without resources
Manual cross-merge of gcm3d and spgcm changes