Skip to content

Guard Open64-specific flags in libm for BUILD_COMPILER=GNU#47

Open
noafroboy wants to merge 1 commit intoopen64-compiler:developfrom
noafroboy:fix/libm-compiler-compat
Open

Guard Open64-specific flags in libm for BUILD_COMPILER=GNU#47
noafroboy wants to merge 1 commit intoopen64-compiler:developfrom
noafroboy:fix/libm-compiler-compat

Conversation

@noafroboy
Copy link

Summary

  • Guard -OPT:alias=restrict:alias=unnamed, -TENV:X=2, and -WOPT:cse_fcmp flags behind ifneq ($(BUILD_COMPILER), GNU) in osprey/libm/Makefile.gbase

Motivation

When building libm with BUILD_COMPILER=GNU (for bootstrapping or when the Open64 compiler is not yet available), these Open64-specific flags cause GCC to fail:

gcc: error: unrecognized command line option '-WOPT:cse_fcmp=off'
gcc: error: unrecognized command line option '-OPT:alias=restrict:alias=unnamed'

The fix only affects the BUILD_COMPILER=GNU path; the Open64 (SELF/OSP/PSC) build path is unchanged.

Test plan

  • Build libm with BUILD_COMPILER=GNU — no unrecognized option errors
  • Build libm with BUILD_COMPILER=OSP — flags still applied as before

🤖 Generated with Claude Code

When building libm with BUILD_COMPILER=GNU (e.g., for bootstrapping or
cross-compilation), the Open64-specific flags -OPT:alias=restrict,
-TENV:X=2, and -WOPT:cse_fcmp cause GCC to fail with "unrecognized
command line option".

Guard these flags behind ifneq ($(BUILD_COMPILER), GNU) so the build
succeeds with either compiler. The CCFVLOG and CCFVSQRT variables are
still set correctly in both paths.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant