[PATCH] D133405: [Linux] Hack around Linux/sparc <bits/stdio-ldbl.h>

Rainer Orth via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 7 01:53:08 PDT 2022


ro created this revision.
ro added reviewers: glaubitz, MaskRay.
Herald added subscribers: StephenFan, fedor.sergeev, jyknight.
Herald added a project: All.
ro requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.

I've been using this hack to work around the Linux/sparc64 compile failure described in Issue #47994 <https://github.com/llvm/llvm-project/issues/47994>, especially since the underlying glibc PR build/27558 <https://sourceware.org/bugzilla/show_bug.cgi?id=27558> doesn't seem to be making progress and some fix is required to have LLVM build on `sparc64-unknown-linux-gnu` at all, as evidenced on the buildbot.

I don't expect this patch to be commited, just posting for reference.

Tested on `sparc64-unknown-linux-gnu`.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D133405

Files:
  clang/lib/Basic/Targets/OSTargets.h


Index: clang/lib/Basic/Targets/OSTargets.h
===================================================================
--- clang/lib/Basic/Targets/OSTargets.h
+++ clang/lib/Basic/Targets/OSTargets.h
@@ -388,6 +388,8 @@
     } else {
         Builder.defineMacro("__gnu_linux__");
     }
+    if (Triple.isSPARC())
+      Builder.defineMacro("__NO_INLINE__");
     if (Opts.POSIXThreads)
       Builder.defineMacro("_REENTRANT");
     if (Opts.CPlusPlus)


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D133405.458381.patch
Type: text/x-patch
Size: 446 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220907/97521868/attachment.bin>


More information about the llvm-commits mailing list