Skip to content

Commit

Permalink
Remove use of ranlib.
Browse files Browse the repository at this point in the history
  • Loading branch information
Ulrich Drepper committed Feb 15, 2011
1 parent c1d0e63 commit e943389
Show file tree
Hide file tree
Showing 13 changed files with 483 additions and 358 deletions.
9 changes: 9 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
2011-02-15 Ulrich Drepper <drepper@gmail.com>

[BZ #12469]
* Makeconfig: Remove RANLIB definition.
* Makerules: Don't use RANLIB.
* aclocal.m4: Remove ranlib test.
* configure.in: No need to check for ranlib.
* elf/rtld-Rules: Don't use RANLIB.

2011-02-11 Jakub Jelinek <jakub@redhat.com>

* stdio-common/printf-parsemb.c (__parse_one_specmb): Handle
Expand Down
6 changes: 1 addition & 5 deletions Makeconfig
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (C) 1991-2003,2004,2005,2006,2007,2008,2009,2010
# Copyright (C) 1991-2003,2004,2005,2006,2007,2008,2009,2010,2011
# Free Software Foundation, Inc.
# This file is part of the GNU C Library.

Expand Down Expand Up @@ -593,10 +593,6 @@ ifndef LD
LD := ld -X
endif

ifndef RANLIB
RANLIB = ranlib
endif

# Extra flags to pass to GCC.
ifeq ($(all-warnings),yes)
+gccwarn := -Wall -Wwrite-strings -Winline -Wcast-qual -Wbad-function-cast -Wmissing-noreturn -Wmissing-prototypes -Wmissing-declarations -Wcomment -Wcomments -Wtrigraphs -Wsign-compare -Wfloat-equal -Wmultichar
Expand Down
8 changes: 1 addition & 7 deletions Makerules
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (C) 1991-2006,2007,2008,2009,2010 Free Software Foundation, Inc.
# Copyright (C) 1991-2010, 2011 Free Software Foundation, Inc.
# This file is part of the GNU C Library.

# The GNU C Library is free software; you can redistribute it and/or
Expand Down Expand Up @@ -805,7 +805,6 @@ endef
define do-makelib
cd $(common-objdir) && \
$(AR) $(CREATE_ARFLAGS) $(@F) `cat $(patsubst $(common-objpfx)%,%,$^)`
$(RANLIB) $@
endef
subdirs-stamps := $(foreach d,$(subdirs),$(common-objpfx)$d/stamp%)
subdirs-stamp-o = $(subst %,$o,$(subdirs-stamps))
Expand All @@ -827,7 +826,6 @@ define build-extra-lib
$(patsubst %/,cd % &&,$(objpfx)) \
$(AR) $(CREATE_ARFLAGS) $(@:$(objpfx)%=%) \
$(patsubst $(objpfx)%,%,$^)
$(RANLIB) $@
endef

# Installation.
Expand Down Expand Up @@ -872,9 +870,6 @@ install: $(installed-libcs)
$(installed-libcs): $(inst_libdir)/lib$(libprefix)%: lib $(+force)
$(make-target-directory)
$(INSTALL_DATA) $(common-objpfx)lib$(*:$(libc-name)%=c%) $@
# Running ranlib after installing makes the __.SYMDEF time stamp up to
# date, which avoids messages from some linkers.
$(RANLIB) $@

define do-install-program
$(make-target-directory)
Expand Down Expand Up @@ -1108,7 +1103,6 @@ ifdef install-lib.a
$(install-lib.a:lib%.a=$(inst_libdir)/lib$(libprefix)%.a): \
$(inst_libdir)/lib$(libprefix)%.a: $(objpfx)lib%.a $(+force)
$(do-install)
$(patsubst %,$(RANLIB) $@,$(filter-out $(non-lib.a),$(<F)))
endif
endif
ifdef install-data
Expand Down
13 changes: 1 addition & 12 deletions aclocal.m4
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ else
AC_MSG_CHECKING([version of [$]$1])
changequote(<<,>>)dnl
ac_prog_version=`<<$>>$1 $3 2>&1 ifelse(<<$4>>,,,
<<| sed -n 's/^.*patsubst(<<$4>>,/,\/).*$/\1/p'>>)`
<<| sed -n 's/^.*patsubst(<<$4>>,/,\/).*$/\1/p'>>)`
case $ac_prog_version in
'') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
<<$5>>)
Expand Down Expand Up @@ -102,17 +102,6 @@ AC_SUBST(AR)
OBJDUMP=`$CC -print-prog-name=objdump`
AC_SUBST(OBJDUMP)
# ranlib has to be treated a bit differently since it might not exist at all.
ac_ranlib=`$CC -print-prog-name=ranlib`
if test "x$ac_ranlib" = xranlib; then
# This extra check has to happen since gcc simply echos the parameter in
# case it cannot find the value in its own directories.
AC_CHECK_TOOL(RANLIB, ranlib, :)
else
RANLIB=$ac_ranlib
fi
AC_SUBST(RANLIB)
# Determine whether we are using GNU binutils.
AC_CACHE_CHECK(whether $AS is GNU as, libc_cv_prog_as_gnu,
[LIBC_PROG_FOO_GNU($AS, libc_cv_prog_as_gnu=yes, libc_cv_prog_as_gnu=no)])
Expand Down
132 changes: 2 additions & 130 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -669,7 +669,6 @@ PWD_P
LD
AS
MIG
RANLIB
OBJDUMP
AR
LN_S
Expand Down Expand Up @@ -4670,108 +4669,6 @@ AR=`$CC -print-prog-name=ar`
OBJDUMP=`$CC -print-prog-name=objdump`


# ranlib has to be treated a bit differently since it might not exist at all.
ac_ranlib=`$CC -print-prog-name=ranlib`
if test "x$ac_ranlib" = xranlib; then
# This extra check has to happen since gcc simply echos the parameter in
# case it cannot find the value in its own directories.
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 test "${ac_cv_prog_RANLIB+set}" = set; 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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 test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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

else
RANLIB=$ac_ranlib
fi


# Determine whether we are using GNU binutils.
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $AS is GNU as" >&5
$as_echo_n "checking whether $AS is GNU as... " >&6; }
Expand Down Expand Up @@ -5410,33 +5307,8 @@ fi



# check if ranlib is necessary
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ranlib is necessary" >&5
$as_echo_n "checking whether ranlib is necessary... " >&6; }
if test "${libc_cv_ranlib_necessary+set}" = set; then :
$as_echo_n "(cached) " >&6
else
cat > conftest.c <<EOF
int a;
char b;
void c(void) {}
EOF
$CC $CFLAGS $CPPFLAGS -c conftest.c
$AR cr conftest.a conftest.o
cp conftest.a conftest2.a
$RANLIB conftest.a
if cmp -s conftest.a conftest2.a; then
libc_cv_ranlib_necessary=no
else
libc_cv_ranlib_necessary=yes
fi
rm -rf conftest*
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_ranlib_necessary" >&5
$as_echo "$libc_cv_ranlib_necessary" >&6; }
if test "$libc_cv_ranlib_necessary" = no; then
RANLIB=:
fi
# ranlib is never necessary on Linux and Hurd systems
RANLIB=:

# Test if LD_LIBRARY_PATH contains the notation for the current directory
# since this would lead to problems installing/building glibc.
Expand Down
22 changes: 2 additions & 20 deletions configure.in
Original file line number Diff line number Diff line change
Expand Up @@ -1095,26 +1095,8 @@ fi
AC_SUBST(SYSINCLUDES)
AC_SUBST(CXX_SYSINCLUDES)

# check if ranlib is necessary
AC_CACHE_CHECK(whether ranlib is necessary, libc_cv_ranlib_necessary, [dnl
cat > conftest.c <<EOF
int a;
char b;
void c(void) {}
EOF
$CC $CFLAGS $CPPFLAGS -c conftest.c
$AR cr conftest.a conftest.o
cp conftest.a conftest2.a
$RANLIB conftest.a
if cmp -s conftest.a conftest2.a; then
libc_cv_ranlib_necessary=no
else
libc_cv_ranlib_necessary=yes
fi
rm -rf conftest*])
if test "$libc_cv_ranlib_necessary" = no; then
RANLIB=:
fi
# ranlib is never necessary on Linux and Hurd systems
RANLIB=:

# Test if LD_LIBRARY_PATH contains the notation for the current directory
# since this would lead to problems installing/building glibc.
Expand Down
4 changes: 2 additions & 2 deletions elf/rtld-Rules
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Subroutine makefile for compiling libc modules linked into dynamic linker.

# Copyright (C) 2002,2003,2005,2006,2008,2010 Free Software Foundation, Inc.
# Copyright (C) 2002,2003,2005,2006,2008,2010,2011
# Free Software Foundation, Inc.
# This file is part of the GNU C Library.

# The GNU C Library is free software; you can redistribute it and/or
Expand Down Expand Up @@ -50,7 +51,6 @@ $(objpfx)rtld-libc.a: $(foreach dir,$(rtld-subdirs),\
$(rtld-$(dir))))
@-rm -f $@T
$(AR) cq$(verbose) $@T $^
$(RANLIB) $@T
mv -f $@T $@

# Use the verbose option of ar and tar when not running silently.
Expand Down
4 changes: 1 addition & 3 deletions libidn/configure
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,5 @@ libc_add_on_canonical=
libc_add_on_subdirs=.

# Get this defined in config.h for main source code to test.
cat >>confdefs.h <<\_ACEOF
#define HAVE_LIBIDN 1
_ACEOF
$as_echo "#define HAVE_LIBIDN 1" >>confdefs.h

4 changes: 2 additions & 2 deletions manual/install.texi
Original file line number Diff line number Diff line change
Expand Up @@ -228,8 +228,8 @@ important to use this same @code{CC} value when running
@code{configure}, like this: @samp{CC=@var{target}-gcc configure
@var{target}}. Set @code{BUILD_CC} to the compiler to use for programs
run on the build system as part of compiling the library. You may need to
set @code{AR} and @code{RANLIB} to cross-compiling versions of @code{ar}
and @code{ranlib} if the native tools are not configured to work with
set @code{AR} to cross-compiling versions of @code{ar}
if the native tools are not configured to work with
object files for the target you configured for.


Expand Down
Loading

0 comments on commit e943389

Please sign in to comment.