Commit b9b94ec8 authored by kgardas's avatar kgardas Committed by Austin Seipp
Browse files

Fix binary linking errors on Solaris

The -u option must be placed before libraries which define the necessary
Signed-off-by: default avatarAustin Seipp <>
parent 59182e42
......@@ -1800,7 +1800,16 @@ linkBinary' staticLink dflags o_files dep_packages = do
-- HS packages, because libtool doesn't accept other options.
-- In the case of iOS these need to be added by hand to the
-- final link in Xcode.
else package_hs_libs ++ extra_libs ++ other_flags
else other_flags ++ package_hs_libs ++ extra_libs -- -Wl,-u,<sym> contained in other_flags
-- needs to be put before -l<package>,
-- otherwise Solaris linker fails linking
-- a binary with unresolved symbols in RTS
-- which are defined in base package
-- the reason for this is a note in ld(1) about
-- '-u' option: "The placement of this option
-- on the command line is significant.
-- This option must be placed before the library
-- that defines the symbol."
pkg_framework_path_opts <-
if platformUsesFrameworks platform
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