This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH][GOLD] Fix build breaking issues.


Ralf Wildenhues <Ralf.Wildenhues@gmx.de> writes:

>> +# Remove any duplicates.
>> +targetobjs=`echo $targetobjs | tr ' ' '\n' | sort | uniq | tr '\n' ' '`
>
> If this is supposed to run on Solaris systems, you might want to use
> \012 instead of \n as its /usr/bin/tr doesn't understand the latter.
> I don't think there are ELF non-ASCII systems(?) to worry about.

Thanks for pointing that out.  I rewrote the code to avoid using
external programs.  Patch committed as follows.

Ian


2010-02-06  Ian Lance Taylor  <iant@google.com>

	* configure.ac: Rewrite targetobjs duplicate removal code to use
	only shell constructs.
	* configure: Rebuild.


Index: configure.ac
===================================================================
RCS file: /cvs/src/src/gold/configure.ac,v
retrieving revision 1.53
diff -u -r1.53 configure.ac
--- configure.ac	5 Feb 2010 00:30:35 -0000	1.53
+++ configure.ac	6 Feb 2010 20:12:03 -0000
@@ -163,7 +163,14 @@
 done
 
 # Remove any duplicates.
-targetobjs=`echo $targetobjs | tr ' ' '\n' | sort | uniq | tr '\n' ' '`
+to=""
+for t in $targetobjs; do
+  case " $to " in
+  *" $t "*) ;;
+  *) to="$to $t" ;;
+  esac
+done
+targetobjs=$to
 
 if test -n "$targ_32_little"; then
   AC_DEFINE(HAVE_TARGET_32_LITTLE, 1,

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]