This is the mail archive of the crossgcc@sources.redhat.com mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: "What are you doing with crtstuff.c" on gcc-3.4.0 arm build


Kai Ruottu wrote:



Toralf Lund wrote:

Does anyone know what this is supposed to mean?

../../gcc-3.4.0/gcc/crtstuff.c:405:2: #error "What are you doing with crtstuff.c, then?"


Why not simply read yourself? :) The wrappers around the line 405 are:

    #else /* ! INIT_SECTION_ASM_OP && ! HAS_INIT_SECTION */
    #error "What are you doing with crtstuff.c, then?"
    #endif


Isn't this clear?

No, not very. I realised right away that the message was dependent on certain macro defintions, or rather, the lack thereof, but it isn't evident what exactly they mean, or where they ought to be set.


COFF probably hasn't the '.init' and '.fini'
sections and handles their job in the '__main()' or '__gcc_main()'
or something function in '.text' section...  ELF usually has these
two extra sections for 'crtbegin' and 'crtend'.

 Already the 'gcc/config/arm/t-arm-coff' seems to have these 'crt*.o'
parts defined needed meanwhile the '.../t-xscale-coff' doesn't... So
it seems to be a plain vanilla bug in GCC since gcc-3.3...

So please edit your 'gcc/Makefile' and remove the

EXTRA_MULTILIB_PARTS = crtbegin.o crtend.o

from it, or edit the original 't-arm-coff' and let a new Makefile
be produced when writing 'make ...'

OK...



I get this when trying to build gcc-3.4.0 for arm-coff, during the "bootstrap compiler" step.


 Please explain this 'bootstrap'...  Building an 'arm-coff' targeted
GCC needs only one stage, just as any normal cross-GCC,

That's new to me. Isn't the consensus here that you have to


  1. Build binutils
  2. Build a C-compiler with which you can build newlib, specifically a
     minimal gcc setup; you can't create a full gcc as that actually
     requires an implementation of libc
  3. Build newlib.
  4. Re-build gcc - now a full setup with newlib support.


See http://crossgcc.billgatliff.com/crossgccfaq/t1.html


That's when starting from scratch, of course, i.e. not relying on a cross compiler already being installed on the system.

these newlib
based GCC are only working in the cross-GCC configuration, no native
choices... Recently I built a gcc-3.3.2 based toolchain for the
'xscale-coff' target and there was no problems in building it normally
in one stage, when starting from scratch.

Are you sure that's not "one step" when you are using build tool that actually do the steps outlined above?


The 'arm-coff' should be
quite the same and I don't expect gcc-3.4.0 breaking anything...

Meanwhile a native GCC build requires three build stages, the 'bootstrap'
stage with a 'bootstrap compiler' being the stage 1.


Maybe you meaned that you must first update your native GCC or the cross
GCC used to produce the GCC binaries. This can be called as the "bootstrap compiler" step.


Cheers, Kai



------
Want more information? See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com



------ Want more information? See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/ Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]