X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Fdriver%2FPackageSrc.hs;h=85f56cc917aa1b197330553fc0fae09d810a5789;hb=c82797403c38487a95452471653dcc1e6149a6e6;hp=09762b8ebb357ee967f1667bc1a4fe4b7d8322c6;hpb=776b2a09899f1473c6dcc7e8a094b1a697439c37;p=ghc-hetmet.git diff --git a/ghc/driver/PackageSrc.hs b/ghc/driver/PackageSrc.hs index 09762b8..85f56cc 100644 --- a/ghc/driver/PackageSrc.hs +++ b/ghc/driver/PackageSrc.hs @@ -65,12 +65,16 @@ package_details installing else [ ghc_src_dir cGHC_RUNTIME_DIR ], hs_libraries = [ "HSrts" ], #ifndef mingw32_TARGET_OS - extra_libraries = [], + extra_libraries = [ "m" ], -- libm, that is, for ldexp() #else extra_libraries = [ "winmm", "wsock32" ], -- winmm for the threadDelay timer, wsock32 for the linker #endif include_dirs = if installing - then [ "$libdir/includes" ] + then [ "$libdir/include" +#ifdef mingw32_TARGET_OS + , "$libdir/include/mingw" +#endif + ] else [ ghc_src_dir cGHC_INCLUDE_DIR ], c_includes = [ "Stg.h" ], -- ha! package_deps = [ "gmp" ], @@ -78,11 +82,13 @@ package_details installing extra_cc_opts = [], -- the RTS forward-references to a bunch of stuff in the prelude, -- so we force it to be included with special options to ld. - extra_ld_opts = map ( + extra_ld_opts = + foldr (\ x xs -> "-u" : x : xs) [] + (map ( #ifndef LEADING_UNDERSCORE - "-u " + "" #else - "-u _" + "_" #endif ++ ) [ "PrelBase_Izh_static_info" @@ -115,7 +121,7 @@ package_details installing , "PrelIOBase_BlockedOnDeadMVar_closure" , "PrelWeak_runFinalizzerBatch_closure" , "__init_Prelude" - ] + ]) }, Package { @@ -133,14 +139,18 @@ package_details installing # ifndef mingw32_TARGET_OS [ "HSstd" ] # else + -- This splitting is the subject of a totally + -- horrible hack, which glues HSstd1 and HSstd2 + -- back into HSstd for the purposes of static linking. + -- See DriverState.getPackageLibraries for details. [ "HSstd1", "HSstd2" ] # endif , extra_libraries = [ "HSstd_cbits" ] ++ # ifdef mingw32_TARGET_OS - ["wsock32", "msvcrt"] + [ "wsock32", "msvcrt" ] # else - ["m"] -- libm, that is + [ "m" ] -- libm, that is # endif , include_dirs = if installing @@ -175,9 +185,9 @@ package_details installing extra_cc_opts = [], extra_ld_opts = [ #ifndef LEADING_UNDERSCORE - "-u Addr_Azh_static_info" + "-u", "Addr_Azh_static_info" #else - "-u _Addr_Azh_static_info" + "-u", "_Addr_Azh_static_info" #endif ] }, @@ -312,7 +322,11 @@ package_details installing else [ "$libdir/hslibs/util" , "$libdir/hslibs/util/cbits" ], hs_libraries = [ "HSutil" ], - extra_libraries = [ "HSutil_cbits" ] ++ words cLibsReadline, + extra_libraries = [ "HSutil_cbits" ] +#ifndef mingw32_TARGET_OS + ++ words cLibsReadline +#endif + , include_dirs = if installing then [] else [ "$libdir/hslibs/util/cbits" ], @@ -429,6 +443,23 @@ package_details installing extra_ld_opts = [] } + ,Package { + name = "HGL", + import_dirs = if installing + then [ "$libdir/imports/HGL" ] + else [ "$libdir/hslibs/graphics/lib/x11" ], + source_dirs = [], + library_dirs = [], + hs_libraries = [ "HSHGL" ], + extra_libraries= [], + include_dirs = [], + c_includes = [], + package_deps = [ "xlib", "concurrent" ], + extra_ghc_opts = [], + extra_cc_opts = [], + extra_ld_opts = [] + } + ] where ghc_src_dir :: String -> String