[PATCH] D117181: [PowerPC] Use IEEE long double in proper toolchain

2023-09-19 Thread Qiu Chaofan via Phabricator via cfe-commits
qiucf abandoned this revision. qiucf added a comment. Determining float ABI by system library without explicit options may cause confusion. Since Fedora has successfully switched using ieeelongdouble on ppc64le

[PATCH] D117181: [PowerPC] Use IEEE long double in proper toolchain

2022-01-24 Thread Jinsong Ji via Phabricator via cfe-commits
jsji added a comment. > Besides, would it be acceptable that we add a variable to cmake to determine > default long double semantics (like current GCC)? Yes, we can. But I think that can be in another patch, and we shouldn't rely on it -- as we shouldn't assume user will config/build

[PATCH] D117181: [PowerPC] Use IEEE long double in proper toolchain

2022-01-24 Thread Qiu Chaofan via Phabricator via cfe-commits
qiucf added a comment. In D117181#3262288 , @jsji wrote: >> Won't that end up producing a warning on ALL code built on any Linux distro >> with a GCC toolchain older than 12.1? That would be terrible. > > Good point. Yes, so should be something like: >

[PATCH] D117181: [PowerPC] Use IEEE long double in proper toolchain

2022-01-21 Thread Jinsong Ji via Phabricator via cfe-commits
jsji added a comment. > Won't that end up producing a warning on ALL code built on any Linux distro > with a GCC toolchain older than 12.1? That would be terrible. Good point. Yes, so should be something like: IsDistroWithNewToolchain = ( Distro.IsRedhat() && Distro >= Distro::RHEL9 ||

[PATCH] D117181: [PowerPC] Use IEEE long double in proper toolchain

2022-01-21 Thread Nemanja Ivanovic via Phabricator via cfe-commits
nemanjai added a comment. In D117181#3261396 , @jsji wrote: > So, the proposal is we change the default on Linux, so we will not change > the default based on the gcc version, it is based on OS and clang version > only. > but will emit warning if we

[PATCH] D117181: [PowerPC] Use IEEE long double in proper toolchain

2022-01-21 Thread Jinsong Ji via Phabricator via cfe-commits
jsji added a comment. > Would there be a way to query the GCC toolchain for what the default is for > `long double`? There would certainly be ways to query. But I don't think we should change the default *BASED* on the gcc toolchain installed. As you mentioned, `I would find it surprising

[PATCH] D117181: [PowerPC] Use IEEE long double in proper toolchain

2022-01-21 Thread Nemanja Ivanovic via Phabricator via cfe-commits
nemanjai added a comment. I don't think this is the right approach. Personally, I would find it surprising if simply having GCC 12.1 on the system changes my `long double` default. Imagine if I simply install and use such a toolchain on a machine for whatever reason. If the default for such a

[PATCH] D117181: [PowerPC] Use IEEE long double in proper toolchain

2022-01-20 Thread Jinsong Ji via Phabricator via cfe-commits
jsji added a comment. Can we just update `bool IEEELongDouble = false; ` to `bool IEEELongDouble = true;` in `clang/lib/Driver/ToolChains/Clang.cpp`? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D117181/new/ https://reviews.llvm.org/D117181

[PATCH] D117181: [PowerPC] Use IEEE long double in proper toolchain

2022-01-20 Thread Jinsong Ji via Phabricator via cfe-commits
jsji added inline comments. Comment at: clang/lib/Driver/ToolChains/PPCLinux.cpp:76 + if (SupportIEEEFloat128(getDriver(), getTriple(), DriverArgs) && + !DriverArgs.hasArg(options::OPT_mabi_EQ)) +CC1Args.push_back("-mabi=ieeelongdouble"); What if we

[PATCH] D117181: [PowerPC] Use IEEE long double in proper toolchain

2022-01-20 Thread Jinsong Ji via Phabricator via cfe-commits
jsji accepted this revision as: jsji. jsji added a comment. This revision is now accepted and ready to land. LGTM. Thanks for working on this! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D117181/new/ https://reviews.llvm.org/D117181

[PATCH] D117181: [PowerPC] Use IEEE long double in proper toolchain

2022-01-12 Thread Qiu Chaofan via Phabricator via cfe-commits
qiucf created this revision. Herald added subscribers: shchenz, kbarton, nemanjai. qiucf requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. In toolchains with proper support for IEEE float128, we can switch default long double semantics to