From c7c3de8e2d5b4e73df246d49e5abe25886359077 Mon Sep 17 00:00:00 2001 From: George Peter Banyard Date: Thu, 24 Sep 2020 13:28:56 +0100 Subject: [PATCH 1/2] Extensions should have the final say on their compiler flags --- build/php.m4 | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/build/php.m4 b/build/php.m4 index 1f77f38e572f2..8076e1d25253a 100644 --- a/build/php.m4 +++ b/build/php.m4 @@ -218,7 +218,7 @@ ifelse($1,shared,[ ]) dnl -dnl PHP_ADD_SOURCES_X(source-path, sources[, special-flags[, target-var[, shared[, special-post-flags]]]]) +dnl PHP_ADD_SOURCES_X(source-path, sources[, special-flags[, target-var[, shared]]]) dnl dnl Additional to PHP_ADD_SOURCES (see above), this lets you set the name of the dnl array target-var directly, as well as whether shared objects will be built @@ -251,10 +251,10 @@ dnl Append to the array which has been dynamically chosen at m4 time. dnl Choose the right compiler/flags/etc. for the source-file. case $ac_src in - *.c[)] ac_comp="$b_c_pre $3 $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $6$b_c_post" ;; - *.s[)] ac_comp="$b_c_pre $3 $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $6$b_c_post" ;; - *.S[)] ac_comp="$b_c_pre $3 $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $6$b_c_post" ;; - *.cpp|*.cc|*.cxx[)] ac_comp="$b_cxx_pre $3 $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $6$b_cxx_post" ;; + *.c[)] ac_comp="$b_c_pre $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $3 $b_c_post" ;; + *.s[)] ac_comp="$b_c_pre $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $3 $b_c_post" ;; + *.S[)] ac_comp="$b_c_pre $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $3 $b_c_post" ;; + *.cpp|*.cc|*.cxx[)] ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $3 $b_cxx_post" ;; esac dnl Create a rule for the object/source combo. From 147bf84b80606a8e0c0245d4c0bac5f504f9cd8c Mon Sep 17 00:00:00 2001 From: George Peter Banyard Date: Fri, 25 Sep 2020 15:07:30 +0100 Subject: [PATCH 2/2] Move extension compiler flags before -c flag --- build/php.m4 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/build/php.m4 b/build/php.m4 index 8076e1d25253a..b4cf3edcf3fda 100644 --- a/build/php.m4 +++ b/build/php.m4 @@ -251,10 +251,10 @@ dnl Append to the array which has been dynamically chosen at m4 time. dnl Choose the right compiler/flags/etc. for the source-file. case $ac_src in - *.c[)] ac_comp="$b_c_pre $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $3 $b_c_post" ;; - *.s[)] ac_comp="$b_c_pre $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $3 $b_c_post" ;; - *.S[)] ac_comp="$b_c_pre $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $3 $b_c_post" ;; - *.cpp|*.cc|*.cxx[)] ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $3 $b_cxx_post" ;; + *.c[)] ac_comp="$b_c_pre $ac_inc $b_c_meta $3 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.s[)] ac_comp="$b_c_pre $ac_inc $b_c_meta $3 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.S[)] ac_comp="$b_c_pre $ac_inc $b_c_meta $3 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.cpp|*.cc|*.cxx[)] ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $3 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;; esac dnl Create a rule for the object/source combo.