Skip to content

Commit f7c2395

Browse files
shenkiNick Bofferding
authored and
Nick Bofferding
committed
utilmisc: Fix build error with GCC 10
From when this was introduced (2737de7) it wasn't commented why it was done this way. Clean it up. utilmisc.C:31:6: error: ‘bool Util::isSimics()’ specifies less restrictive attribute than its target ‘bool Util::__isSimicsRunning()’: ‘nothrow’ [-Werror=missing-attributes] 31 | bool isSimics() __attribute__((alias("__isSimicsRunning"))); | ^~~~~~~~ utilmisc.C:34:6: note: ‘bool Util::isSimics()’ target declared here 34 | bool __isSimicsRunning() | ^~~~~~~~~~~~~~~~~ utilmisc.C:48:6: error: ‘bool Util::isQmeModelEnabled()’ specifies less restrictive attribute than its target ‘bool Util::__isQmeEnabled()’: ‘nothrow’ [-Werror=missing-attributes] 48 | bool isQmeModelEnabled() __attribute__((alias("__isQmeEnabled"))); | ^~~~~~~~~~~~~~~~~ utilmisc.C:51:6: note: ‘bool Util::isQmeModelEnabled()’ target declared here 51 | bool __isQmeEnabled() | ^~~~~~~~~~~~~~ Fixes: #205 Change-Id: Id5291022b09dca6789175d69e54a30d55f1bde13 Signed-off-by: Joel Stanley <[email protected]> Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/128902 Tested-by: Jenkins OP Build CI <[email protected]> Tested-by: Jenkins Server <[email protected]> Tested-by: Jenkins Combined Simics CI <[email protected]> Reviewed-by: Zachary Clark <[email protected]> Tested-by: FSP CI Jenkins <[email protected]> Tested-by: Jenkins OP HW <[email protected]> Tested-by: Hostboot CI <[email protected]> Reviewed-by: Daniel M Crowell <[email protected]> Reviewed-by: Nick Bofferding <[email protected]>
1 parent d644508 commit f7c2395

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

src/lib/utilmisc.C

+10-8
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
/* */
66
/* OpenPOWER HostBoot Project */
77
/* */
8-
/* Contributors Listed Below - COPYRIGHT 2014,2020 */
8+
/* Contributors Listed Below - COPYRIGHT 2014,2022 */
99
/* [+] International Business Machines Corp. */
1010
/* */
1111
/* */
@@ -28,8 +28,7 @@
2828
namespace Util
2929
{
3030

31-
bool isSimics() __attribute__((alias("__isSimicsRunning")));
32-
extern "C" bool __isSimicsRunning() NEVER_INLINE;
31+
bool __isSimicsRunning() NEVER_INLINE;
3332

3433
bool __isSimicsRunning()
3534
{
@@ -40,12 +39,11 @@ bool __isSimicsRunning()
4039

4140
bool isSimicsRunning()
4241
{
43-
static bool simics = isSimics();
42+
static bool simics = __isSimicsRunning();
4443
return simics;
4544
}
4645

4746

48-
bool isQmeModelEnabled() __attribute__((alias("__isQmeEnabled")));
4947
extern "C" bool __isQmeEnabled() NEVER_INLINE;
5048

5149
bool __isQmeEnabled()
@@ -58,7 +56,7 @@ bool __isQmeEnabled()
5856
bool requiresSecondaryCoreWorkaround()
5957
{
6058
static const auto required =
61-
isSimicsRunning() && !isQmeModelEnabled();
59+
isSimicsRunning() && !__isQmeEnabled();
6260
return required;
6361
}
6462

@@ -86,10 +84,14 @@ void setIsConsoleStarted()
8684
g_isConsoleStarted = true;
8785
}
8886

89-
bool isMultiprocSupported() __attribute__((alias("__isMultiprocSupported")));
9087
extern "C" bool __isMultiprocSupported() NEVER_INLINE;
9188

9289
bool __isMultiprocSupported()
90+
{
91+
return MAGIC_INST_CHECK_FEATURE(MAGIC_FEATURE__MULTIPROC);
92+
}
93+
94+
bool isMultiprocSupported()
9395
{
9496
bool multiprocSupport = true;
9597

@@ -98,7 +100,7 @@ bool __isMultiprocSupported()
98100
#else
99101
if (isSimicsRunning())
100102
{
101-
multiprocSupport = MAGIC_INST_CHECK_FEATURE(MAGIC_FEATURE__MULTIPROC);
103+
multiprocSupport = __isMultiprocSupported();
102104
}
103105
#endif
104106

0 commit comments

Comments
 (0)