# --- T2-COPYRIGHT-NOTE-BEGIN --- # T2 SDE: package/*/clang/no-unsafe-Ofast-math.patch # Copyright (C) 2023 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 --- --- clang-16.0.3.src/lib/Driver/ToolChain.cpp.vanilla 2023-05-15 18:48:30.801267754 +0200 +++ clang-16.0.3.src/lib/Driver/ToolChain.cpp 2023-05-15 18:49:38.432271086 +0200 @@ -1087,7 +1087,7 @@ std::string &Path) const { // Do not check for -fno-fast-math or -fno-unsafe-math when -Ofast passed // (to keep the linker options consistent with gcc and clang itself). - if (!isOptimizationLevelFast(Args)) { + //if (!isOptimizationLevelFast(Args)) { // Check if -ffast-math or -funsafe-math. Arg *A = Args.getLastArg(options::OPT_ffast_math, options::OPT_fno_fast_math, @@ -1097,7 +1097,7 @@ if (!A || A->getOption().getID() == options::OPT_fno_fast_math || A->getOption().getID() == options::OPT_fno_unsafe_math_optimizations) return false; - } + //} // If crtfastmath.o exists add it to the arguments. Path = GetFilePath("crtfastmath.o"); return (Path != "crtfastmath.o"); // Not found.