stop using ranlib (closes bpo-31625) (#3815)

Instead, simply pass 's' to ar.
This commit is contained in:
Benjamin Peterson 2017-09-29 08:42:41 -07:00 committed by GitHub
parent 90f1d98959
commit d15108a478
4 changed files with 4 additions and 106 deletions

View File

@ -38,7 +38,6 @@ CXX= @CXX@
MAINCC= @MAINCC@
LINKCC= @LINKCC@
AR= @AR@
RANLIB= @RANLIB@
READELF= @READELF@
SOABI= @SOABI@
LDVERSION= @LDVERSION@
@ -577,16 +576,9 @@ sharedmods: $(BUILDPYTHON) pybuilddir.txt Modules/_math.o
# Build static library
# avoid long command lines, same as LIBRARY_OBJS
$(LIBRARY): $(LIBRARY_OBJS)
-rm -f $@
$(AR) $(ARFLAGS) $@ Modules/getbuildinfo.o
$(AR) $(ARFLAGS) $@ $(PARSER_OBJS)
$(AR) $(ARFLAGS) $@ $(OBJECT_OBJS)
$(AR) $(ARFLAGS) $@ $(PYTHON_OBJS) Python/frozen.o
$(AR) $(ARFLAGS) $@ $(MODULE_OBJS)
$(AR) $(ARFLAGS) $@ $(MODOBJS)
$(RANLIB) $@
$(AR) $(ARFLAGS) $@ $^
libpython$(LDVERSION).so: $(LIBRARY_OBJS)
if test $(INSTSONAME) != $(LDLIBRARY); then \
@ -1422,7 +1414,6 @@ libainstall: @DEF_MAKE_RULE@ python-config
$(INSTALL_DATA) $(LDLIBRARY) $(DESTDIR)$(LIBPL) ; \
else \
$(INSTALL_DATA) $(LIBRARY) $(DESTDIR)$(LIBPL)/$(LIBRARY) ; \
$(RANLIB) $(DESTDIR)$(LIBPL)/$(LIBRARY) ; \
fi; \
else \
echo Skip install of $(LIBRARY) - use make frameworkinstall; \

View File

@ -0,0 +1 @@
Stop using ranlib on static libraries. Instead, we assume ar supports the 's' flag.

95
configure vendored
View File

@ -692,7 +692,6 @@ READELF
ARFLAGS
ac_ct_AR
AR
RANLIB
GNULD
LINKCC
LDVERSION
@ -5944,98 +5943,6 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
$as_echo "$LDLIBRARY" >&6; }
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
set dummy ${ac_tool_prefix}ranlib; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_prog_RANLIB+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -n "$RANLIB"; then
ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
IFS=$as_save_IFS
fi
fi
RANLIB=$ac_cv_prog_RANLIB
if test -n "$RANLIB"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
$as_echo "$RANLIB" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
fi
if test -z "$ac_cv_prog_RANLIB"; then
ac_ct_RANLIB=$RANLIB
# Extract the first word of "ranlib", so it can be a program name with args.
set dummy ranlib; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -n "$ac_ct_RANLIB"; then
ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_RANLIB="ranlib"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
IFS=$as_save_IFS
fi
fi
ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
if test -n "$ac_ct_RANLIB"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
$as_echo "$ac_ct_RANLIB" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
if test "x$ac_ct_RANLIB" = x; then
RANLIB=":"
else
case $cross_compiling:$ac_tool_warned in
yes:)
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
RANLIB=$ac_ct_RANLIB
fi
else
RANLIB="$ac_cv_prog_RANLIB"
fi
if test -n "$ac_tool_prefix"; then
for ac_prog in ar aal
@ -6142,7 +6049,7 @@ fi
if test -z "$ARFLAGS"
then
ARFLAGS="rc"
ARFLAGS="rcs"
fi
if test -n "$ac_tool_prefix"; then

View File

@ -1161,7 +1161,6 @@ fi
AC_MSG_RESULT($LDLIBRARY)
AC_PROG_RANLIB
AC_SUBST(AR)
AC_CHECK_TOOLS(AR, ar aal, ar)
@ -1169,7 +1168,7 @@ AC_CHECK_TOOLS(AR, ar aal, ar)
AC_SUBST(ARFLAGS)
if test -z "$ARFLAGS"
then
ARFLAGS="rc"
ARFLAGS="rcs"
fi
AC_CHECK_TOOLS([READELF], [readelf], [:])