Skip to content

Commit 76f7f4a

Browse files
committed
Attempt to fix build php#9087 on macOs intel.
Disable long 64 bits support and disable zend_string_equal_val assembly implementation then as instructions are not longer understood.
1 parent 520bb2e commit 76f7f4a

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

Zend/zend_long.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
#include <stdint.h>
2424

2525
/* This is the heart of the whole int64 enablement in zval. */
26-
#if defined(__x86_64__) || defined(__LP64__) || defined(_LP64) || defined(_WIN64)
26+
#if !defined(__APPLE__) && (defined(__x86_64__) || defined(__LP64__) || defined(_LP64) || defined(_WIN64))
2727
# define ZEND_ENABLE_ZVAL_LONG64 1
2828
#endif
2929

Zend/zend_string.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -375,6 +375,7 @@ ZEND_API bool ZEND_FASTCALL I_REPLACE_SONAME_FNNAME_ZU(NONE,zend_string_equal_va
375375
return !memcmp(ZSTR_VAL(s1), ZSTR_VAL(s2), ZSTR_LEN(s1));
376376
}
377377

378+
#if !defined(__APPLE__)
378379
#if defined(__GNUC__) && defined(__i386__)
379380
ZEND_API bool ZEND_FASTCALL zend_string_equal_val(const zend_string *s1, const zend_string *s2)
380381
{
@@ -451,6 +452,7 @@ ZEND_API bool ZEND_FASTCALL zend_string_equal_val(const zend_string *s1, const z
451452
return ret;
452453
}
453454
#endif
455+
#endif
454456

455457
ZEND_API zend_string *zend_string_concat2(
456458
const char *str1, size_t str1_len,

Zend/zend_string.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,7 @@ static zend_always_inline bool zend_string_equals_cstr(const zend_string *s1, co
344344
return ZSTR_LEN(s1) == s2_length && !memcmp(ZSTR_VAL(s1), s2, s2_length);
345345
}
346346

347-
#if defined(__GNUC__) && (defined(__i386__) || (defined(__x86_64__) && !defined(__ILP32__)))
347+
#if defined(__GNUC__) && !defined(__APPLE__) && (defined(__i386__) || (defined(__x86_64__) && !defined(__ILP32__)))
348348
BEGIN_EXTERN_C()
349349
ZEND_API bool ZEND_FASTCALL zend_string_equal_val(const zend_string *s1, const zend_string *s2);
350350
END_EXTERN_C()

0 commit comments

Comments
 (0)