This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


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: stdio.h: File not found?!?


Martin Krischik kirjoitti:

> I did not expect to need a mingw-runtime before the 2nd step (creating a
> --build=x86_64-suse-linux --host=mingw --target=mingw compiler)

In order to produce MinGW apps on Linux, you need binutils, GCC and
target headers plus libraries... A GCC which can only produce 'i386-pe'
objects (the Windoze object format) with 'as' from binutils, isn't very useful
for anything...


Producing GCC requires a "complete C compiler". The "ISO99 C compiler"
the "Prerequisites" in the "Installing GCC" talks about is something very weird
gibberish for most people. Because GCC oneself cannot produce GCC, then
GCC isn't a "ISO99 C compiler" or how?
Of corse: since it is a --build=x86_64-suse-linux --host=x86_64-suse-linux
compile using /usr/include/stdio.h should be ok as well. Or did I miss read
the cross compile instructions completely?
Probably... The ones in the gcc-2.95.3 manual are still true! When the cross
compile instructions clearly tell that the target C library MUST be present, its
headers required for fixing them for GCC first, then used when producing the
target libraries (libgcc, libiberty, libstdc++,...), and the library binaries required
for checking what the target C library has or has not, you should believe ! And
when the author of the manual is called Richard M.Stallman, what reasons you
have to not believe? Although the current version is 4.x, these basic things
haven't changed at all, still there is that 'fixincludes' phase, target headers used
when producing 'libgcc.a' and target libraries used when producing 'libgcc_s.so'
(for Unix-like targets) and when doing link tests during the libiberty and libstdc++
configures...


> You see me confused. I thought that a "--build=x86_64-suse-linux
> --host=x86_64-suse-linux" compiler is to run under Linux - what does is need
> a MinGW runtime so soon? - I am only trying to create the cross-compiler itself
> - I am not yet trying to create any MinGW binaries with it.


Even "compiling" that "Hello World" has the "#include <stdio.h>", so most newbies
know these (target) headers being obligatory. "Linking" it then requires the startups
and those target libraries ('libc' usually but with MinGW that is 'libmsvcrt'). So what
you think a compiler being differs horribly about what a newbie thinks it being and
what one can do with a "compiler"... Usually this requirement is "It can compile the
Hello World", and here that "compile" means "producing the executable "hello.exe"
from the source "hello.c" !


The expectation for "producing a crosscompiler for MinGW" is that the builder
wants to be capable to (at least) produce that "Hello World" for MinGW after the
compiler is ready.



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