Index: tools/driver/cc1as_main.cpp =================================================================== --- tools/driver/cc1as_main.cpp +++ tools/driver/cc1as_main.cpp @@ -344,12 +344,19 @@ std::unique_ptr MOFI(new MCObjectFileInfo()); MCContext Ctx(MAI.get(), MRI.get(), MOFI.get(), &SrcMgr); + Triple T(Opts.Triple); bool PIC = false; if (Opts.RelocationModel == "static") { PIC = false; } else if (Opts.RelocationModel == "pic") { PIC = true; + } else if ((T.getArch() == llvm::Triple::arm || + T.getArch() == llvm::Triple::armeb) && + (Opts.RelocationModel == "ropi" || + Opts.RelocationModel == "rwpi" || + Opts.RelocationModel == "ropi-rwpi")) { + PIC = false; } else { assert(Opts.RelocationModel == "dynamic-no-pic" && "Invalid PIC model!");