Skip to content

Fix GCC checks to use the vendor name #439

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 7, 2021

Conversation

jjhursey
Copy link
Member

  • The PGI compiler is identified as a GCC compiler (so $GCC == yes)
    This can cause problems if the user accidentally adds --enable-picky
    or if the $GCC variable is used to check if it is safe to add GCC
    specific compiler flags.
  • Instead of using $GCC we can use the vendor string returned by
    _HWLOC_C_COMPILER_VENDOR.

@jjhursey jjhursey requested a review from bgoglin December 30, 2020 17:06
@jjhursey
Copy link
Member Author

I stumbled on this one by accident today while bouncing between GNU and PGI compilers. It shouldn't impact too many folks, but good cleanup to do.

@bgoglin
Copy link
Contributor

bgoglin commented Dec 31, 2020

Hello Josh, can you remove the existing call to _HWLOC_C_COMPILER_VENDOR([hwloc_c_vendor]) a bit later in the same HWLOC_SETUP_CORE?

 * The PGI compiler is identified as a GCC compiler (so `$GCC == yes`)
   This can cause problems if the user accidentally adds `--enable-picky`
   or if the `$GCC` variable is used to check if it is safe to add GCC
   specific compiler flags.
 * Instead of using `$GCC` we can use the vendor string returned by
   `_HWLOC_C_COMPILER_VENDOR`.

Signed-off-by: Joshua Hursey <[email protected]>
@jjhursey
Copy link
Member Author

jjhursey commented Jan 7, 2021

Done. I just repushed.

@bgoglin bgoglin merged commit 7f793d7 into open-mpi:master Jan 7, 2021
@bgoglin
Copy link
Contributor

bgoglin commented Jan 7, 2021

Thanks Josh, I backported to v2.4 too. If you want it in OMPI, you can take the whole v2.4 branch (there 4 bugfixes since 2.4.0, other commits don't touch the library code). If you need it in another stable branch, let me know.

@jjhursey jjhursey deleted the fix-picky-pgi branch January 7, 2021 18:47
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.

2 participants