riscv64-multilib-empty

===================================================================

Gbp-Pq: Name riscv64-multilib-empty.patch
This commit is contained in:
LLVM Packaging Team 2022-06-27 14:59:01 +08:00 committed by Lu zhiping
parent b29bcc7881
commit 2869bc2ee2
1 changed files with 10 additions and 5 deletions

View File

@ -1502,11 +1502,12 @@ static bool findMSP430Multilibs(const Driver &D,
return false;
}
static void findRISCVMultilibs(const Driver &D,
static bool findRISCVMultilibs(const Driver &D,
const llvm::Triple &TargetTriple, StringRef Path,
const ArgList &Args, DetectedMultilibs &Result) {
FilterNonExistent NonExistent(Path, "/crtbegin.o", D.getVFS());
Multilib Default;
Multilib Ilp32 = makeMultilib("lib32/ilp32").flag("+m32").flag("+mabi=ilp32");
Multilib Ilp32f =
makeMultilib("lib32/ilp32f").flag("+m32").flag("+mabi=ilp32f");
@ -1517,7 +1518,7 @@ static void findRISCVMultilibs(const Driver &D,
Multilib Lp64d = makeMultilib("lib64/lp64d").flag("+m64").flag("+mabi=lp64d");
MultilibSet RISCVMultilibs =
MultilibSet()
.Either({Ilp32, Ilp32f, Ilp32d, Lp64, Lp64f, Lp64d})
.Either({Default, Ilp32, Ilp32f, Ilp32d, Lp64, Lp64f, Lp64d})
.FilterOut(NonExistent);
Multilib::flags_list Flags;
@ -1533,8 +1534,11 @@ static void findRISCVMultilibs(const Driver &D,
addMultilibFlag(ABIName == "lp64f", "mabi=lp64f", Flags);
addMultilibFlag(ABIName == "lp64d", "mabi=lp64d", Flags);
if (RISCVMultilibs.select(Flags, Result.SelectedMultilib))
Result.Multilibs = RISCVMultilibs;
if (!RISCVMultilibs.select(Flags, Result.SelectedMultilib))
return false;
Result.Multilibs = RISCVMultilibs;
return true;
}
static bool findBiarchMultilibs(const Driver &D,
@ -2309,7 +2313,8 @@ bool Generic_GCC::GCCInstallationDetector::ScanGCCForMultilibs(
if (!findMIPSMultilibs(D, TargetTriple, Path, Args, Detected))
return false;
} else if (TargetTriple.isRISCV()) {
findRISCVMultilibs(D, TargetTriple, Path, Args, Detected);
if (!findRISCVMultilibs(D, TargetTriple, Path, Args, Detected))
return false;
} else if (isMSP430(TargetArch)) {
findMSP430Multilibs(D, TargetTriple, Path, Args, Detected);
} else if (TargetArch == llvm::Triple::avr) {