Skip to content

Commit 68bf9cc

Browse files
committed
Silence -qinline xlc compiler warning.
With '-g' and '-finline-functions' xlc will throw: 'warning: "-qinline" is not compatible with "-g". "-qnoinline" is being set.' Signed-off-by: Austen Lauria <[email protected]>
1 parent a7c4f5d commit 68bf9cc

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

config/opal_setup_cc.m4

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ dnl Copyright (c) 2015-2019 Research Organization for Information Science
1818
dnl and Technology (RIST). All rights reserved.
1919
dnl Copyright (c) 2020 Triad National Security, LLC. All rights
2020
dnl reserved.
21+
dnl Copyright (c) 2021 IBM Corporation. All rights reserved.
2122
dnl
2223
dnl $COPYRIGHT$
2324
dnl
@@ -366,19 +367,22 @@ AC_DEFUN([OPAL_SETUP_CC],[
366367
CFLAGS_orig="$CFLAGS"
367368

368369
# Note: Some versions of clang (at least >= 3.5 -- perhaps
369-
# older versions, too?) will *warn* about -finline-functions,
370-
# but still allow it. This is very annoying, so check for
371-
# that warning, too. The clang warning looks like this:
370+
# older versions, too?) and xlc with -g (v16.1, perhaps older)
371+
# will *warn* about -finline-functions, but still allow it.
372+
# This is very annoying, so check for that warning, too.
373+
# The clang warning looks like this:
372374
# clang: warning: optimization flag '-finline-functions' is not supported
373375
# clang: warning: argument unused during compilation: '-finline-functions'
376+
# the xlc warning looks like this:
377+
# warning: "-qinline" is not compatible with "-g". "-qnoinline" is being set.
374378
CFLAGS="$CFLAGS_orig -finline-functions"
375379
add=
376380
AC_CACHE_CHECK([if $CC supports -finline-functions],
377381
[opal_cv_cc_finline_functions],
378382
[AC_TRY_COMPILE([], [],
379383
[opal_cv_cc_finline_functions="yes"
380384
if test -s conftest.err ; then
381-
for i in unused 'not supported' ; do
385+
for i in unused 'not supported\|not compatible' ; do
382386
if $GREP -iq "$i" conftest.err; then
383387
opal_cv_cc_finline_functions="no"
384388
break;

0 commit comments

Comments
 (0)