#14977 closed bug (fixed)

Clang doesn't support -Wsync-nand

Reported by: bgamari Owned by: bgamari
Priority: high Milestone: 8.6.1
Component: Compiler Version: 8.5
Keywords: Cc: goldfire
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: Building GHC failed Test Case:
Blocked By: Blocking:
Related Tickets: Differential Rev(s):
Wiki Page:


94f02547083cf6df686ea0b95fed050184c533de added a #pragma GCC diagnostic ignored "-Wsync-nand" pragma to libraries/ghc-prim/cbits/atomic.c to silence -Werror failures due to GCC's non-actionable -Wsync-nand warning. Unfortunately goldfire reports that Apple's Clang chokes on this with,

libraries/ghc-prim/cbits/atomic.c:127:32: error: unknown warning group
      '-Wsync-nand', ignored [-Werror,-Wunknown-warning-option]

Change History (8)

comment:1 Changed 19 months ago by bgamari

Type of failure: None/UnknownBuilding GHC failed

comment:2 Changed 19 months ago by bgamari

Milestone: 8.6.1
Priority: normalhigh

comment:3 Changed 19 months ago by bgamari

Owner: set to bgamari

comment:4 Changed 19 months ago by goldfire

Note that this happens only with -Werror specified in your build.mk, and removing -Werror allows you to proceed.

comment:5 Changed 19 months ago by goldfire

I've got a patch in-flight:


#pragma GCC diagnostic ignored "-Wunknown-warning-option"

comment:6 Changed 19 months ago by Richard Eisenberg <rae@…>

In 97e1f300/ghc:

Fix compilation stopper on macOS with -Werror

Commit 94f02547083cf6df686ea0b95fed050184c533de
added some pragmas that allow GCC to compile GHC, but stop
macOS's clang. This adds another counter-pragma to halp
clang lumber along, too.

Fixes #14977.

comment:7 Changed 19 months ago by goldfire

Status: newmerge

Does this need a merge?

comment:8 Changed 19 months ago by bgamari

Resolution: fixed
Status: mergeclosed

Nope, this only affects ed6f9fb9d5a684d2159c29633159c3254cf04deb which isn't present on ghc-8.4. Thanks for checking though!

Note: See TracTickets for help on using tickets.