Skip to content

Commit 0e1fb0a

Browse files
committed
updated for version 7.3.1221
Problem: When build flags change "make distclean" run into a configure error. Solution: When CFLAGS changes delete auto/config.cache. Also avoid adding duplicate text to flags.
1 parent a7a5a05 commit 0e1fb0a

File tree

4 files changed

+25
-8
lines changed

4 files changed

+25
-8
lines changed

src/Makefile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1655,6 +1655,11 @@ tools: $(TOOLS)
16551655
# sure configure is run when it's needed.
16561656
#
16571657
config auto/config.mk: auto/configure config.mk.in config.h.in
1658+
if test -f auto/config.cache && \
1659+
grep '^ac_cv_env_CFLAGS_value=' auto/config.cache > /dev/null && \
1660+
! grep -x -F 'ac_cv_env_CFLAGS_value=$(CFLAGS)' auto/config.cache > /dev/null; then \
1661+
rm auto/config.cache; \
1662+
fi
16581663
GUI_INC_LOC="$(GUI_INC_LOC)" GUI_LIB_LOC="$(GUI_LIB_LOC)" \
16591664
CC="$(CC)" CPPFLAGS="$(CPPFLAGS)" CFLAGS="$(CFLAGS)" \
16601665
LDFLAGS="$(LDFLAGS)" $(CONF_SHELL) srcdir="$(srcdir)" \

src/auto/configure

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5133,6 +5133,7 @@ $as_echo_n "checking if compile and link flags for Perl are sane... " >&6; }
51335133
ldflags_save=$LDFLAGS
51345134
CFLAGS="$CFLAGS $perlcppflags"
51355135
LIBS="$LIBS $perllibs"
5136+
perlldflags=`echo "$perlldflags" | sed -e 's/^ *//g'`
51365137
LDFLAGS="$perlldflags $LDFLAGS"
51375138
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51385139
/* end confdefs.h. */
@@ -5162,7 +5163,9 @@ rm -f core conftest.err conftest.$ac_objext \
51625163
PERL_CFLAGS=`echo "$perlcppflags" | sed -e 's/-pipe //' -e 's/-W[^ ]*//'`
51635164
fi
51645165
if test "X$perlldflags" != "X"; then
5165-
LDFLAGS="$perlldflags $LDFLAGS"
5166+
if test "X`echo \"$LDFLAGS\" | grep -F -e \"$perlldflags\"`" = "X"; then
5167+
LDFLAGS="$perlldflags $LDFLAGS"
5168+
fi
51665169
fi
51675170
PERL_LIBS=$perllibs
51685171
PERL_SRC="auto/if_perl.c if_perlsfio.c"
@@ -6454,7 +6457,9 @@ $as_echo "$rubyhdrdir" >&6; }
64546457
if test "X$rubyldflags" != "X"; then
64556458
rubyldflags=`echo "$rubyldflags" | sed -e 's/-arch\ ppc//' -e 's/-arch\ i386//' -e 's/-arch\ x86_64//'`
64566459
if test "X$rubyldflags" != "X"; then
6457-
LDFLAGS="$rubyldflags $LDFLAGS"
6460+
if test "X`echo \"$LDFLAGS\" | grep -F -e \"$rubyldflags\"`" = "X"; then
6461+
LDFLAGS="$rubyldflags $LDFLAGS"
6462+
fi
64586463
fi
64596464
fi
64606465
RUBY_SRC="if_ruby.c"
@@ -12690,7 +12695,7 @@ $as_echo "no" >&6; }
1269012695
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we need -D_FORTIFY_SOURCE=1" >&5
1269112696
$as_echo_n "checking whether we need -D_FORTIFY_SOURCE=1... " >&6; }
1269212697
if test "$gccmajor" -gt "3"; then
12693-
CFLAGS=`echo "$CFLAGS" | sed -e 's/-Wp,-D_FORTIFY_SOURCE=.//g' -e 's/-D_FORTIFY_SOURCE=.//g' -e 's/$/ -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1/'`
12698+
CFLAGS=`echo "$CFLAGS" | sed -e 's/ *-Wp,-D_FORTIFY_SOURCE=.//g' -e 's/ *-D_FORTIFY_SOURCE=.//g' -e 's/ *-U_FORTIFY_SOURCE//g' -e 's/$/ -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1/'`
1269412699
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
1269512700
$as_echo "yes" >&6; }
1269612701
else
@@ -12705,7 +12710,7 @@ $as_echo_n "checking linker --as-needed support... " >&6; }
1270512710
LINK_AS_NEEDED=
1270612711
# Check if linker supports --as-needed and --no-as-needed options
1270712712
if $CC -Wl,--help 2>/dev/null | grep as-needed > /dev/null; then
12708-
LDFLAGS="$LDFLAGS -Wl,--as-needed"
12713+
LDFLAGS=`echo "$LDFLAGS" | sed -e 's/ *-Wl,--as-needed//g' | sed -e 's/$/ -Wl,--as-needed/'`
1270912714
LINK_AS_NEEDED=yes
1271012715
fi
1271112716
if test "$LINK_AS_NEEDED" = yes; then

src/configure.in

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -776,6 +776,7 @@ if test "$enable_perlinterp" = "yes" -o "$enable_perlinterp" = "dynamic"; then
776776
ldflags_save=$LDFLAGS
777777
CFLAGS="$CFLAGS $perlcppflags"
778778
LIBS="$LIBS $perllibs"
779+
perlldflags=`echo "$perlldflags" | sed -e 's/^ *//g'`
779780
LDFLAGS="$perlldflags $LDFLAGS"
780781
AC_TRY_LINK(,[ ],
781782
AC_MSG_RESULT(yes); perl_ok=yes,
@@ -789,7 +790,9 @@ if test "$enable_perlinterp" = "yes" -o "$enable_perlinterp" = "dynamic"; then
789790
PERL_CFLAGS=`echo "$perlcppflags" | sed -e 's/-pipe //' -e 's/-W[[^ ]]*//'`
790791
fi
791792
if test "X$perlldflags" != "X"; then
792-
LDFLAGS="$perlldflags $LDFLAGS"
793+
if test "X`echo \"$LDFLAGS\" | grep -F -e \"$perlldflags\"`" = "X"; then
794+
LDFLAGS="$perlldflags $LDFLAGS"
795+
fi
793796
fi
794797
PERL_LIBS=$perllibs
795798
PERL_SRC="auto/if_perl.c if_perlsfio.c"
@@ -1546,7 +1549,9 @@ if test "$enable_rubyinterp" = "yes" -o "$enable_rubyinterp" = "dynamic"; then
15461549
dnl configure, so strip these flags first (if present)
15471550
rubyldflags=`echo "$rubyldflags" | sed -e 's/-arch\ ppc//' -e 's/-arch\ i386//' -e 's/-arch\ x86_64//'`
15481551
if test "X$rubyldflags" != "X"; then
1549-
LDFLAGS="$rubyldflags $LDFLAGS"
1552+
if test "X`echo \"$LDFLAGS\" | grep -F -e \"$rubyldflags\"`" = "X"; then
1553+
LDFLAGS="$rubyldflags $LDFLAGS"
1554+
fi
15501555
fi
15511556
fi
15521557
RUBY_SRC="if_ruby.c"
@@ -3719,7 +3724,7 @@ if test "$GCC" = yes; then
37193724
dnl And undefine it first to avoid a warning.
37203725
AC_MSG_CHECKING(whether we need -D_FORTIFY_SOURCE=1)
37213726
if test "$gccmajor" -gt "3"; then
3722-
CFLAGS=`echo "$CFLAGS" | sed -e 's/-Wp,-D_FORTIFY_SOURCE=.//g' -e 's/-D_FORTIFY_SOURCE=.//g' -e 's/$/ -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1/'`
3727+
CFLAGS=`echo "$CFLAGS" | sed -e 's/ *-Wp,-D_FORTIFY_SOURCE=.//g' -e 's/ *-D_FORTIFY_SOURCE=.//g' -e 's/ *-U_FORTIFY_SOURCE//g' -e 's/$/ -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1/'`
37233728
AC_MSG_RESULT(yes)
37243729
else
37253730
AC_MSG_RESULT(no)
@@ -3734,7 +3739,7 @@ AC_MSG_CHECKING(linker --as-needed support)
37343739
LINK_AS_NEEDED=
37353740
# Check if linker supports --as-needed and --no-as-needed options
37363741
if $CC -Wl,--help 2>/dev/null | grep as-needed > /dev/null; then
3737-
LDFLAGS="$LDFLAGS -Wl,--as-needed"
3742+
LDFLAGS=`echo "$LDFLAGS" | sed -e 's/ *-Wl,--as-needed//g' | sed -e 's/$/ -Wl,--as-needed/'`
37383743
LINK_AS_NEEDED=yes
37393744
fi
37403745
if test "$LINK_AS_NEEDED" = yes; then

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -728,6 +728,8 @@ static char *(features[]) =
728728

729729
static int included_patches[] =
730730
{ /* Add new patch number below this line */
731+
/**/
732+
1221,
731733
/**/
732734
1220,
733735
/**/

0 commit comments

Comments
 (0)