Skip to content
Snippets Groups Projects
Commit e26b262b authored by Duncan Coutts's avatar Duncan Coutts
Browse files

Add warning about the use of ghc-options: -optl-Wl,-s

parent 1b91f5ec
No related branches found
No related tags found
No related merge requests found
......@@ -107,8 +107,8 @@ check True pc = Just pc
-- * Standard checks
-- ------------------------------------------------------------
-- TODO: Once we implement striping (ticket #88) we should also reject
-- ghc-options: -optl-Wl,-s.
-- TODO:
--
-- * check for unknown 'OS's and 'Arch's. This requires checking the
-- 'GenericPackageDescription' which we do not currently get passed.
......@@ -347,6 +347,14 @@ checkGhcOptions pkg =
PackageDistInexcusable $
"'ghc-options: -split-objs' is not needed. Use the --enable-split-objs configure flag."
, checkFlags ["-optl-Wl,-s"] $
PackageDistSuspicious $
"'ghc-options: -optl-Wl,-s' is not needed and is not portable to all"
++ " operating systems. Cabal 1.4 and later automatically strip"
++ " executables. Cabal also has a flag --disable-executable-stripping"
++ " which is necessary when building packages for some Linux"
++ " distributions and using '-optl-Wl,-s' prevents that from working."
, checkFlags ["-fglasgow-exts"] $
PackageDistSuspicious $
"Instead of 'ghc-options: -fglasgow-exts' it is preferable to use the 'extensions' field."
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment