Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC

Commits:

3 changed files:

Changes:

  • hadrian/src/Rules/Gmp.hs
    ... ... @@ -126,6 +126,12 @@ gmpRules = do
    126 126
                     interpretInContext ctx $
    
    127 127
                     mconcat
    
    128 128
                         [ getStagedCCFlags
    
    129
    +                    -- gmp fails to configure with newer compilers
    
    130
    +                    -- that default to c23:
    
    131
    +                    -- https://gmplib.org/list-archives/gmp-devel/2025-January/006279.html.
    
    132
    +                    -- for now just manually specify -std=gnu11 until
    
    133
    +                    -- next upstream release.
    
    134
    +                    , arg "-std=gnu11"
    
    129 135
                         -- gmp symbols are only used by bignum logic in
    
    130 136
                         -- ghc-internal and shouldn't be exported by the
    
    131 137
                         -- ghc-internal shared library.
    

  • libraries/ghc-internal/configure.ac
    ... ... @@ -195,28 +195,10 @@ dnl--------------------------------------------------------------------
    195 195
        if test "$HaveFrameworkGMP" = "YES" || test "$HaveLibGmp" = "YES"
    
    196 196
        then
    
    197 197
            AC_MSG_RESULT([no])
    
    198
    -       UseIntreeGmp=0
    
    199 198
            AC_CHECK_HEADER([gmp.h], , [AC_MSG_ERROR([Cannot find gmp.h])])
    
    200
    -
    
    201
    -       AC_MSG_CHECKING([GMP version])
    
    202
    -       AC_COMPUTE_INT(GhcGmpVerMj, __GNU_MP_VERSION, [#include <gmp.h>],
    
    203
    -           AC_MSG_ERROR([Unable to get value of __GNU_MP_VERSION]))
    
    204
    -       AC_COMPUTE_INT(GhcGmpVerMi, __GNU_MP_VERSION_MINOR, [#include <gmp.h>],
    
    205
    -           AC_MSG_ERROR([Unable to get value of __GNU_MP_VERSION_MINOR]))
    
    206
    -       AC_COMPUTE_INT(GhcGmpVerPl, __GNU_MP_VERSION_PATCHLEVEL, [#include <gmp.h>],
    
    207
    -           AC_MSG_ERROR([Unable to get value of __GNU_MP_VERSION_PATCHLEVEL]))
    
    208
    -       AC_MSG_RESULT([$GhcGmpVerMj.$GhcGmpVerMi.$GhcGmpVerPl])
    
    209
    -
    
    210 199
        else
    
    211 200
            AC_MSG_RESULT([yes])
    
    212
    -       UseIntreeGmp=1
    
    213 201
            HaveSecurePowm=1
    
    214
    -
    
    215
    -       AC_MSG_CHECKING([GMP version])
    
    216
    -       GhcGmpVerMj=6
    
    217
    -       GhcGmpVerMi=1
    
    218
    -       GhcGmpVerPl=2
    
    219
    -       AC_MSG_RESULT([$GhcGmpVerMj.$GhcGmpVerMi.$GhcGmpVerPl])
    
    220 202
        fi
    
    221 203
     
    
    222 204
        GMP_INSTALL_INCLUDES="HsIntegerGmp.h ghc-gmp.h"
    
    ... ... @@ -231,10 +213,6 @@ AC_SUBST(GMP_INSTALL_INCLUDES)
    231 213
     AC_SUBST(HaveLibGmp)
    
    232 214
     AC_SUBST(HaveFrameworkGMP)
    
    233 215
     AC_SUBST(HaveSecurePowm)
    
    234
    -AC_SUBST(UseIntreeGmp)
    
    235
    -AC_SUBST(GhcGmpVerMj)
    
    236
    -AC_SUBST(GhcGmpVerMi)
    
    237
    -AC_SUBST(GhcGmpVerPl)
    
    238 216
     
    
    239 217
     # Compute offsets/sizes used by jsbits/base.js
    
    240 218
     if test "$host" = "javascript-ghcjs"
    

  • libraries/ghc-internal/include/HsIntegerGmp.h.in
    1 1
     #pragma once
    
    2 2
     
    
    3
    -/* Whether GMP is embedded into ghc-internal */
    
    4
    -#define GHC_GMP_INTREE     @UseIntreeGmp@
    
    5
    -
    
    6
    -/* The following values denote the GMP version used during GHC build-time */
    
    7
    -#define GHC_GMP_VERSION_MJ @GhcGmpVerMj@
    
    8
    -#define GHC_GMP_VERSION_MI @GhcGmpVerMi@
    
    9
    -#define GHC_GMP_VERSION_PL @GhcGmpVerPl@
    
    10
    -#define GHC_GMP_VERSION \
    
    11
    -    (@GhcGmpVerMj@ * 10000 + @GhcGmpVerMi@ * 100 + @GhcGmpVerPl@)
    
    12
    -
    
    13 3
     /* Whether GMP supports mpz_powm_sec */
    
    14 4
     #define HAVE_SECURE_POWM @HaveSecurePowm@