This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
[PATCH] ld/ldlang.c: fatal error on architecture mismatch
- From: Robert Millan <rmh at aybabtu dot com>
- To: binutils at sourceware dot org
- Date: Sat, 28 Apr 2007 20:57:23 +0200
- Subject: [PATCH] ld/ldlang.c: fatal error on architecture mismatch
Hi,
This is a common problem in a mixed i386/x86_64 environment. If you're
compiling something for 32-bit, but /usr/lib/libfoo.a is 64-bit, autoconf
scripts checking for availability of static libfoo should fail. However:
$ cat test.c
#include <unicode/ubidi.h>
main ()
{
ubidi_open ();
}
$ gcc -m32 -o /dev/null test.c /usr/lib/libsicuuc.a
/usr/bin/ld: warning: i386:x86-64 architecture of input file `/usr/lib/libsicuuc.a(ubidi.ao)' is incompatible with i386 output
[...]
$ echo $?
0
This results in the build system thinking that /usr/lib/libsicuuc.a is usable
for linking 32-bit code with it.
ld/ChangeLog:
2007-04-28 Robert Millan <rmh@aybabtu.com>
* ldlang.c (lang_check): Fatal error on architecture mismatch.
Patch against current CVS is attached.
--
Robert Millan
My spam trap is honeypot@aybabtu.com. Note: this address is only intended
for spam harvesters. Writing to it will get you added to my black list.
2007-04-28 Robert Millan <rmh@aybabtu.com>
* ldlang.c (lang_check): Fatal error on architecture mismatch.
Index: ld/ldlang.c
===================================================================
RCS file: /cvs/src/src/ld/ldlang.c,v
retrieving revision 1.261
diff -u -r1.261 ldlang.c
--- ld/ldlang.c 28 Apr 2007 06:04:28 -0000 1.261
+++ ld/ldlang.c 28 Apr 2007 18:13:07 -0000
@@ -5156,7 +5156,7 @@
if (compatible == NULL)
{
if (command_line.warn_mismatch)
- einfo (_("%P: warning: %s architecture of input file `%B'"
+ einfo (_("%P%F: %s architecture of input file `%B'"
" is incompatible with %s output\n"),
bfd_printable_name (input_bfd), input_bfd,
bfd_printable_name (output_bfd));