Skip to content

Commit

Permalink
Fix configury where most compilers will get mislabeled as 'gnu'.
Browse files Browse the repository at this point in the history
Most compilers define the __GNU__ macro, so put it at the bottom
as a catch-all.

Tested with gcc, xlc, pgi and clang.

Signed-off-by: Austen Lauria <awlauria@us.ibm.com>
  • Loading branch information
awlauria authored and bgoglin committed Feb 4, 2021
1 parent b518dce commit b09f653
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions config/hwloc_check_vendor.m4
Expand Up @@ -106,11 +106,6 @@ AC_DEFUN([_HWLOC_CHECK_COMPILER_VENDOR], [
[HWLOC_IFDEF_IFELSE([__PGI],
[hwloc_check_compiler_vendor_result="portland group"])])

# GNU
AS_IF([test "$hwloc_check_compiler_vendor_result" = "unknown"],
[HWLOC_IFDEF_IFELSE([__GNUC__],
[hwloc_check_compiler_vendor_result="gnu"])])

# Borland Turbo C
AS_IF([test "$hwloc_check_compiler_vendor_result" = "unknown"],
[HWLOC_IFDEF_IFELSE([__TURBOC__],
Expand Down Expand Up @@ -242,6 +237,11 @@ AC_DEFUN([_HWLOC_CHECK_COMPILER_VENDOR], [
[HWLOC_IFDEF_IFELSE([__WATCOMC__],
[hwloc_check_compiler_vendor_result="watcom"])])

# GNU
AS_IF([test "$hwloc_check_compiler_vendor_result" = "unknown"],
[HWLOC_IFDEF_IFELSE([__GNUC__],
[hwloc_check_compiler_vendor_result="gnu"])])

$1="$hwloc_check_compiler_vendor_result"
unset hwloc_check_compiler_vendor_result
])
Expand Down

0 comments on commit b09f653

Please sign in to comment.