Cureently, passing -frwpi/-fropi for assmebling causes assertion.
This patch teaches the cc1as driver to accept the flags
Details
Diff Detail
Event Timeline
This looks like it'll get the build attributes wrong (since only PIC gets plumbed through to the backend). That's probably worse than simply rejecting the arguments.
Do you mean the attributes like:
Tag_ABI_PCS_R9_use: SB Tag_ABI_PCS_RW_data: SB-relative Tag_ABI_PCS_GOT_use: direct
For cc1as, it won't add such tags no matter PIC or static relocation model. The PIC value only affects MIPS target and some DWARF info.
And since it's an assertion, in Release build, the flag will still be accepted silently.
I think it would be better to reject these options than to silently accept them, unless you plan on using them to emit build attributes.
For asm file, I think it's the asm file's responsibility to set the corresponding .eabi_attribute. I tried to assemble a .S with -fPIC and don't see any attributes is generated by assembler. And linker should catch if objs with incompatible ABIs are used.
In which case, I think assembling with -fropi or -frwpi should be an error, rather than it being accepted and silently ignored.