public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* Re: Weird error cross-compiling glibc with binutils 2.22 or head
@ 2012-02-06 14:54 david.hagood
  2012-02-07 11:26 ` Alan Modra
  0 siblings, 1 reply; 11+ messages in thread
From: david.hagood @ 2012-02-06 14:54 UTC (permalink / raw)
  To: Andreas Schwab, jreiser; +Cc: binutils

>What else did you change in the mean time?  There is absolutely nothing
of binutils involved when constructing the sed command.

OK, let's start with the assumption that I am actually trying to follow
ESR's "How to ask questions the smart way", and that I am doing my
homework before coming to the list - if for no other reason than that I
want to resolve my problem as quickly as possible, and waiting on the list
is not conducive to that.

Now, the question of "what else did you change" is a fair question. Let me
put it like this:

I can change which version of binutils I build as my cross-compiler tool
chain to 2.20, and it builds. I change which version of binutils I build
as my cross compiler tool chain to 2.22, and it breaks. That is ONE LINE
in ONE MAKEFILE, which changes which tarball I unpack for the binutils
sources. Nothing else - not my host compiler tool chain, not my host
environment - changes. Yet, making that one change breaks the build.

Now again, I realize that "post hoc" does not always mean "propter hoc",
but when you change only one variable and the outcome changes, it is not
unreasonable to suspect that variable is the key, and to pursue that.
Since that variable is binutils, I am on this list.

John: Thanks for a constructive suggestion. I've looked at both my native
ld and the cross-ld. Neither contains the faulty line. And to recap:
neither does ANY file in the build process - not Makerules, not Makefile,
indeed NO FILE other than the generated linker script contains
"__start__es" or "{subfreeres = .);" - confirmed by grepping the whole
source and build tree. Nor are those strings anywhere in my native tool
chain.



^ permalink raw reply	[flat|nested] 11+ messages in thread
* Re: Weird error cross-compiling glibc with binutils 2.22 or head
@ 2012-02-03 22:51 david.hagood
  2012-02-03 23:02 ` Andreas Schwab
  0 siblings, 1 reply; 11+ messages in thread
From: david.hagood @ 2012-02-03 22:51 UTC (permalink / raw)
  To: Andreas Schwab; +Cc: binutils

You might actually READ my posting:

"
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."

As in, no make file, no tool, nothing contains that line. So why Make is
putting it into the runtime is not clear. Yes, I can SEE that the command
line to sed contains that line - but WHY it contains that is not clear, as
it does not appear in the make file, nor in any of the tools.


^ permalink raw reply	[flat|nested] 11+ messages in thread
* Weird error cross-compiling glibc with binutils 2.22 or head
@ 2012-02-03 22:00 david.hagood
  2012-02-03 22:41 ` Andreas Schwab
  2012-02-04  1:30 ` John Reiser
  0 siblings, 2 replies; 11+ messages in thread
From: david.hagood @ 2012-02-03 22:00 UTC (permalink / raw)
  To: binutils

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.


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2012-02-07 11:26 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-02-06 14:54 Weird error cross-compiling glibc with binutils 2.22 or head david.hagood
2012-02-07 11:26 ` Alan Modra
  -- strict thread matches above, loose matches on Subject: below --
2012-02-03 22:51 david.hagood
2012-02-03 23:02 ` Andreas Schwab
2012-02-03 23:53   ` David Hagood
2012-02-04  8:00     ` Andreas Schwab
2012-02-04 12:09       ` David Hagood
2012-02-04 14:40         ` Andreas Schwab
2012-02-03 22:00 david.hagood
2012-02-03 22:41 ` Andreas Schwab
2012-02-04  1:30 ` John Reiser

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).