-
Notifications
You must be signed in to change notification settings - Fork 15.2k
[LLVM] [Clang] Support for Gentoo *t64 triples (64-bit time_t ABIs)
#111302
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -610,7 +610,8 @@ static llvm::Triple computeTargetTriple(const Driver &D, | |
| if (A->getOption().matches(options::OPT_m64) || | ||
| A->getOption().matches(options::OPT_maix64)) { | ||
| AT = Target.get64BitArchVariant().getArch(); | ||
| if (Target.getEnvironment() == llvm::Triple::GNUX32) | ||
| if (Target.getEnvironment() == llvm::Triple::GNUX32 || | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Optional: you could simplify the pattern with
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. To be honest, I don't have the energy to rewrite it all manually, especially that these files don't seem to be clang-formatted consistently. |
||
| Target.getEnvironment() == llvm::Triple::GNUT64) | ||
| Target.setEnvironment(llvm::Triple::GNU); | ||
| else if (Target.getEnvironment() == llvm::Triple::MuslX32) | ||
| Target.setEnvironment(llvm::Triple::Musl); | ||
|
|
@@ -673,6 +674,7 @@ static llvm::Triple computeTargetTriple(const Driver &D, | |
| } else if (ABIName == "n32") { | ||
| Target = Target.get64BitArchVariant(); | ||
| if (Target.getEnvironment() == llvm::Triple::GNU || | ||
| Target.getEnvironment() == llvm::Triple::GNUT64 || | ||
| Target.getEnvironment() == llvm::Triple::GNUABI64) | ||
| Target.setEnvironment(llvm::Triple::GNUABIN32); | ||
| else if (Target.getEnvironment() == llvm::Triple::Musl || | ||
|
|
@@ -681,6 +683,7 @@ static llvm::Triple computeTargetTriple(const Driver &D, | |
| } else if (ABIName == "64") { | ||
| Target = Target.get64BitArchVariant(); | ||
| if (Target.getEnvironment() == llvm::Triple::GNU || | ||
| Target.getEnvironment() == llvm::Triple::GNUT64 || | ||
| Target.getEnvironment() == llvm::Triple::GNUABIN32) | ||
| Target.setEnvironment(llvm::Triple::GNUABI64); | ||
| else if (Target.getEnvironment() == llvm::Triple::Musl || | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| // RUN: %clang_cc1 -E -dM -triple=i686-pc-linux-gnu /dev/null | FileCheck -match-full-lines -check-prefix TIME32 %s | ||
| // RUN: %clang_cc1 -E -dM -triple=i686-pc-linux-gnut64 /dev/null | FileCheck -match-full-lines -check-prefix TIME64 %s | ||
| // RUN: %clang_cc1 -E -dM -triple=armv5tel-softfloat-linux-gnueabi /dev/null | FileCheck -match-full-lines -check-prefix TIME32 %s | ||
| // RUN: %clang_cc1 -E -dM -triple=armv5tel-softfloat-linux-gnueabit64 /dev/null | FileCheck -match-full-lines -check-prefix TIME64 %s | ||
| // RUN: %clang_cc1 -E -dM -triple=armv7a-unknown-linux-gnueabihf /dev/null | FileCheck -match-full-lines -check-prefix TIME32 %s | ||
| // RUN: %clang_cc1 -E -dM -triple=armv7a-unknown-linux-gnueabihft64 /dev/null | FileCheck -match-full-lines -check-prefix TIME64 %s | ||
| // | ||
| // TIME32-NOT:#define _FILE_OFFSET_BITS 64 | ||
| // TIME32-NOT:#define _TIME_BITS 64 | ||
| // | ||
| // TIME64:#define _FILE_OFFSET_BITS 64 | ||
| // TIME64:#define _TIME_BITS 64 |
Uh oh!
There was an error while loading. Please reload this page.