Skip to content

Autotools: Fix ext/standard sources #15131

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 28, 2024
Merged

Conversation

petk
Copy link
Member

@petk petk commented Jul 28, 2024

This appends source files to the PHP_NEW_EXTENSION call and adds the possible compilation flag -DZEND_ENABLE_STATIC_TSRMLS_CACHE when building objects as done on all ext/standard sources already. Also, the PHP_EXT_DIR Autoconf macro doesn't accept any argument.

This is changed to not have any possible side effects due to possible mismatched compilation flags.

Makefile diff:

1761,1775d1760
< -include ext/standard/crypt_freesec.dep
< ext/standard/crypt_freesec.lo: /php-src/ext/standard/crypt_freesec.c
< 	$(LIBTOOL) --tag=CC --mode=compile $(CC) -Iext/standard/ -I/php-src/ext/standard/ $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS)  -c /php-src/ext/standard/crypt_freesec.c -o ext/standard/crypt_freesec.lo  -MMD -MF ext/standard/crypt_freesec.dep -MT ext/standard/crypt_freesec.lo
< -include ext/standard/crypt_blowfish.dep
< ext/standard/crypt_blowfish.lo: /php-src/ext/standard/crypt_blowfish.c
< 	$(LIBTOOL) --tag=CC --mode=compile $(CC) -Iext/standard/ -I/php-src/ext/standard/ $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS)  -c /php-src/ext/standard/crypt_blowfish.c -o ext/standard/crypt_blowfish.lo  -MMD -MF ext/standard/crypt_blowfish.dep -MT ext/standard/crypt_blowfish.lo
< -include ext/standard/crypt_sha512.dep
< ext/standard/crypt_sha512.lo: /php-src/ext/standard/crypt_sha512.c
< 	$(LIBTOOL) --tag=CC --mode=compile $(CC) -Iext/standard/ -I/php-src/ext/standard/ $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS)  -c /php-src/ext/standard/crypt_sha512.c -o ext/standard/crypt_sha512.lo  -MMD -MF ext/standard/crypt_sha512.dep -MT ext/standard/crypt_sha512.lo
< -include ext/standard/crypt_sha256.dep
< ext/standard/crypt_sha256.lo: /php-src/ext/standard/crypt_sha256.c
< 	$(LIBTOOL) --tag=CC --mode=compile $(CC) -Iext/standard/ -I/php-src/ext/standard/ $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS)  -c /php-src/ext/standard/crypt_sha256.c -o ext/standard/crypt_sha256.lo  -MMD -MF ext/standard/crypt_sha256.dep -MT ext/standard/crypt_sha256.lo
< -include ext/standard/php_crypt_r.dep
< ext/standard/php_crypt_r.lo: /php-src/ext/standard/php_crypt_r.c
< 	$(LIBTOOL) --tag=CC --mode=compile $(CC) -Iext/standard/ -I/php-src/ext/standard/ $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS)  -c /php-src/ext/standard/php_crypt_r.c -o ext/standard/php_crypt_r.lo  -MMD -MF ext/standard/php_crypt_r.dep -MT ext/standard/php_crypt_r.lo
1964a1950,1964
> -include ext/standard/crypt_blowfish.dep
> ext/standard/crypt_blowfish.lo: /php-src/ext/standard/crypt_blowfish.c
> 	$(LIBTOOL) --tag=CC --mode=compile $(CC) -Iext/standard/ -I/php-src/ext/standard/ $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -c /php-src/ext/standard/crypt_blowfish.c -o ext/standard/crypt_blowfish.lo  -MMD -MF ext/standard/crypt_blowfish.dep -MT ext/standard/crypt_blowfish.lo
> -include ext/standard/crypt_freesec.dep
> ext/standard/crypt_freesec.lo: /php-src/ext/standard/crypt_freesec.c
> 	$(LIBTOOL) --tag=CC --mode=compile $(CC) -Iext/standard/ -I/php-src/ext/standard/ $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -c /php-src/ext/standard/crypt_freesec.c -o ext/standard/crypt_freesec.lo  -MMD -MF ext/standard/crypt_freesec.dep -MT ext/standard/crypt_freesec.lo
> -include ext/standard/crypt_sha256.dep
> ext/standard/crypt_sha256.lo: /php-src/ext/standard/crypt_sha256.c
> 	$(LIBTOOL) --tag=CC --mode=compile $(CC) -Iext/standard/ -I/php-src/ext/standard/ $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -c /php-src/ext/standard/crypt_sha256.c -o ext/standard/crypt_sha256.lo  -MMD -MF ext/standard/crypt_sha256.dep -MT ext/standard/crypt_sha256.lo
> -include ext/standard/crypt_sha512.dep
> ext/standard/crypt_sha512.lo: /php-src/ext/standard/crypt_sha512.c
> 	$(LIBTOOL) --tag=CC --mode=compile $(CC) -Iext/standard/ -I/php-src/ext/standard/ $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -c /php-src/ext/standard/crypt_sha512.c -o ext/standard/crypt_sha512.lo  -MMD -MF ext/standard/crypt_sha512.dep -MT ext/standard/crypt_sha512.lo
> -include ext/standard/php_crypt_r.dep
> ext/standard/php_crypt_r.lo: /php-src/ext/standard/php_crypt_r.c
> 	$(LIBTOOL) --tag=CC --mode=compile $(CC) -Iext/standard/ -I/php-src/ext/standard/ $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -c /php-src/ext/standard/php_crypt_r.c -o ext/standard/php_crypt_r.lo  -MMD -MF ext/standard/php_crypt_r.dep -MT ext/standard/php_crypt_r.lo

This appends source files to the PHP_NEW_EXTENSION call and adds the
possible compilation flag -DZEND_ENABLE_STATIC_TSRMLS_CACHE when
building objects as done on all ext/standard sources already. Also, the
PHP_EXT_DIR Autoconf macro doesn't accept any argument.
@petk petk merged commit dee2944 into php:master Jul 28, 2024
9 of 11 checks passed
@petk petk deleted the patch-standard-sources branch July 28, 2024 08:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants