This is the mail archive of the crossgcc@sourceware.org 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] |
Robert, All, On Wednesday 28 July 2010 16:35:37 Robert P. J. Day wrote: > here's a question for which i'm pretty sure i know the answer, but i > need to be absolutely sure. > i'm trying to cross-compile a downloaded tarball (the toolchain was > downloaded from a vendor), and the instructions for cross-compiling > were simply to > $ make CC=arm-...-gcc LD=arm-...-ld > which is pretty standard. but the cross compile failed almost > immediately, complaining about a missing "curses.h" file. As Ralf stated, the curses headers (and libs!) are not part of the toolchain. What I do consider to be are: - sanitised kernel headers (if targetting Linux) - C library headers - optionally, some internal headers from gcc, such as libstdc++ et al. The same goes for libraries: - the C library .so and .a files, plus any so-called start-files, namely crt{i,n,1].o et al. - the internal gcc libraries: libgcc_s.so, libmudflap.so, et al. > the software compiles fine natively on my ubuntu 10.04 system, > because i have all the curses-related packages installed. but if i'm > trying to cross-compile, is it not the responsibility of the > *toolchain* to supply all necessary standard header files? Well, standard is by no mean meaningful here. On a desktop PC, then one can quite safely say that curses is standard, while on an embedded device it is not. What I can say is that ncurses is not a standard part of a _toolchain_. > as soon as i got that error, i checked where i installed the > toolchain and noticed immediately that there was no curses.h file, and > mentioned that. > someone else claimed that what i really needed to do was install the > toolchain at /opt rather than elsewhere because the README claimed > that the toolchain wasn't relocatable. but i can't see how that's > relevant. Irrelevant, indeed. But non-sysrooted toolchains are a PITA, and you should definitely shake your distributor off to give you a sysrooted toolchain. And the code with that, so you can build your better own. > if i'm trying to cross-compile, and a C file includes a header file, > and the toolchain doesn't supply that header file, shouldn't i expect > the build to fail? i certainly don't expect the cross compiler to > wander off, looking for header files elsewhere so my position is that > that toolchain simply isn't capable of compiling anything that > requires curses capability because it doesn't provide a curses.h file. The compiler should find standard toolchain includes from wherever it was configured to find them. For the other headers, there's the -I flag to the preprocessor. Ditto for the linker and libraries, there's -L. Regards, Yann E. MORIN. -- .-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------' -- For unsubscribe information see http://sourceware.org/lists.html#faq
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |