Dear buildroot list.
Peter S. Mazinger
ps.m at gmx.net
Sun Oct 16 10:28:14 UTC 2005
On Fri, 14 Oct 2005, Rob Landley wrote:
> Sorry to ask a uClibc question on the buildroot list, but I don't know where
> else to go.
>
> The short thing seems to be that gcc 4.0.2 wants to call dl_iterate_phdr, and
> Erik removed it here:
> http://www.uclibc.org/cgi-bin/viewcvs.cgi?rev=9216&view=rev
>
> The long explanation:
>
> I'm trying to get gcc 4.0.2 to build against uClibc, starting with the
> invocation I made to get 3.2 to build and figuring out what new breakage the
> gcc developers managed to come up with. Basically I ran a few sed
> invocations against the gcc sources (both to teach it about uClibc and to
> prefix its directories with /tools, ala Linux From Scratch chapter 5), did
> a ./configure, and ran "make quickstrap". Voiala, cross compiler.
>
> Unfortunately, gcc 4.0 contains a package "libmudflap" which is A) evil, B)
> totally undocumented. Even google can't tell me what this thing does or
> whether I actually need it. All I know is it breaks the build.
>
> During its ./configure (which doesn't run during the top level ./configure but
> during the make quickstrap: THANK you, gcc developers!), it tries to create
> and run an executable using the half-finished compiler the system is
> building. (Ha ha, if you were using a cross-compiler you'd have specified a
> different --target!) Of course this compiler was told to link its binaries
> against uClibc, which I haven't installed yet, so this fails with can't find
> crt0. Right.
>
> So I install uClibc (0.9.27, I still need to upgrade busybox tar to understand
> the "--exclude" option before 0.9.28's headers will install), re-run the
> thing, and now it's complaining it can't find dl_iterate_phdr:
>
> /home/landley/newbuild/firmware-build/tools/sources/gcc-build/gcc/libgcc_s.so:
> undefined reference to `dl_iterate_phdr'
>
> Which there are indeed calls to in the source code:
>
> landley at driftwood:~/newbuild/firmware-build/tools/sources/gcc-4.0.2$ find . |
> xargs grep dl_iterate_phdr
> ./gcc/ChangeLog.6: (_Unwind_FindTableEntry): Use dl_iterate_phdr.
> ./gcc/unwind-dw2-fde-glibc.c: segment and dl_iterate_phdr to avoid
> register/deregister calls at
> ./gcc/unwind-dw2-fde-glibc.c: if (dl_iterate_phdr
> (_Unwind_IteratePhdrCallback, &data) < 0)
> ./gcc/config/ia64/fde-glibc.c: if (dl_iterate_phdr
> (_Unwind_IteratePhdrCallback, &data) < 0)
uClibc shouldn't make use of unwind-dw2-fde-glibc.c only of
unwind-dw2-fde.c, so either you haven't used the 100_*uclibc* patch from
buildroot, or the patch there is incorrect
Peter
> Does anyone have any obvious suggestions? Why was it removed from uClibc?
> This is not something upgrading to 0.9.28 is likely to fix because according
> to subversion the symbol is still missing. Should I just try to chop it out
> of the source code?
>
> Rob
>
> P.S. I patched gcc/unwind-dw2-fde-glibc.c to replace the call with if(0), and
> it seems to have built. I think the only reason it should ever want to do
> stack unwinding is for debugging or c++, neither of which I'm currently
> using. But I thought I should mention it anyway...
>
>
--
Peter S. Mazinger <ps dot m at gmx dot net> ID: 0xA5F059F2
Key fingerprint = 92A4 31E1 56BC 3D5A 2D08 BB6E C389 975E A5F0 59F2
More information about the uClibc
mailing list