• [gentoo-dev] ghc support in multilib-build.eclass

    From Georg Rudoy@21:1/5 to All on Thu Aug 10 01:50:02 2023
    Hi,

    Right now, the configuration header generated for packages like
    openssl by multilib-build.eclass doesn't play nicely with ghc.
    Long story short, ghc runs `gcc -E` with `-undef`, which causes the
    `#if defined(__x86_64__)` branch (or whatever is the relevant one) to
    be missed, falling back to
    ```
    error "No ABI matched, please report a bug to bugs.gentoo.org"
    ```

    There is already a workaround for Swig in the template.
    I propose extending this workaround with a very small change, replacing
    ```
    #elif defined(SWIG)
    ```
    with
    ```
    #elif defined(SWIG) || defined(__GLASGOW_HASKELL__)
    ```
    in the template inside the eclass.

    If everybody's happy with that, I'll be also happy to open a PR with
    that change.

    --
    Georg Rudoy

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From =?UTF-8?Q?Micha=C5=82_G=C3=B3rny?=@21:1/5 to Georg Rudoy on Thu Aug 10 04:00:01 2023
    On Wed, 2023-08-09 at 18:42 -0500, Georg Rudoy wrote:
    Hi,

    Right now, the configuration header generated for packages like
    openssl by multilib-build.eclass doesn't play nicely with ghc.
    Long story short, ghc runs `gcc -E` with `-undef`, which causes the
    `#if defined(__x86_64__)` branch (or whatever is the relevant one) to
    be missed, falling back to
    ```
    error "No ABI matched, please report a bug to bugs.gentoo.org"
    ```

    /me facepalms.

    There is already a workaround for Swig in the template.
    I propose extending this workaround with a very small change, replacing
    ```
    #elif defined(SWIG)
    ```
    with
    ```
    #elif defined(SWIG) || defined(__GLASGOW_HASKELL__)
    ```
    in the template inside the eclass.

    If everybody's happy with that, I'll be also happy to open a PR with
    that change.

    Yes, please.

    --
    Best regards,
    Michał Górny

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)