* [PATCH][GOLD] Fix build breaking issues.
@ 2010-02-04 22:07 Doug Kwan (關振德)
2010-02-05 0:21 ` Ian Lance Taylor
2010-02-06 16:15 ` Ralf Wildenhues
0 siblings, 2 replies; 4+ messages in thread
From: Doug Kwan (關振德) @ 2010-02-04 22:07 UTC (permalink / raw)
To: Ian Lance Taylor, binutils
[-- Attachment #1: Type: text/plain, Size: 418 bytes --]
Hi
This patch fixes a number of build breaking issues in different
configurations.
-Doug
2010-02-04 Doug Kwan <dougkwan@google.com>
* arm-reloc-property.cc (cstdio): Include.
* configure.ac (targetobjs): Remove duplicates.
* configure: Regenerate.
* resolve.cc (Symbol_table::resolve): Explicit instantiate both
big and little endian version for a given address size.
[-- Attachment #2: patch-build-fix.txt --]
[-- Type: text/plain, Size: 2976 bytes --]
Index: gold/arm-reloc-property.cc
===================================================================
RCS file: /cvs/src/src/gold/arm-reloc-property.cc,v
retrieving revision 1.2
diff -u -u -p -r1.2 arm-reloc-property.cc
--- gold/arm-reloc-property.cc 4 Feb 2010 03:32:18 -0000 1.2
+++ gold/arm-reloc-property.cc 4 Feb 2010 21:56:30 -0000
@@ -22,6 +22,7 @@
#include "gold.h"
+#include <cstdio>
#include <cstring>
#include <stack>
#include <string>
Index: gold/configure
===================================================================
RCS file: /cvs/src/src/gold/configure,v
retrieving revision 1.55
diff -u -u -p -r1.55 configure
--- gold/configure 29 Dec 2009 22:49:13 -0000 1.55
+++ gold/configure 4 Feb 2010 21:56:30 -0000
@@ -3410,6 +3410,9 @@ fi
fi
done
+# Remove any duplicates.
+targetobjs=`echo $targetobjs | tr ' ' '\n' | sort | uniq | tr '\n' ' '`
+
if test -n "$targ_32_little"; then
$as_echo "#define HAVE_TARGET_32_LITTLE 1" >>confdefs.h
Index: gold/configure.ac
===================================================================
RCS file: /cvs/src/src/gold/configure.ac,v
retrieving revision 1.52
diff -u -u -p -r1.52 configure.ac
--- gold/configure.ac 29 Dec 2009 22:49:13 -0000 1.52
+++ gold/configure.ac 4 Feb 2010 21:56:30 -0000
@@ -162,6 +162,9 @@ for targ in $target $canon_targets; do
fi
done
+# Remove any duplicates.
+targetobjs=`echo $targetobjs | tr ' ' '\n' | sort | uniq | tr '\n' ' '`
+
if test -n "$targ_32_little"; then
AC_DEFINE(HAVE_TARGET_32_LITTLE, 1,
[Define to support 32-bit little-endian targets])
Index: gold/resolve.cc
===================================================================
RCS file: /cvs/src/src/gold/resolve.cc,v
retrieving revision 1.53
diff -u -u -p -r1.53 resolve.cc
--- gold/resolve.cc 11 Jan 2010 07:09:48 -0000 1.53
+++ gold/resolve.cc 4 Feb 2010 21:56:30 -0000
@@ -916,7 +916,10 @@ Symbol_table::override_with_special(Size
// script to restrict this to only the ones needed for implemented
// targets.
-#ifdef HAVE_TARGET_32_LITTLE
+// We have to instantiate both big and little endian versions because
+// these are used by other templates that depends on size only.
+
+#if defined(HAVE_TARGET_32_LITTLE) || defined(HAVE_TARGET_32_BIG)
template
void
Symbol_table::resolve<32, false>(
@@ -927,9 +930,7 @@ Symbol_table::resolve<32, false>(
unsigned int orig_st_shndx,
Object* object,
const char* version);
-#endif
-#ifdef HAVE_TARGET_32_BIG
template
void
Symbol_table::resolve<32, true>(
@@ -942,7 +943,7 @@ Symbol_table::resolve<32, true>(
const char* version);
#endif
-#ifdef HAVE_TARGET_64_LITTLE
+#if defined(HAVE_TARGET_64_LITTLE) || defined(HAVE_TARGET_64_BIG)
template
void
Symbol_table::resolve<64, false>(
@@ -953,9 +954,7 @@ Symbol_table::resolve<64, false>(
unsigned int orig_st_shndx,
Object* object,
const char* version);
-#endif
-#ifdef HAVE_TARGET_64_BIG
template
void
Symbol_table::resolve<64, true>(
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH][GOLD] Fix build breaking issues.
2010-02-04 22:07 [PATCH][GOLD] Fix build breaking issues Doug Kwan (關振德)
@ 2010-02-05 0:21 ` Ian Lance Taylor
2010-02-06 16:15 ` Ralf Wildenhues
1 sibling, 0 replies; 4+ messages in thread
From: Ian Lance Taylor @ 2010-02-05 0:21 UTC (permalink / raw)
To: Doug Kwan (關振德); +Cc: binutils
"Doug Kwan (關振德)" <dougkwan@google.com> writes:
> 2010-02-04 Doug Kwan <dougkwan@google.com>
>
> * arm-reloc-property.cc (cstdio): Include.
> * configure.ac (targetobjs): Remove duplicates.
> * configure: Regenerate.
> * resolve.cc (Symbol_table::resolve): Explicit instantiate both
> big and little endian version for a given address size.
Please put "PR 11247" as the first line of the ChangeLog entry. See
existing examples.
This is OK with that change.
Thanks for looking into this.
Ian
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH][GOLD] Fix build breaking issues.
2010-02-04 22:07 [PATCH][GOLD] Fix build breaking issues Doug Kwan (關振德)
2010-02-05 0:21 ` Ian Lance Taylor
@ 2010-02-06 16:15 ` Ralf Wildenhues
2010-02-06 20:14 ` Ian Lance Taylor
1 sibling, 1 reply; 4+ messages in thread
From: Ralf Wildenhues @ 2010-02-06 16:15 UTC (permalink / raw)
To: Doug Kwan (關振德); +Cc: Ian Lance Taylor, binutils
Hello,
* Doug Kwan (éæ¯å¾·) wrote on Thu, Feb 04, 2010 at 11:07:18PM CET:
> 2010-02-04 Doug Kwan <dougkwan@google.com>
>
> * arm-reloc-property.cc (cstdio): Include.
> * configure.ac (targetobjs): Remove duplicates.
> * configure: Regenerate.
> * resolve.cc (Symbol_table::resolve): Explicit instantiate both
> big and little endian version for a given address size.
[...]
> --- gold/configure.ac 29 Dec 2009 22:49:13 -0000 1.52
> +++ gold/configure.ac 4 Feb 2010 21:56:30 -0000
> @@ -162,6 +162,9 @@ for targ in $target $canon_targets; do
> fi
> done
>
> +# 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.
Cheers,
Ralf
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH][GOLD] Fix build breaking issues.
2010-02-06 16:15 ` Ralf Wildenhues
@ 2010-02-06 20:14 ` Ian Lance Taylor
0 siblings, 0 replies; 4+ messages in thread
From: Ian Lance Taylor @ 2010-02-06 20:14 UTC (permalink / raw)
To: Ralf Wildenhues; +Cc: Doug Kwan (關振德), binutils
[-- Attachment #1: Type: text/plain, Size: 651 bytes --]
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.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: sh --]
[-- Type: text/x-diff, Size: 599 bytes --]
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,
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2010-02-06 20:14 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-02-04 22:07 [PATCH][GOLD] Fix build breaking issues Doug Kwan (關振德)
2010-02-05 0:21 ` Ian Lance Taylor
2010-02-06 16:15 ` Ralf Wildenhues
2010-02-06 20:14 ` Ian Lance Taylor
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).