@@ -11,11 +11,12 @@ dnl University of Stuttgart. All rights reserved.
1111dnl Copyright (c) 2004-2005 The Regents of the University of California.
1212dnl All rights reserved.
1313dnl Copyright (c) 2009 Oak Ridge National Labs. All rights reserved.
14- dnl Copyright (c) 2010-2013 Cisco Systems, Inc. All rights reserved.
14+ dnl Copyright (c) 2010-2018 Cisco Systems, Inc. All rights reserved
1515dnl Copyright (c) 2013 Mellanox Technologies, Inc.
1616dnl All rights reserved.
1717dnl Copyright (c) 2015 Research Organization for Information Science
1818dnl and Technology (RIST). All rights reserved.
19+ dnl Copyright (c) 2017 Intel, Inc. All rights reserved.
1920dnl $COPYRIGHT $
2021dnl
2122dnl Additional copyrights may follow
@@ -221,6 +222,7 @@ AC_DEFUN([OPAL_CHECK_ATTRIBUTES], [
221222 opal_cv___attribute__warn_unused_result=0
222223 opal_cv___attribute__weak_alias=0
223224 opal_cv___attribute__destructor=0
225+ opal_cv___attribute__optnone=0
224226 else
225227 AC_MSG_RESULT([yes])
226228
@@ -556,6 +558,21 @@ AC_DEFUN([OPAL_CHECK_ATTRIBUTES], [
556558 ],
557559 [],
558560 [])
561+
562+ _OPAL_CHECK_SPECIFIC_ATTRIBUTE([optnone],
563+ [
564+ void __attribute__ (( __optnone__)) foo(void);
565+ void foo(void) { return ; }
566+ ],
567+ [],
568+ [])
569+
570+ _OPAL_CHECK_SPECIFIC_ATTRIBUTE([extension],
571+ [
572+ int i = __extension__ 3;
573+ ],
574+ [],
575+ [])
559576 fi
560577
561578 # Now that all the values are set, define them
@@ -608,4 +625,8 @@ AC_DEFUN([OPAL_CHECK_ATTRIBUTES], [
608625 [Whether your compiler has __attribute__ weak alias or not])
609626 AC_DEFINE_UNQUOTED(OPAL_HAVE_ATTRIBUTE_DESTRUCTOR, [$opal_cv___attribute__destructor ],
610627 [Whether your compiler has __attribute__ destructor or not])
628+ AC_DEFINE_UNQUOTED(OPAL_HAVE_ATTRIBUTE_OPTNONE, [$opal_cv___attribute__optnone ],
629+ [Whether your compiler has __attribute__ optnone or not])
630+ AC_DEFINE_UNQUOTED(OPAL_HAVE_ATTRIBUTE_EXTENSION, [$opal_cv___attribute__extension ],
631+ [Whether your compiler has __attribute__ extension or not])
611632])
0 commit comments