This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Weird error cross-compiling glibc with binutils 2.22 or head
- From: david dot hagood at gmail dot com
- To: binutils at sourceware dot org
- Date: Fri, 3 Feb 2012 15:59:45 -0600
- Subject: Weird error cross-compiling glibc with binutils 2.22 or head
I am building a cross compile environment for ARM, PPC, and X86, and due
to the other issues discussed on the list, I am trying to do it with
binutils 2.22 (and binutils head, no change).
The issue is that when building glibc for the ARM (but, curiously, NOT for
the PPC - same tools, same commands, just a different target arch) I get
an error in the compile of glibc:
arm-linux-gnueabi-gcc -nostdlib -nostartfiles -r -o
Build/arm-linux-gnueabi/glibc_main/libc_pic.os \
-Wl,-d -Wl,--whole-archive
Build/arm-linux-gnueabi/glibc_main/libc_pic.a
arm-linux-gnueabi-gcc -shared -Wl,-O1 \
-nostdlib -nostartfiles \
-Wl,-dynamic-linker=/lib/ld-linux.so.3 -Wl,-z,combreloc
-Wl,-z,relro
-Wl,--hash-style=both \
-Wl,--verbose 2>&1 | \
sed > Build/arm-linux-gnueabi/glibc_main/shlib.ldsT \
-e '/^=========/,/^=========/!d;/^=========/d' \
-e 's/^.*\.gnu\.hash[ ]*:.*$/ .note.ABI-tag : {
*(.note.ABI-tag)
} &/' -e '/^[ ]*\.hash[ ]*:.*$/{h;d;}' -e
'/DATA_SEGMENT_ALIGN/{H;g}' \
-e 's/^.*\*(\.dynbss).*$/& \
PROVIDE(__start___libc_freeres_ptrs = .); \
*(__libc_freeres_ptrs) \
PROVIDE(__stop___libc_freeres_ptrs = .);/'\
-e 's@^.*\*(\.jcr).*$@& \
PROVIDE(__start__es : {subfreeres = .);\
__libc_subfreeres : { *(__libc_subfreeres) }\
PROVIDE(__stop___libc_subfreeres = .);\
PROVIDE(__start___libc_atexit = .);\
__libc_atexit : { *(__libc_atexit) }\
PROVIDE(__stop___libc_atexit = .);\
PROVIDE(__start___libc_thread_subfreeres = .);\
__libc_thread_subfreeres : { *(__libc_thread_subfreeres) }\
PROVIDE(__stop___libc_thread_subfreeres = .);\
/DISCARD/ : { *(.gnu.glibc-stub.*) }@'
mv -f Build/arm-linux-gnueabi/glibc_main/shlib.ldsT
Build/arm-linux-gnueabi/glibc_main/shlib.lds
<snip a buch of items>
Build/arm-linux-gnueabi/glibc_main/elf/ld.so -lgcc
ld:Build/arm-linux-gnueabi/glibc_main/shlib.lds:149: syntax error
The error is:
PROVIDE(__start__es : {subfreeres = .);
(note the unbalanced { and ))
I have no idea where that is coming from: it's not in any of the makefiles
for binutils, glibc, or gcc, it's not in my host toolchain - and it
doesn't happen on PPC.
I've search the web, and found files in pastebin with the same error,
dating just a couple of days ago, but no references to those files on
either binutils, glibc, or GCC's mailing lists.