Mail Archives: djgpp/2002/11/07/12:45:16
>You're partly mixing up the library implementation with library usage.
I don't see how I am doing this. Lets not belabor this issue. We
both know the difference between an implementation and library usage.
>Yes, C++ does let you use C standard library functions.
correct..
>But no, that
>does not mean a C++ compiler maker, or even a C++ runtime maker, must
>supply its own copy of an implementation of the C libraries.
I never said that it did. I am referring to libstd++ and have gone to
great lengths to make this clear. Language is our barrier here, not
our comprehension. I never once made mention of glibc or libc.
>You just
>have to make sure that some implementation exists, and is found by the
>compiler / linker.
It is not that simple when we are talking about a cross compiler that
creates a binary for a target different than the host. Is it?
The archive libstdc++.a which is created by a typical native install
of gcc-3.2 is _not_ what the cross compiler / linker seeks.
The cross compiler / linker seeks an archive library created using the
cross binutils. ( libstdcxx.a )
read on...
>All that really matters
>in the end is that you have a set of headers and library files.
True!
The end of a successful build is what I seek :)
>It
>doesn't matter where it came from.
This needs to be clarified...
It does matter where the library comes from and how it is created.
One cannot simply take libstdc++.a and plop it into place for a cross
compiler that creates executables for a different target. Can they?
(since I am not an expert, I could be mistaken with this)
If you read the post carefully at the beginning of this thread, at the
end it mentions:
"Below is the output for: g++ with the -Wl,--verbose
Note that libstdcxx.a is not found..."
In the case of the cross compiler
i686-pc-msdosdjgpp-g++ what is required for linking is libstdcxx.a
In the case of the native compiler
i686-pc-linux-gnu what is required for static linking is libstdc++.a
>> I just want to be clear that I will be able to build a cross gcc that
>> makes DOS executables with the same full C++ support that a natively
>> built GCC-3.2 can do.
>
>It should be possible, indeed. But getting it done may require more
>insight into the GCC build process' intricacies than either you or I
>have, off the top of our heads. Andris should be able to provide more
>insight, but he doesn't seem to be listening right now.
I agree, help is needed.
But for now, since I have isolated the problem to specifically be with
the libstdc++ build and not the gcc build itself, I can focus on
building libstdc++ separately from gcc.
>>>You might just cheat and install the libraries of the native DJGPP GCC
>>>build, of course.
>> I tried linking against them and it didn't work.
>
>Linking alone won't be enough. You'll have to use the natively built
>headers, too, than. And put them in a place that makes absolutely
>sure they're found, instead of the host system's ones.
How can this work without building the library with knowledge that it
is for a different target?
Without the archive library ( libstdcxx.a ) created in the binary
format that is compatible with the target executable ( dos not linux
), how could simply copying the natively built libraries and natively
built headers to the correct locations work?
Charles
- Raw text -