Skip to content

Commit a6251ba

Browse files
author
Ping Zhao
committed
Fix the BOLT problem with GCC10.
BOLT requires adding GCC option "-fno-reorder-blocks-and-partition". In some codes, it will be omitted because "GCC push_options". This patch is to handle this case correctly. Signed-off-by: Ping Zhao <pingzhao@intel.com>
1 parent 829f297 commit a6251ba

File tree

3 files changed

+3
-0
lines changed

3 files changed

+3
-0
lines changed

Zend/zend_vm_execute.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52134,6 +52134,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_NULL_HANDLER(ZEND_OPCODE_HANDL
5213452134
# pragma GCC push_options
5213552135
# pragma GCC optimize("no-gcse")
5213652136
# pragma GCC optimize("no-ivopts")
52137+
# pragma GCC optimize("no-reorder-blocks-and-partition")
5213752138
#endif
5213852139
ZEND_API void execute_ex(zend_execute_data *ex)
5213952140
{

ext/hash/xxhash/xxhash.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2934,6 +2934,7 @@ enum XXH_VECTOR_TYPE /* fake enum */ {
29342934
&& defined(__OPTIMIZE__) && !defined(__OPTIMIZE_SIZE__) /* respect -O0 and -Os */
29352935
# pragma GCC push_options
29362936
# pragma GCC optimize("-O2")
2937+
# pragma GCC optimize("no-reorder-blocks-and-partition")
29372938
#endif
29382939

29392940

ext/standard/crc32.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ static inline int has_crc32_insn() {
6262
# if defined(__GNUC__) && !defined(__clang__)
6363
# pragma GCC push_options
6464
# pragma GCC target ("+nothing+crc")
65+
# pragma GCC optimize("no-reorder-blocks-and-partition")
6566
# endif
6667
static uint32_t crc32_aarch64(uint32_t crc, const char *p, size_t nr) {
6768
while (nr >= sizeof(uint64_t)) {

0 commit comments

Comments
 (0)