http://bugzilla.novell.com/show_bug.cgi?id=936463
http://bugzilla.novell.com/show_bug.cgi?id=936463#c15
--- Comment #15 from Stanislav Brabec ---
Do I understand correctly, that we need a multi-stage cross build for the
standard cross platform:
1) Native compiler.
2) Cross binutils.
3) Cross compiler stage 1. It can compile and link with -nostd*.
4) Cross glibc.
5) Cross compiler final. It can compile and link against glibc (either with
-isystem or even without, depending on configuration).
As far as I understand, we are now trying to provide stage 1 compilers. It
should already be able to link, otherwise cross-glibc could not be built.
Here is my question:
Could stage 1 compiler work without libgcc.a, or it will need an intermediate
libgcc.a? If stage 1 is intended to work without libgcc.a, what about e. g.
__divmodhi4 and similar, reference to which could be generated by compiler?
Note that AVR (maybe except 32-bit AVR) is a bit special case.
It is a very small platform (8-bit), and it cannot host glibc, so there will
not be cross-avr-glibc-devel. There will be no shared libraries as output.
But there is a project called avr-libc in CrossToolchain:avr, which just needs
to be modified to work with gcc5 (and create some compatibility wrapers like
"avr-gcc").
Maybe AVR will be needed two stage build, but maybe not.AVR libgcc.a needs to
contain just a few functions that compiler generates, e. g. __divmodhi4.
My tests:
- As it is, linking code compiled (with some effort) with gcc5+avr-libc fails
on missing symbol __divmodhi4 (not sure whether it was referenced in the code
or avr-libc code).
- I successfully built AVR libgcc.a somehow yesterday just by "make all-target"
and got this problem away, but I am failing today:
In file included from /usr/include/bits/time.h:88:0,
from /usr/include/time.h:41,
from /usr/include/pthread.h:24,
from ./gthr-default.h:35,
from ../../../../libgcc/gthr.h:148,
from ../../../../libgcc/unwind-dw2.c:37:
/usr/include/bits/timex.h:50:3: error: width of '<anonymous>' exceeds its type
int :32; int :32; int :32; int :32;
...
../../../../libgcc/static-object.mk:17: recipe for target 'unwind-dw2.o' failed
I am not sure, whether it is a problem that should go away with fix in the
comment 1. (avr-libc has no pthread.h, so it can never compile there).
--
You are receiving this mail because:
You are on the CC list for the bug.