[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Binary-branch PATCH: pointless code removal
From: |
Robert Boehne |
Subject: |
Binary-branch PATCH: pointless code removal |
Date: |
Wed, 03 Apr 2002 17:03:58 -0600 |
Network problems didn't seem to let this one through,
so here it is again...
Here's the "pointless code removal" patch for the
binary-branch. One question, are you generating
ltmain.in? If so, why is it in the repository?
2002-04-02 Robert Boehne <address@hidden>
* exe/compile-txt.tpl: Handle the case when no tag is explicitly set,
and
$base_compile has a space in front of $CC, and revert the setting
of tagname checked in to the HEAD branch on 2002-3-14.
* exe/link-txt.tpl: Ditto.
* exe/ltmain.tpl: Ditto.
* ltmain.in: Ditto.
Robert
--
Robert Boehne Software Engineer
Ricardo Software Chicago Technical Center
TEL: (630)789-0003 x. 238
FAX: (630)789-0127
email: address@hidden
? binary-fixup-tag-processing.patch
? INSTALL
? COPYING
Index: ltmain.in
===================================================================
RCS file: /cvsroot/libtool/libtool/ltmain.in,v
retrieving revision 1.200.2.67.2.7
diff -u -r1.200.2.67.2.7 ltmain.in
--- ltmain.in 16 Mar 2002 17:35:53 -0000 1.200.2.67.2.7
+++ ltmain.in 2 Apr 2002 21:58:29 -0000
@@ -105,9 +105,6 @@
lo2o="s/\\.lo\$/.${objext}/"
o2lo="s/\\.${objext}\$/.lo/"
-# set the tag name so that it defaults to CC
-tagname="CC"
-
# Parse our command line options once, thoroughly.
while test "$#" -gt 0
do
@@ -470,28 +467,25 @@
# Only attempt this if the compiler in the base compile
# command doesn't match the default compiler.
if test -n "$available_tags" && test -z "$tagname"; then
- case "$base_compile " in
- "$CC "*) ;;
+ case $base_compile in
# Blanks in the command may have been stripped by the calling shell,
# but not from the CC environment variable when ltconfig was run.
- "`$echo $CC` "*) ;;
+ " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "*) ;;
+ # Blanks at the start of $base_compile will cause this to fail
+ # if we don't check for them as well.
*)
for z in $available_tags; do
if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$0" > /dev/null;
then
# Evaluate the configuration.
eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^#
### END LIBTOOL TAG CONFIG: '$z'$/p' < $0`"
case "$base_compile " in
- "$CC "*)
+ "$CC "* | " $CC "* | "`$echo $CC` "* | " `$echo $CC` "*)
# The compiler in the base compile command matches
# the one in the tagged configuration.
# Assume this is the tagged configuration we want.
tagname=$z
break
;;
- "`$echo $CC` "*)
- tagname=$z
- break
- ;;
esac
fi
done
@@ -1520,24 +1514,21 @@
# command doesn't match the default compiler.
if test -n "$available_tags" && test -z "$tagname"; then
case $base_compile in
- "$CC "*) ;;
# Blanks in the command may have been stripped by the calling shell,
# but not from the CC environment variable when ltconfig was run.
- "`$echo $CC` "*) ;;
+ "$CC "* | " $CC "* | "`$echo $CC` "* | " `$echo $CC` "*) ;;
+ # Blanks at the start of $base_compile will cause this to fail
+ # if we don't check for them as well.
*)
for z in $available_tags; do
if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$0" > /dev/null;
then
# Evaluate the configuration.
eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^#
### END LIBTOOL TAG CONFIG: '$z'$/p' < $0`"
case $base_compile in
- "$CC "*)
+ "$CC "* | " $CC "* | "`$echo $CC` "* | " `$echo $CC` "*)
# The compiler in $compile_command matches
# the one in the tagged configuration.
# Assume this is the tagged configuration we want.
- tagname=$z
- break
- ;;
- "`$echo $CC` "*)
tagname=$z
break
;;
Index: exe/compile-txt.tpl
===================================================================
RCS file: /cvsroot/libtool/libtool/exe/Attic/compile-txt.tpl,v
retrieving revision 1.1.2.8
diff -u -r1.1.2.8 compile-txt.tpl
--- exe/compile-txt.tpl 17 Mar 2002 20:13:44 -0000 1.1.2.8
+++ exe/compile-txt.tpl 2 Apr 2002 21:58:29 -0000
@@ -167,24 +167,19 @@
# command doesn't match the default compiler.
if test -n "$available_tags" && test -z "$tagname"; then
case "$base_compile " in
- "$CC "*) ;;
+ "$CC "* | " $CC "* | "`$echo $CC` "* | " `$echo $CC` "*) ;;
# Blanks in the command may have been stripped by the calling shell,
# but not from the CC environment variable when ltconfig was run.
- "`$echo $CC` "*) ;;
*)
for z in $available_tags; do
if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$0" > /dev/null;
then
# Evaluate the configuration.
eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^#
### END LIBTOOL TAG CONFIG: '$z'$/p' < $0`"
case "$base_compile " in
- "$CC "*)
+ "$CC "* | " $CC "* | "`$echo $CC` "* | " `$echo $CC` "*)
# The compiler in the base compile command matches
# the one in the tagged configuration.
# Assume this is the tagged configuration we want.
- tagname=$z
- break
- ;;
- "`$echo $CC` "*)
tagname=$z
break
;;
Index: exe/link-txt.tpl
===================================================================
RCS file: /cvsroot/libtool/libtool/exe/Attic/link-txt.tpl,v
retrieving revision 1.1.2.3
diff -u -r1.1.2.3 link-txt.tpl
--- exe/link-txt.tpl 12 Mar 2002 02:06:26 -0000 1.1.2.3
+++ exe/link-txt.tpl 2 Apr 2002 21:58:30 -0000
@@ -751,24 +751,19 @@
# command doesn't match the default compiler.
if test -n "$available_tags" && test -z "$tagname"; then
case $base_compile in
- "$CC "*) ;;
+ "$CC "* | " $CC "* | "`$echo $CC` "* | " `$echo $CC` "*) ;;
# Blanks in the command may have been stripped by the calling shell,
# but not from the CC environment variable when ltconfig was run.
- "`$echo $CC` "*) ;;
*)
for z in $available_tags; do
if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$0" > /dev/null;
then
# Evaluate the configuration.
eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^#
### END LIBTOOL TAG CONFIG: '$z'$/p' < $0`"
case $base_compile in
- "$CC "*)
+ "$CC "* | " $CC "* | "`$echo $CC` "* | " `$echo $CC` "*)
# The compiler in $compile_command matches
# the one in the tagged configuration.
# Assume this is the tagged configuration we want.
- tagname=$z
- break
- ;;
- "`$echo $CC` "*)
tagname=$z
break
;;
Index: exe/ltmain.tpl
===================================================================
RCS file: /cvsroot/libtool/libtool/exe/Attic/ltmain.tpl,v
retrieving revision 1.1.2.10
diff -u -r1.1.2.10 ltmain.tpl
--- exe/ltmain.tpl 17 Mar 2002 20:08:20 -0000 1.1.2.10
+++ exe/ltmain.tpl 2 Apr 2002 21:58:30 -0000
@@ -83,9 +83,6 @@
show_help=
execute_dlfiles=
-# set the tag name so that it defaults to CC
-tagname="CC"
-
# Parse our command line options once, thoroughly.
while test "$#" -gt 0
do
- Re: PATCH: pointless code removal, Robert Boehne, 2002/04/01
- Re: PATCH: pointless code removal, Robert Boehne, 2002/04/02
- Re: PATCH: pointless code removal, Albert Chin, 2002/04/02
- Re: PATCH: pointless code removal, Bruce Korb, 2002/04/02
- Re: PATCH: pointless code removal, Robert Boehne, 2002/04/03