Compiling with gcc -m32 on x86_64
| From: | Bishop Bettini | Date: | Fri, 10 Jul 2015 20:11:39 +0000 |
| Subject: | Compiling with gcc -m32 on x86_64 | ||
| Groups: | php.internals | ||
| Request: | Send a blank email to internals+get-87101@lists.php.net to get a copy of this message | ||
Hi!
Is it expected that compiling as 32-bit on 64-bit will succeed?
I'm seeing "EXTRA_CFLAGS=-m32 make" bomb
in ext/opcache/zend_accelerator_util_funcs.c.
One problem I notice is that one definition of accel_xlat_get() takes one
argument, another takes two. (Source.
<https://github.com/php/php-src/blob/master/ext/opcache/zend_accelerator_util_funcs.c#L31>)
Only the one argument version is used. (Source.
<https://github.com/php/php-src/blob/master/ext/opcache/zend_accelerator_util_funcs.c#L160>)
The two argument version is never used. (And that second argument is
passed as the fourth formal argument and the return value
of zend_hash_str_find_ptr, which only takes 3 arguments and returns void.)
There are other problems though. Before I go down this path, I wanted to
check if -m32 was meant to be used.
Thanks,
bishop