[llvm-commits] [llvm] r142997 - in /llvm/trunk: Makefile.config.in Makefile.rules autoconf/configure.ac configure
Eric Christopher
echristo at apple.com
Tue Oct 25 17:52:13 PDT 2011
Author: echristo
Date: Tue Oct 25 19:52:13 2011
New Revision: 142997
URL: http://llvm.org/viewvc/llvm-project?rev=142997&view=rev
Log:
Search for and use the strip program and pass it to install for it
to use for stripping final executables.
Patch by Simon Atanasyan!
Modified:
llvm/trunk/Makefile.config.in
llvm/trunk/Makefile.rules
llvm/trunk/autoconf/configure.ac
llvm/trunk/configure
Modified: llvm/trunk/Makefile.config.in
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/Makefile.config.in?rev=142997&r1=142996&r2=142997&view=diff
==============================================================================
--- llvm/trunk/Makefile.config.in (original)
+++ llvm/trunk/Makefile.config.in Tue Oct 25 19:52:13 2011
@@ -149,6 +149,9 @@
AR_PATH = @AR@
AR = @AR@
+# Path to the strip program,
+STRIP = @STRIP@
+
# Path to the nm program
NM_PATH = @NM@
Modified: llvm/trunk/Makefile.rules
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/Makefile.rules?rev=142997&r1=142996&r2=142997&view=diff
==============================================================================
--- llvm/trunk/Makefile.rules (original)
+++ llvm/trunk/Makefile.rules Tue Oct 25 19:52:13 2011
@@ -531,7 +531,7 @@
ifndef KEEP_SYMBOLS
Strip := $(PLATFORMSTRIPOPTS)
StripWarnMsg := "(without symbols)"
- Install.StripFlag += -s
+ Install.StripFlag += -s --strip-program=$(STRIP)
endif
ifdef TOOL_NO_EXPORTS
Modified: llvm/trunk/autoconf/configure.ac
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/autoconf/configure.ac?rev=142997&r1=142996&r2=142997&view=diff
==============================================================================
--- llvm/trunk/autoconf/configure.ac (original)
+++ llvm/trunk/autoconf/configure.ac Tue Oct 25 19:52:13 2011
@@ -897,6 +897,7 @@
AC_PATH_PROG(MV, [mv], [mv])
AC_PROG_RANLIB
AC_CHECK_TOOL(AR, ar, false)
+AC_CHECK_TOOL(STRIP,[strip], false)
AC_PATH_PROG(RM, [rm], [rm])
AC_PATH_PROG(SED, [sed], [sed])
AC_PATH_PROG(TAR, [tar], [gtar])
Modified: llvm/trunk/configure
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/configure?rev=142997&r1=142996&r2=142997&view=diff
==============================================================================
--- llvm/trunk/configure (original)
+++ llvm/trunk/configure Tue Oct 25 19:52:13 2011
@@ -721,6 +721,7 @@
MV
RANLIB
AR
+STRIP
RM
SED
TAR
@@ -6226,6 +6227,102 @@
AR="$ac_cv_prog_AR"
fi
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
+set dummy ${ac_tool_prefix}strip; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_prog_STRIP+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$STRIP"; then
+ ac_cv_prog_STRIP="$STRIP" # 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_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_STRIP="${ac_tool_prefix}strip"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+STRIP=$ac_cv_prog_STRIP
+if test -n "$STRIP"; then
+ { echo "$as_me:$LINENO: result: $STRIP" >&5
+echo "${ECHO_T}$STRIP" >&6; }
+else
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_STRIP"; then
+ ac_ct_STRIP=$STRIP
+ # Extract the first word of "strip", so it can be a program name with args.
+set dummy strip; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$ac_ct_STRIP"; then
+ ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # 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_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_STRIP="strip"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
+if test -n "$ac_ct_STRIP"; then
+ { echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5
+echo "${ECHO_T}$ac_ct_STRIP" >&6; }
+else
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+ if test "x$ac_ct_STRIP" = x; then
+ STRIP="false"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet. If you think this
+configuration is useful to you, please write to autoconf at gnu.org." >&5
+echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet. If you think this
+configuration is useful to you, please write to autoconf at gnu.org." >&2;}
+ac_tool_warned=yes ;;
+esac
+ STRIP=$ac_ct_STRIP
+ fi
+else
+ STRIP="$ac_cv_prog_STRIP"
+fi
+
# Extract the first word of "rm", so it can be a program name with args.
set dummy rm; ac_word=$2
{ echo "$as_me:$LINENO: checking for $ac_word" >&5
@@ -10460,7 +10557,7 @@
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
-#line 10463 "configure"
+#line 10560 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -21930,6 +22027,7 @@
MV!$MV$ac_delim
RANLIB!$RANLIB$ac_delim
AR!$AR$ac_delim
+STRIP!$STRIP$ac_delim
RM!$RM$ac_delim
SED!$SED$ac_delim
TAR!$TAR$ac_delim
@@ -21999,7 +22097,7 @@
LTLIBOBJS!$LTLIBOBJS$ac_delim
_ACEOF
- if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 89; then
+ if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 90; then
break
elif $ac_last_try; then
{ { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
More information about the llvm-commits
mailing list