[Git][ghc/ghc][wip/marge_bot_batch_merge_job] 9 commits: configure: Rip out Solaris dyld check

Marge Bot (@marge-bot) gitlab at gitlab.haskell.org
Mon Jul 3 12:59:00 UTC 2023



Marge Bot pushed to branch wip/marge_bot_batch_merge_job at Glasgow Haskell Compiler / GHC


Commits:
ee781273 by Ben Gamari at 2023-07-03T08:58:36-04:00
configure: Rip out Solaris dyld check

Solaris 11 was released over a decade ago and, moreover, I doubt we have
any Solaris users

- - - - -
b492ce64 by Ben Gamari at 2023-07-03T08:58:37-04:00
gitlab: Drop backport-for-8.8 MR template

Its usefulness has long passed.
- - - - -
c39dc7d7 by Matthew Pickering at 2023-07-03T08:58:38-04:00
Fix deprecation warning when deprecated identifier is from another module

A stray 'Just' was being printed in the deprecation message.

Fixes #23573

- - - - -
48d3ff95 by Ben Gamari at 2023-07-03T08:58:38-04:00
rts: Don't rely on initializers for sigaction_t

As noted in #23577, CentOS's ancient toolchain throws spurious
missing-field-initializer warnings.

- - - - -
ea68fa81 by Ben Gamari at 2023-07-03T08:58:38-04:00
hadrian: Don't treat -Winline warnings as fatal

Such warnings are highly dependent upon the toolchain, platform, and
build configuration. It's simply too fragile to rely on these.

- - - - -
66d5fd31 by Ben Gamari at 2023-07-03T08:58:38-04:00
hadrian: Only pass -Wno-nonportable-include-path on Darwin

This flag, which was introduced due to #17798, is only understood by
Clang and consequently throws warnings on platforms using gcc. Sadly,
there is no good way to treat such warnings as non-fatal with `-Werror`
so for now we simply make this flag specific to platforms known to use
Clang and case-insensitive filesystems (Darwin and Windows).

See #23577.

- - - - -
2ddda58b by Mario Blažević at 2023-07-03T08:58:44-04:00
Fixed ticket #23571, TH.Ppr.pprLit hanging on large numeric literals

- - - - -
5358cd8a by Matthew Pickering at 2023-07-03T08:58:45-04:00
Try deb10 for i386 bindists

- - - - -
feef8137 by Ben Gamari at 2023-07-03T08:58:45-04:00
compiler: Make OccSet opaque

- - - - -


24 changed files:

- .gitlab-ci.yml
- .gitlab/generate-ci/gen_ci.hs
- .gitlab/jobs.yaml
- − .gitlab/merge_request_templates/backport-for-8.8.md
- .gitlab/rel_eng/fetch-gitlab-artifacts/fetch_gitlab.py
- .gitlab/rel_eng/mk-ghcup-metadata/mk_ghcup_metadata.py
- compiler/GHC/Tc/Errors/Ppr.hs
- compiler/GHC/Types/Name/Occurrence.hs
- configure.ac
- hadrian/cfg/system.config.in
- hadrian/src/Flavour.hs
- hadrian/src/Oracles/Flag.hs
- hadrian/src/Settings/Warnings.hs
- libraries/template-haskell/Language/Haskell/TH/Ppr.hs
- m4/fp_hs_cpp_cmd_with_args.m4
- mk/project.mk.in
- rts/posix/Signals.c
- testsuite/tests/th/T20454.hs
- testsuite/tests/th/T20454.stdout
- + testsuite/tests/warnings/should_compile/T23573.hs
- + testsuite/tests/warnings/should_compile/T23573.stderr
- + testsuite/tests/warnings/should_compile/T23573A.hs
- + testsuite/tests/warnings/should_compile/T23573B.hs
- testsuite/tests/warnings/should_compile/all.T


Changes:

=====================================
.gitlab-ci.yml
=====================================
@@ -2,7 +2,7 @@ variables:
   GIT_SSL_NO_VERIFY: "1"
 
   # Commit of ghc/ci-images repository from which to pull Docker images
-  DOCKER_REV: 243a00f06550e6b9a00fa0f1530d1bb761e8b7cc
+  DOCKER_REV: 96a18cc74ee973db95f33affaf743997774605db
 
   # Sequential version number of all cached things.
   # Bump to invalidate GitLab CI cache.
@@ -1048,7 +1048,7 @@ ghcup-metadata-nightly:
       artifacts: false
     - job: nightly-x86_64-linux-deb9-validate
       artifacts: false
-    - job: nightly-i386-linux-deb9-validate
+    - job: nightly-i386-linux-deb10-validate
       artifacts: false
     - job: nightly-x86_64-linux-deb10-validate
       artifacts: false


=====================================
.gitlab/generate-ci/gen_ci.hs
=====================================
@@ -913,7 +913,8 @@ job_groups =
      , standardBuilds AArch64 Darwin
      , standardBuildsWithConfig AArch64 (Linux Debian10) (splitSectionsBroken vanilla)
      , disableValidate (validateBuilds AArch64 (Linux Debian10) llvm)
-     , standardBuildsWithConfig I386 (Linux Debian9) (splitSectionsBroken vanilla)
+--     , standardBuildsWithConfig I386 (Linux Debian9) (splitSectionsBroken vanilla)
+     , standardBuildsWithConfig I386 (Linux Debian10) (splitSectionsBroken vanilla)
      -- Fully static build, in theory usable on any linux distribution.
      , fullyStaticBrokenTests (standardBuildsWithConfig Amd64 (Linux Alpine) (splitSectionsBroken static))
      -- Dynamically linked build, suitable for building your own static executables on alpine


=====================================
.gitlab/jobs.yaml
=====================================
@@ -120,7 +120,7 @@
       "TEST_ENV": "aarch64-linux-deb10-validate"
     }
   },
-  "i386-linux-deb9-validate": {
+  "i386-linux-deb10-validate": {
     "after_script": [
       ".gitlab/ci.sh save_cache",
       ".gitlab/ci.sh clean",
@@ -130,7 +130,7 @@
     "artifacts": {
       "expire_in": "2 weeks",
       "paths": [
-        "ghc-i386-linux-deb9-validate.tar.xz",
+        "ghc-i386-linux-deb10-validate.tar.xz",
         "junit.xml"
       ],
       "reports": {
@@ -139,14 +139,14 @@
       "when": "always"
     },
     "cache": {
-      "key": "i386-linux-deb9-$CACHE_REV",
+      "key": "i386-linux-deb10-$CACHE_REV",
       "paths": [
         "cabal-cache",
         "toolchain"
       ]
     },
     "dependencies": [],
-    "image": "registry.gitlab.haskell.org/ghc/ci-images/i386-linux-deb9:$DOCKER_REV",
+    "image": "registry.gitlab.haskell.org/ghc/ci-images/i386-linux-deb10:$DOCKER_REV",
     "needs": [
       {
         "artifacts": false,
@@ -172,10 +172,10 @@
     ],
     "variables": {
       "BIGNUM_BACKEND": "gmp",
-      "BIN_DIST_NAME": "ghc-i386-linux-deb9-validate",
+      "BIN_DIST_NAME": "ghc-i386-linux-deb10-validate",
       "BUILD_FLAVOUR": "validate",
       "CONFIGURE_ARGS": "",
-      "TEST_ENV": "i386-linux-deb9-validate"
+      "TEST_ENV": "i386-linux-deb10-validate"
     }
   },
   "nightly-aarch64-darwin-validate": {
@@ -359,7 +359,7 @@
       "XZ_OPT": "-9"
     }
   },
-  "nightly-i386-linux-deb9-validate": {
+  "nightly-i386-linux-deb10-validate": {
     "after_script": [
       ".gitlab/ci.sh save_cache",
       ".gitlab/ci.sh clean",
@@ -369,7 +369,7 @@
     "artifacts": {
       "expire_in": "8 weeks",
       "paths": [
-        "ghc-i386-linux-deb9-validate.tar.xz",
+        "ghc-i386-linux-deb10-validate.tar.xz",
         "junit.xml"
       ],
       "reports": {
@@ -378,14 +378,14 @@
       "when": "always"
     },
     "cache": {
-      "key": "i386-linux-deb9-$CACHE_REV",
+      "key": "i386-linux-deb10-$CACHE_REV",
       "paths": [
         "cabal-cache",
         "toolchain"
       ]
     },
     "dependencies": [],
-    "image": "registry.gitlab.haskell.org/ghc/ci-images/i386-linux-deb9:$DOCKER_REV",
+    "image": "registry.gitlab.haskell.org/ghc/ci-images/i386-linux-deb10:$DOCKER_REV",
     "needs": [
       {
         "artifacts": false,
@@ -411,10 +411,10 @@
     ],
     "variables": {
       "BIGNUM_BACKEND": "gmp",
-      "BIN_DIST_NAME": "ghc-i386-linux-deb9-validate",
+      "BIN_DIST_NAME": "ghc-i386-linux-deb10-validate",
       "BUILD_FLAVOUR": "validate",
       "CONFIGURE_ARGS": "",
-      "TEST_ENV": "i386-linux-deb9-validate",
+      "TEST_ENV": "i386-linux-deb10-validate",
       "XZ_OPT": "-9"
     }
   },
@@ -2355,7 +2355,7 @@
       "XZ_OPT": "-9"
     }
   },
-  "release-i386-linux-deb9-release+no_split_sections": {
+  "release-i386-linux-deb10-release+no_split_sections": {
     "after_script": [
       ".gitlab/ci.sh save_cache",
       ".gitlab/ci.sh clean",
@@ -2365,7 +2365,7 @@
     "artifacts": {
       "expire_in": "1 year",
       "paths": [
-        "ghc-i386-linux-deb9-release+no_split_sections.tar.xz",
+        "ghc-i386-linux-deb10-release+no_split_sections.tar.xz",
         "junit.xml"
       ],
       "reports": {
@@ -2374,14 +2374,14 @@
       "when": "always"
     },
     "cache": {
-      "key": "i386-linux-deb9-$CACHE_REV",
+      "key": "i386-linux-deb10-$CACHE_REV",
       "paths": [
         "cabal-cache",
         "toolchain"
       ]
     },
     "dependencies": [],
-    "image": "registry.gitlab.haskell.org/ghc/ci-images/i386-linux-deb9:$DOCKER_REV",
+    "image": "registry.gitlab.haskell.org/ghc/ci-images/i386-linux-deb10:$DOCKER_REV",
     "needs": [
       {
         "artifacts": false,
@@ -2407,12 +2407,12 @@
     ],
     "variables": {
       "BIGNUM_BACKEND": "gmp",
-      "BIN_DIST_NAME": "ghc-i386-linux-deb9-release+no_split_sections",
+      "BIN_DIST_NAME": "ghc-i386-linux-deb10-release+no_split_sections",
       "BUILD_FLAVOUR": "release+no_split_sections",
       "CONFIGURE_ARGS": "",
       "HADRIAN_ARGS": "--hash-unit-ids",
       "IGNORE_PERF_FAILURES": "all",
-      "TEST_ENV": "i386-linux-deb9-release+no_split_sections",
+      "TEST_ENV": "i386-linux-deb10-release+no_split_sections",
       "XZ_OPT": "-9"
     }
   },


=====================================
.gitlab/merge_request_templates/backport-for-8.8.md deleted
=====================================
@@ -1,11 +0,0 @@
-Thank you for help in maintaining GHC's stable branch!
-
-Please take a few moments to verify the following:
-
- * [ ] the issue that this backport fixes is milestoned for the target release.
-
-If you have any questions don't hesitate to open your merge request and inquire
-in a comment.
-
-/label ~backport
-/milestone %8.8.1


=====================================
.gitlab/rel_eng/fetch-gitlab-artifacts/fetch_gitlab.py
=====================================
@@ -34,6 +34,7 @@ def job_triple(job_name):
         'release-x86_64-linux-alpine3_12-int_native-release+fully_static': 'x86_64-alpine3_12-linux-static-int_native',
         'release-x86_64-darwin-release': 'x86_64-apple-darwin',
         'release-i386-linux-deb9-release': 'i386-deb9-linux',
+        'release-i386-linux-deb10-release': 'i386-deb10-linux',
         'release-armv7-linux-deb10-release': 'armv7-deb10-linux',
         'release-aarch64-linux-deb10-release': 'aarch64-deb10-linux',
         'release-aarch64-darwin-release': 'aarch64-apple-darwin',


=====================================
.gitlab/rel_eng/mk-ghcup-metadata/mk_ghcup_metadata.py
=====================================
@@ -191,7 +191,7 @@ def mk_new_yaml(release_mode, version, date, pipeline_type, job_map):
     deb10 = mk(debian("x86_64", 10))
     deb11 = mk(debian("x86_64", 11))
     deb10_arm64 = mk(debian("aarch64", 10))
-    deb9_i386 = mk(debian("i386", 9))
+    deb10_i386 = mk(debian("i386", 10))
 
     source = mk_one_metadata(release_mode, version, job_map, source_artifact)
     test = mk_one_metadata(release_mode, version, job_map, test_artifact)
@@ -221,10 +221,10 @@ def mk_new_yaml(release_mode, version, date, pipeline_type, job_map):
 
           }
 
-    a32 = { "Linux_Debian": { "<10": deb9_i386, "unknown_versioning": deb9_i386 }
-          , "Linux_Ubuntu": { "unknown_versioning": deb9_i386 }
-          , "Linux_Mint" : { "unknown_versioning": deb9_i386 }
-          , "Linux_UnknownLinux" : { "unknown_versioning": deb9_i386 }
+    a32 = { "Linux_Debian": { "unknown_versioning": deb10_i386 }
+          , "Linux_Ubuntu": { "unknown_versioning": deb10_i386 }
+          , "Linux_Mint" : { "unknown_versioning": deb10_i386 }
+          , "Linux_UnknownLinux" : { "unknown_versioning": deb10_i386 }
           }
 
     arm64 = { "Linux_UnknownLinux": { "unknown_versioning": deb10_arm64 }


=====================================
compiler/GHC/Tc/Errors/Ppr.hs
=====================================
@@ -1099,8 +1099,11 @@ instance Diagnostic TcRnMessage where
           , pprWarningTxtForMsg pragma_warning_msg ]
           where
             impMsg  = text "imported from" <+> ppr pragma_warning_import_mod <> extra
-            extra | maybe True (pragma_warning_import_mod ==) pragma_warning_defined_mod = empty
-                  | otherwise = text ", but defined in" <+> ppr pragma_warning_defined_mod
+            extra = case pragma_warning_defined_mod of
+                      Just def_mod
+                        | def_mod /= pragma_warning_import_mod
+                          -> text ", but defined in" <+> ppr def_mod
+                      _ -> empty
     TcRnDifferentExportWarnings name locs
       -> mkSimpleDecorated $ vcat [quotes (ppr name) <+> text "exported with different error messages",
                                    text "at" <+> vcat (map ppr $ sortBy leftmost_smallest $ NE.toList locs)]


=====================================
compiler/GHC/Types/Name/Occurrence.hs
=====================================
@@ -809,7 +809,7 @@ forceOccEnv nf (MkOccEnv fs) = seqEltsUFM (seqEltsUFM nf) fs
 
 --------------------------------------------------------------------------------
 
-type OccSet = FastStringEnv (UniqSet NameSpace)
+newtype OccSet = OccSet (FastStringEnv (UniqSet NameSpace))
 
 emptyOccSet       :: OccSet
 unitOccSet        :: OccName -> OccSet
@@ -821,15 +821,15 @@ unionManyOccSets  :: [OccSet] -> OccSet
 elemOccSet        :: OccName -> OccSet -> Bool
 isEmptyOccSet     :: OccSet -> Bool
 
-emptyOccSet       = emptyFsEnv
-unitOccSet (OccName ns s) = unitFsEnv s (unitUniqSet ns)
+emptyOccSet       = OccSet emptyFsEnv
+unitOccSet (OccName ns s) = OccSet $ unitFsEnv s (unitUniqSet ns)
 mkOccSet          = extendOccSetList emptyOccSet
-extendOccSet      occs (OccName ns s) = extendFsEnv occs s (unitUniqSet ns)
-extendOccSetList  = foldl extendOccSet
-unionOccSets      = plusFsEnv_C unionUniqSets
+extendOccSet      (OccSet occs) (OccName ns s) = OccSet $ extendFsEnv occs s (unitUniqSet ns)
+extendOccSetList  = foldl' extendOccSet
+unionOccSets      (OccSet xs) (OccSet ys) = OccSet $ plusFsEnv_C unionUniqSets xs ys
 unionManyOccSets  = foldl' unionOccSets emptyOccSet
-elemOccSet (OccName ns s) occs = maybe False (elementOfUniqSet ns) $ lookupFsEnv occs s
-isEmptyOccSet     = isNullUFM
+elemOccSet (OccName ns s) (OccSet occs) = maybe False (elementOfUniqSet ns) $ lookupFsEnv occs s
+isEmptyOccSet     (OccSet occs) = isNullUFM occs
 
 {-
 ************************************************************************


=====================================
configure.ac
=====================================
@@ -298,23 +298,6 @@ then
     exit 1
 fi
 
-# Testing if we shall enable shared libs support on Solaris.
-# Anything older than SunOS 5.11 aka Solaris 11 (Express) is broken.
-
-SOLARIS_BROKEN_SHLD=NO
-
-case $host in
-     i386-*-solaris2)
-     # here we go with the test
-     MINOR=`uname -r|cut -d '.' -f 2-`
-     if test "$MINOR" -lt "11"; then
-         SOLARIS_BROKEN_SHLD=YES
-     fi
-     ;;
-esac
-
-AC_SUBST(SOLARIS_BROKEN_SHLD)
-
 dnl ** Do an unregisterised build?
 dnl --------------------------------------------------------------
 


=====================================
hadrian/cfg/system.config.in
=====================================
@@ -51,7 +51,6 @@ hs-cpp-args               = @HaskellCPPArgs@
 # Build options:
 #===============
 
-solaris-broken-shld  = @SOLARIS_BROKEN_SHLD@
 ghc-unregisterised   = @Unregisterised@
 tables-next-to-code  = @TablesNextToCode@
 use-libffi-for-adjustors = @UseLibffiForAdjustors@


=====================================
hadrian/src/Flavour.hs
=====================================
@@ -142,6 +142,8 @@ werror =
           [ arg "-optc-Werror"
             -- clang complains about #pragma GCC pragmas
           , arg "-optc-Wno-error=unknown-pragmas"
+            -- rejected inlinings are highly dependent upon toolchain and way
+          , arg "-optc-Wno-error=inline"
           ]
       -- N.B. We currently don't build the boot libraries' C sources with -Werror
       -- as this tends to be a portability nightmare.


=====================================
hadrian/src/Oracles/Flag.hs
=====================================
@@ -28,7 +28,6 @@ data Flag = ArSupportsAtFile
           | GmpInTree
           | GmpFrameworkPref
           | LeadingUnderscore
-          | SolarisBrokenShld
           | UseSystemFfi
           | BootstrapThreadedRts
           | BootstrapEventLoggingRts
@@ -60,7 +59,6 @@ flag f = do
             GmpInTree            -> "intree-gmp"
             GmpFrameworkPref     -> "gmp-framework-preferred"
             LeadingUnderscore    -> "leading-underscore"
-            SolarisBrokenShld    -> "solaris-broken-shld"
             UseSystemFfi         -> "use-system-ffi"
             BootstrapThreadedRts -> "bootstrap-threaded-rts"
             BootstrapEventLoggingRts -> "bootstrap-event-logging-rts"
@@ -105,8 +103,7 @@ platformSupportsSharedLibs = do
     ppc_linux     <- anyTargetPlatform [ "powerpc-unknown-linux" ]
     solaris       <- anyTargetPlatform [ "i386-unknown-solaris2" ]
     javascript    <- anyTargetArch     [ "javascript" ]
-    solarisBroken <- flag SolarisBrokenShld
-    return $ not (windows || wasm || javascript || ppc_linux || solaris && solarisBroken)
+    return $ not (windows || wasm || javascript || ppc_linux || solaris)
 
 -- | Does the target support threaded RTS?
 targetSupportsThreadedRts :: Action Bool


=====================================
hadrian/src/Settings/Warnings.hs
=====================================
@@ -2,6 +2,7 @@ module Settings.Warnings (defaultGhcWarningsArgs, ghcWarningsArgs) where
 
 import Expression
 import Oracles.Flag
+import Oracles.Setting (isOsxTarget, isWinTarget)
 import Packages
 
 -- See @mk/warnings.mk@ for warning-related arguments in the Make build system.
@@ -12,7 +13,11 @@ defaultGhcWarningsArgs = mconcat
     [ notStage0 ? arg "-Wnoncanonical-monad-instances"
     , notM (flag CcLlvmBackend) ? arg "-optc-Wno-error=inline"
     , flag CcLlvmBackend ? arg "-optc-Wno-unknown-pragmas"
-    , arg "-optP-Wno-nonportable-include-path" -- #17798
+      -- Cabal can seemingly produce filepaths with incorrect case on filesystems
+      -- with case-insensitive names. Ignore such issues for now as they seem benign.
+      -- See #17798.
+    , isOsxTarget ? arg "-optP-Wno-nonportable-include-path"
+    , isWinTarget ? arg "-optP-Wno-nonportable-include-path"
     ]
 
 -- | Package-specific warnings-related arguments, mostly suppressing various warnings.


=====================================
libraries/template-haskell/Language/Haskell/TH/Ppr.hs
=====================================
@@ -302,27 +302,28 @@ pprLit _ (StringPrimL s) = pprString (bytesToString s) <> char '#'
 pprLit _ (BytesPrimL {}) = pprString "<binary data>"
 pprLit i (RationalL rat)
   | withoutFactor 2 (withoutFactor 5 $ denominator rat) /= 1
-  -- if the denominator has prime factors other than 2 and 5, show as fraction
+  -- if the denominator has prime factors other than 2 and 5
+  -- or can't be represented as Double, show as fraction
   = parensIf (i > noPrec) $
     integer (numerator rat) <+> char '/' <+> integer (denominator rat)
-  | rat /= 0 && (zeroes < -1 || zeroes > 7),
-    let (n, d) = properFraction (rat' / magnitude)
-        (rat', zeroes')
-          | abs rat < 1 = (10 * rat, zeroes - 1)
-          | otherwise = (rat, zeroes)
+  | rat /= 0 && (zeroes < -2 || zeroes > 6),
+    let (n, d) = properFraction (rat / magnitude)
   -- if < 0.01 or >= 100_000_000, use scientific notation
   = parensIf (i > noPrec && rat < 0)
              (integer n
               <> (if d == 0 then empty else char '.' <> decimals (abs d))
-              <> char 'e' <> integer zeroes')
+              <> char 'e' <> integer zeroes)
   | let (n, d) = properFraction rat
   = parensIf (i > noPrec && rat < 0)
              (integer n <> char '.'
               <> if d == 0 then char '0' else decimals (abs d))
   where zeroes :: Integer
-        zeroes = truncate (logBase 10 (abs (fromRational rat) :: Double)
-                           * (1 - epsilon))
-        epsilon = 0.0000001
+        zeroes = log10 (abs rat)
+        log10 :: Rational -> Integer
+        log10 x
+          | x >= 10 = 1 + log10 (x / 10)
+          | x < 1 = -1 + log10 (x * 10)
+          | otherwise = 0
         magnitude :: Rational
         magnitude = 10 ^^ zeroes
         withoutFactor :: Integer -> Integer -> Integer


=====================================
m4/fp_hs_cpp_cmd_with_args.m4
=====================================
@@ -25,36 +25,6 @@ AC_ARG_WITH(hs-cpp,
     # command (no flags), and AC_PROG_CPP defines CPP as "/usr/bin/gcc -E".
     HS_CPP_CMD=$CC
 
-    SOLARIS_GCC_CPP_BROKEN=NO
-    SOLARIS_FOUND_GOOD_CPP=NO
-    case $host in
-        i386-*-solaris2)
-        GCC_MAJOR_MINOR=`$CC --version|grep "gcc (GCC)"|cut -d ' ' -f 3-3|cut -d '.' -f 1-2`
-        if test "$GCC_MAJOR_MINOR" != "3.4"; then
-          # this is not 3.4.x release so with broken CPP
-          SOLARIS_GCC_CPP_BROKEN=YES
-        fi
-        ;;
-    esac
-
-    if test "$SOLARIS_GCC_CPP_BROKEN" = "YES"; then
-      # let's try to find if GNU C 3.4.x is installed
-      if test -x /usr/sfw/bin/gcc; then
-        # something executable is in expected path so let's
-        # see if it's really GNU C
-        NEW_GCC_MAJOR_MINOR=`/usr/sfw/bin/gcc --version|grep "gcc (GCC)"|cut -d ' ' -f 3-3|cut -d '.' -f 1-2`
-        if test "$NEW_GCC_MAJOR_MINOR" = "3.4"; then
-          # this is GNU C 3.4.x which provides non-broken CPP on Solaris
-          # let's use it as CPP then.
-          HS_CPP_CMD=/usr/sfw/bin/gcc
-          SOLARIS_FOUND_GOOD_CPP=YES
-        fi
-      fi
-      if test "$SOLARIS_FOUND_GOOD_CPP" = "NO"; then
-        AC_MSG_WARN([Your GNU C provides broken CPP and you do not have GNU C 3.4.x installed.])
-        AC_MSG_WARN([Please install GNU C 3.4.x to solve this issue. It will be used as CPP only.])
-      fi
-    fi
 ]
 )
 


=====================================
mk/project.mk.in
=====================================
@@ -156,10 +156,6 @@ else
 Windows_Target=NO
 endif
 
-# In case of Solaris OS, does it provide broken shared libs
-# linker or not?
-SOLARIS_BROKEN_SHLD=@SOLARIS_BROKEN_SHLD@
-
 # Is the stage0 compiler affected by Bug #9439?
 GHC_LLVM_AFFECTED_BY_9439 = @GHC_LLVM_AFFECTED_BY_9439@
 


=====================================
rts/posix/Signals.c
=====================================
@@ -368,9 +368,11 @@ int
 stg_sig_install(int sig, int spi, void *mask)
 {
     sigset_t signals, osignals;
-    struct sigaction action;
     StgInt previous_spi;
 
+    struct sigaction action;
+    memset(&action, 0, sizeof(struct sigaction));
+
     ACQUIRE_LOCK(&sig_mutex);
 
     // Block the signal until we figure out what to do
@@ -619,6 +621,7 @@ static void
 set_sigtstp_action (bool handle)
 {
     struct sigaction sa;
+    memset(&sa, 0, sizeof(struct sigaction));
     if (handle) {
         sa.sa_handler = sigtstp_handler;
     } else {
@@ -635,7 +638,8 @@ set_sigtstp_action (bool handle)
 void
 install_vtalrm_handler(int sig, TickProc handle_tick)
 {
-    struct sigaction action = {};
+    struct sigaction action;
+    memset(&action, 0, sizeof(struct sigaction));
 
     action.sa_handler = handle_tick;
 
@@ -677,8 +681,11 @@ install_vtalrm_handler(int sig, TickProc handle_tick)
 void
 initDefaultHandlers(void)
 {
-    struct sigaction action = {};
-    struct sigaction oact = {};
+    // N.B. We can't use initializers here as CentOS's ancient toolchain throws
+    // spurious warnings. See #23577.
+    struct sigaction action, oact;
+    memset(&oact, 0, sizeof(struct sigaction));
+    memset(&action, 0, sizeof(struct sigaction));
 
     // install the SIGINT handler
     action.sa_handler = shutdown_handler;


=====================================
testsuite/tests/th/T20454.hs
=====================================
@@ -8,6 +8,7 @@ e1, e2 :: ExpQ
 
 e1 = [|   -- Test the Template Haskell pretty-printing of rational literals
      [0.0, 123.0, -321.0, 9e3, 10000.0, -500000000.0, 345e67, -456e78,
+      1e400, -1e400, -- T23571
       0.01, -0.002, 0.04e-56, -0.3e-65,
       0.33333333333333333333333333333, $(pure $ LitE $ RationalL $ 1/3)]
      |]


=====================================
testsuite/tests/th/T20454.stdout
=====================================
@@ -6,6 +6,8 @@
  -5e8,
  3.45e69,
  -4.56e80,
+ 1e400,
+ -1e400,
  0.01,
  -2e-3,
  4e-58,


=====================================
testsuite/tests/warnings/should_compile/T23573.hs
=====================================
@@ -0,0 +1,5 @@
+module T23573 where
+
+import T23573A
+
+foo = deprec


=====================================
testsuite/tests/warnings/should_compile/T23573.stderr
=====================================
@@ -0,0 +1,5 @@
+
+T23573.hs:5:7: warning: [GHC-68441] [-Wdeprecations (in -Wextended-warnings)]
+    In the use of ‘deprec’
+    (imported from T23573A, but defined in T23573B):
+    Deprecated: "deprec"


=====================================
testsuite/tests/warnings/should_compile/T23573A.hs
=====================================
@@ -0,0 +1,5 @@
+module T23573A(module T23573B) where
+
+import T23573B
+
+


=====================================
testsuite/tests/warnings/should_compile/T23573B.hs
=====================================
@@ -0,0 +1,4 @@
+module T23573B where
+
+{-# DEPRECATED deprec "deprec" #-}
+deprec = ()


=====================================
testsuite/tests/warnings/should_compile/all.T
=====================================
@@ -65,3 +65,4 @@ test('DodgyImports_hiding', normal, compile, ['-Wdodgy-imports'])
 test('T22702a', normal, compile, [''])
 test('T22702b', normal, compile, [''])
 test('T22826', normal, compile, [''])
+test('T23573', [extra_files(["T23573.hs", "T23573A.hs", "T23573B.hs"])], multimod_compile, ['T23573', '-v0'])



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/ed39792e683bf76fc7c97f462b5bcfbbc3459e00...feef8137bbb1d2d4c99abd0d0dbf254151e691cc

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/ed39792e683bf76fc7c97f462b5bcfbbc3459e00...feef8137bbb1d2d4c99abd0d0dbf254151e691cc
You're receiving this email because of your account on gitlab.haskell.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20230703/36b1abcf/attachment-0001.html>


More information about the ghc-commits mailing list