diff --git a/libraries/ghc-internal/src/GHC/Internal/System/Posix/Internals.hs b/libraries/ghc-internal/src/GHC/Internal/System/Posix/Internals.hs index 7fd0fe75159d..a5dd56061228 100644 --- a/libraries/ghc-internal/src/GHC/Internal/System/Posix/Internals.hs +++ b/libraries/ghc-internal/src/GHC/Internal/System/Posix/Internals.hs @@ -97,7 +97,11 @@ data {-# CTYPE "struct stat" #-} CStat data {-# CTYPE "struct termios" #-} CTermios data {-# CTYPE "struct tm" #-} CTm data {-# CTYPE "struct tms" #-} CTms +#if defined(mingw32_HOST_OS) +data {-# CTYPE "struct _utimbuf" #-} CUtimbuf +#else data {-# CTYPE "struct utimbuf" #-} CUtimbuf +#endif data {-# CTYPE "struct utsname" #-} CUtsname type FD = CInt diff --git a/testsuite/driver/testlib.py b/testsuite/driver/testlib.py index 9c0c6f11f8bb..a802a4708201 100644 --- a/testsuite/driver/testlib.py +++ b/testsuite/driver/testlib.py @@ -3061,6 +3061,8 @@ def normalise_errmsg(s: str) -> str: s = re.sub('ld: warning: -sdk_version and -platform_version are not compatible, ignoring -sdk_version','',s) # ignore superfluous dylibs passed to the linker. s = re.sub('ld: warning: .*, ignoring unexpected dylib file\n','',s) + # ignore macOS ld warning about reexported libraries (e.g. Homebrew llvm libunwind) + s = re.sub('ld: warning: reexported library with install name .* couldn.t be matched with any parent library and will be linked directly\n','',s) # ignore LLVM Version mismatch garbage; this will just break tests. s = re.sub('You are using an unsupported version of LLVM!.*\n','',s) s = re.sub('Currently only [\\.0-9]+ is supported. System LLVM version: [\\.0-9]+.*\n','',s) @@ -3175,6 +3177,8 @@ def normalise_output( s: str ) -> str: s = re.sub('ld: warning: -sdk_version and -platform_version are not compatible, ignoring -sdk_version','',s) # ignore superfluous dylibs passed to the linker. s = re.sub('ld: warning: .*, ignoring unexpected dylib file\n','',s) + # ignore macOS ld warning about reexported libraries (e.g. Homebrew llvm libunwind) + s = re.sub('ld: warning: reexported library with install name .* couldn.t be matched with any parent library and will be linked directly\n','',s) # ignore LLVM Version mismatch garbage; this will just break tests. s = re.sub('You are using an unsupported version of LLVM!.*\n','',s) s = re.sub('Currently only [\\.0-9]+ is supported. System LLVM version: [\\.0-9]+.*\n','',s) diff --git a/utils/deriveConstants/Main.hs b/utils/deriveConstants/Main.hs index 2fe21e23e4af..9ad55456309a 100644 --- a/utils/deriveConstants/Main.hs +++ b/utils/deriveConstants/Main.hs @@ -137,7 +137,10 @@ parseArgs = do args <- getArgs f opts ("-o" : fn : args') = f (opts {o_outputFilename = Just fn}) args' f opts ("--gcc-program" : prog : args') - = f (opts {o_gccProg = Just prog}) args' + = case words prog of + (p:flags) -> f (opts {o_gccProg = Just p, + o_gccFlags = flags ++ o_gccFlags opts}) args' + [] -> f (opts {o_gccProg = Just prog}) args' f opts ("--gcc-flag" : flag : args') = f (opts {o_gccFlags = flag : o_gccFlags opts}) args' f opts ("--nm-program" : prog : args')