Commit 20705dff authored by Ian Lynagh's avatar Ian Lynagh

Silence "text reloc" warnings on OS X / x86

ld gives loads of warnings like:
    ld: warning: text reloc in _base_GHCziArr_unsafeArray_info to _base_GHCziArr_unsafeArray_closure
when linking any program. We're not sure whether this is something we
ought to fix, but for now we use the -Wl,-read_only_relocs,suppress flag
to silence them.
parent 88389834
......@@ -1688,6 +1688,17 @@ linkBinary dflags o_files dep_packages = do
then ["-Wl,-no_compact_unwind"]
else [])
-- '-Wl,-read_only_relocs,suppress'
-- ld gives loads of warnings like:
-- ld: warning: text reloc in _base_GHCziArr_unsafeArray_info to _base_GHCziArr_unsafeArray_closure
-- when linking any program. We're not sure
-- whether this is something we ought to fix, but
-- for now this flags silences them.
++ (if platformOS (targetPlatform dflags) == OSDarwin &&
platformArch (targetPlatform dflags) == ArchX86
then ["-Wl,-read_only_relocs,suppress"]
else [])
++ o_files
++ extra_ld_inputs
++ lib_path_opts
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment