Permalink
Browse files

Use -no_compact_unwind on OS X x86 (as well as x86_64)

Without it we get warnings like:
    ld: warning: could not create compact unwind for .LFB3: non-standard register 5 being saved in prolog
  • Loading branch information...
1 parent bcf55e0 commit be6e231c961424ee96c0dc1269f2551daf314048 @igfoo igfoo committed Oct 6, 2011
Showing with 8 additions and 4 deletions.
  1. +8 −4 compiler/main/DriverPipeline.hs
@@ -1680,11 +1680,15 @@ linkBinary dflags o_files dep_packages = do
else [])
-- '-no_compact_unwind'
- -- - C++/Objective-C exceptions cannot use optimised stack
- -- unwinding code (the optimised form is the default in Xcode 4 on
- -- x86_64).
+ -- C++/Objective-C exceptions cannot use optimised
+ -- stack unwinding code. The optimised form is the
+ -- default in Xcode 4 on at least x86_64, and
+ -- without this flag we're also seeing warnings
+ -- like
+ -- ld: warning: could not create compact unwind for .LFB3: non-standard register 5 being saved in prolog
+ -- on x86.
++ (if platformOS (targetPlatform dflags) == OSDarwin &&
- platformArch (targetPlatform dflags) == ArchX86_64
+ platformArch (targetPlatform dflags) `elem` [ArchX86, ArchX86_64]
then ["-Wl,-no_compact_unwind"]
else [])

0 comments on commit be6e231

Please sign in to comment.