The dynamic linker is named ld-linux-mipsn8.so.1 when -mnan=2008 is given (or
is the default). It remains ld.so.1 for other cases.
This is necessary for MIPS32r6/MIPS64r6 since these ISA's default to -mnan=2008.
Paths
| Differential D4273
[mips] Correct linux dynamic linker for -mnan=2008 ClosedPublic Authored by dsanders on Jun 24 2014, 6:19 AM.
Details Summary The dynamic linker is named ld-linux-mipsn8.so.1 when -mnan=2008 is given (or This is necessary for MIPS32r6/MIPS64r6 since these ISA's default to -mnan=2008.
Diff Detail Event Timelinedsanders updated this object. atanasyan edited edge metadata. Comment ActionsLGTM with a small note.
This revision is now accepted and ready to land.Jun 24 2014, 6:31 AM
dsanders edited edge metadata. Comment ActionsMake the change suggested by Simon and fix a couple silly mistakes caught by
Revision Contents
Diff 10790 lib/Driver/Tools.h
lib/Driver/Tools.cpp
test/Driver/linux-ld.c
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
As to me I would write this code as follow to escape redundant checking of the -mcpu arguments if -mnan option is provided:
if (Arg *NaNArg = Args.getLastArg(options::OPT_mnan_EQ)) return llvm::StringSwitch<bool>(NaNArg->getValue()) .Case("2008", true) .Case("legacy", false) .Default(false); // NaN2008 is the default for MIPS32r6/MIPS64r6. if (Arg *CPUArg = Args.getLastArg(options::OPT_mcpu_EQ)) return llvm::StringSwitch<bool>(CPUArg->getValue()) .Cases("mips32r6", "mips64r6", true) .Default(false); return false;