+#else
+ -----------------------------------------------------------------------------
+ -- Making a DSO
+ -----------------------------------------------------------------------------
+ -- opts from -optl-<blah>
+ let extra_ld_opts = getOpts dflags opt_l
+ let output_fn = case o_file of { Just s -> s; Nothing -> "a.out"; }
+
+ SysTools.runLink dflags
+ ([ SysTools.Option verb
+ , SysTools.Option "-o"
+ , SysTools.FileOption "" output_fn
+ ]
+ ++ map SysTools.Option (
+ md_c_flags
+ ++ o_files
+ ++ [ "-shared", "-Wl,-Bsymbolic" ] -- we need symbolic linking to resolve non-PIC intra-package-relocations
+ ++ extra_ld_inputs
+ ++ lib_path_opts
+ ++ extra_ld_opts
+ ++ pkg_lib_path_opts
+ ++ pkg_link_opts
+ ))
+#endif