Skip to content

Commit f0f5ce5

Browse files
committed
MDEV-27402 'asm goto' is not supported on Apple Xcode 9.4.1
Even though Apple Xcode is based on and similar to Clang, it does not support the asm goto construct which was added in commit 668a5f3 (MDEV-26720) to work around a compiler deficiency that results in suboptimal code being generated for IA-32 and AMD64. We will disable this manual optimization if __APPLE_CC__ is defined. Similar constructs are also used in sync/srw_lock.cc, but that code is not used on Apple, because we have not implemented a Linux futex compatible interface on Apple macOS. Thanks to Valerii Kravchuk for reporting and testing this.
1 parent 48b974b commit f0f5ce5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

storage/innobase/include/fil0fil.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*****************************************************************************
22
33
Copyright (c) 1995, 2017, Oracle and/or its affiliates. All Rights Reserved.
4-
Copyright (c) 2013, 2021, MariaDB Corporation.
4+
Copyright (c) 2013, 2022, MariaDB Corporation.
55
66
This program is free software; you can redistribute it and/or modify it under
77
the terms of the GNU General Public License as published by the Free Software
@@ -1545,7 +1545,7 @@ inline void fil_space_t::reacquire()
15451545
inline bool fil_space_t::set_stopping_check()
15461546
{
15471547
mysql_mutex_assert_owner(&fil_system.mutex);
1548-
#if defined __clang_major__ && __clang_major__ < 10
1548+
#if (defined __clang_major__ && __clang_major__ < 10) || defined __APPLE_CC__
15491549
/* Only clang-10 introduced support for asm goto */
15501550
return n_pending.fetch_or(STOPPING, std::memory_order_relaxed) & STOPPING;
15511551
#elif defined __GNUC__ && (defined __i386__ || defined __x86_64__)

0 commit comments

Comments
 (0)