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)


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)
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to