# --- T2-COPYRIGHT-NOTE-BEGIN --- # T2 SDE: package/*/llvm/riscv-generic.patch # Copyright (C) 2021 The T2 SDE Project # # This Copyright note is generated by scripts/Create-CopyPatch, # more information can be found in the files COPYING and README. # # This patch file is dual-licensed. It is available under the license the # patched project is licensed under, as long as it is an OpenSource license # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms # of the GNU General Public License version 2 as used by the T2 SDE. # --- T2-COPYRIGHT-NOTE-END --- --- llvm-13.0.0.src/lib/Target/RISCV/RISCVSubtarget.cpp.vanilla 2021-11-06 15:27:08.958401534 +0100 +++ llvm-13.0.0.src/lib/Target/RISCV/RISCVSubtarget.cpp 2021-11-06 15:27:12.261401705 +0100 @@ -55,9 +55,11 @@ bool Is64Bit = TT.isArch64Bit(); - if (CPU.empty()) + if (CPU.empty() || CPU == "generic") CPU = Is64Bit ? "generic-rv64" : "generic-rv32"; +#if 0 if (CPU == "generic") report_fatal_error(Twine("CPU 'generic' is not supported. Use ") + (Is64Bit ? "generic-rv64" : "generic-rv32")); +#endif if (TuneCPU.empty()) TuneCPU = CPU;