Skip to content

IexMathFpu.cpp: Fix build on non-glibc (e.g. musl libc). - #798

Merged
cary-ilm merged 1 commit into
AcademySoftwareFoundation:masterfrom
nh2:fix-build-on-non-glibc-fpstate
Jul 30, 2020
Merged

cary-ilm merged 1 commit into
AcademySoftwareFoundation:masterfrom
nh2:fix-build-on-non-glibc-fpstate

Conversation

@nh2

@nh2 nh2 commented Jul 30, 2020

Copy link
Copy Markdown
Contributor

Originally from:
https://github.com/void-linux/void-packages/blob/80bbc168faa25448bd3399f4df331b836e74b85c/srcpkgs/ilmbase/patches/musl-_fpstate.patch

Fixes error:

IlmBase/IexMath/IexMathFpu.cpp: In function ‘void Iex_2_4::FpuControl::restoreControlRegs(const ucontext_t&, bool)’:
IlmBase/IexMath/IexMathFpu.cpp:284:38: error: ‘struct _fpstate’ has no member named ‘cw’; did you mean ‘cwd’?
  284 |     setCw ((ucon.uc_mcontext.fpregs->cw & cwRestoreMask) | cwRestoreVal);
      |                                      ^~
      |                                      cwd
IlmBase/IexMath/IexMathFpu.cpp:287:20: error: ‘struct Iex_2_4::FpuControl::_fpstate_64’ has no member named ‘magic’
  287 |     setMxcsr (kfp->magic == 0 ? kfp->mxcsr : 0, clearExceptions);
      |                    ^~~~~

Originally from:
https://github.com/void-linux/void-packages/blob/80bbc168faa25448bd3399f4df331b836e74b85c/srcpkgs/ilmbase/patches/musl-_fpstate.patch

Fixes error:

    IlmBase/IexMath/IexMathFpu.cpp: In function ‘void Iex_2_4::FpuControl::restoreControlRegs(const ucontext_t&, bool)’:
    IlmBase/IexMath/IexMathFpu.cpp:284:38: error: ‘struct _fpstate’ has no member named ‘cw’; did you mean ‘cwd’?
      284 |     setCw ((ucon.uc_mcontext.fpregs->cw & cwRestoreMask) | cwRestoreVal);
          |                                      ^~
          |                                      cwd
    IlmBase/IexMath/IexMathFpu.cpp:287:20: error: ‘struct Iex_2_4::FpuControl::_fpstate_64’ has no member named ‘magic’
      287 |     setMxcsr (kfp->magic == 0 ? kfp->mxcsr : 0, clearExceptions);
          |                    ^~~~~

Signed-off-by: Niklas HambÞchen <mail@nh2.me>
@linux-foundation-easycla

linux-foundation-easycla Bot commented Jul 30, 2020 •

Copy link
Copy Markdown

CLA Check
The committers are authorized under a signed CLA.

  • ✅ Niklas HambÞchen (03c2724)

nh2 added a commit to nh2/nixpkgs that referenced this pull request Jul 30, 2020

@cary-ilm cary-ilm left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@cary-ilm
cary-ilm merged commit c7af102 into AcademySoftwareFoundation:master Jul 30, 2020
nh2 added a commit to nh2/nixpkgs that referenced this pull request Aug 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants