Index: doc/invoke.texi =================================================================== --- doc/invoke.texi (revision 148727) +++ doc/invoke.texi (working copy) @@ -9439,14 +9439,17 @@ not call any other functions.) The defa Gives all externally visible functions in the file being compiled an ARM instruction set header which switches to Thumb mode before executing the rest of the function. This allows these functions to be called from -non-interworking code. +non-interworking code. This option is not valid in AAPCS configurations +because interworking is enabled by default. @item -mcaller-super-interworking @opindex mcaller-super-interworking Allows calls via function pointers (including virtual functions) to execute correctly regardless of whether the target code has been compiled for interworking or not. There is a small overhead in the cost -of executing a function pointer if this option is enabled. +of executing a function pointer if this option is enabled. This option +is not valid in AAPCS configurations because interworking is enabled +by default. @item -mtp=@var{name} @opindex mtp Index: config/arm/arm.c =================================================================== --- config/arm/arm.c (revision 148728) +++ config/arm/arm.c (working copy) @@ -1609,10 +1609,18 @@ arm_override_options (void) if (arm_float_abi == ARM_FLOAT_ABI_HARD && TARGET_VFP) sorry ("-mfloat-abi=hard and VFP"); - if (TARGET_AAPCS_BASED - && (arm_fp_model == ARM_FP_MODEL_FPA)) - error ("FPA is unsupported in the AAPCS"); - + if (TARGET_AAPCS_BASED) + { + if (TARGET_CALLER_INTERWORKING) + error ("AAPCS does not support -mcaller-super-interworking"); + + if (TARGET_CALLEE_INTERWORKING) + error ("AAPCS does not support -mcallee-super-interworking"); + + if (arm_fp_model == ARM_FP_MODEL_FPA) + error ("FPA is unsupported in the AAPCS"); + } + /* FPA and iWMMXt are incompatible because the insn encodings overlap. VFP and iWMMXt can theoretically coexist, but it's unlikely such silicon will ever exist. GCC makes no attempt to support this combination. */