Mail Archives: djgpp/2002/11/08/17:00:09
>Charles,
Hi Jeff,
>A quick and dirty for you....
>
>I saw "DOS to Linux" and am reminded of the problem I am working on now.
not dos to linux.. linux to dos. I am not sure how this applies to
your following observations.
but to clarify I am building/attempting to use a linux hosted cross
compiler with dos as the target executable. Source files compiled
will run on real mode DOS (with the dpmi), and Win32.
So far, I can only link against the C library with C source code and
included headers. When I try to link against libstdcxx.a and libm.a
(what G++ does), I get an executable that will not run in real mode
DOS or Win32. When I try, i get the SIGSEGV error.
>I have code developed with a djgpp compiler on a Wintel platform that
>cannot be simply ported to Linux absent extensive modification.
it sounds like you are doing the opposite of what I am doing..
>Some
>things you can compile with djgpp can't be directly recompiled on
>another compiler. It appears that one can do a lot with stack memory in
>djgpp that other compilers won't tolerate.
It sounds like you are speaking of using objects created on one
platform on another platform. So, far what I am doing is far more
simpler.
For what I am trying to do, I would expect that _if_ I am if fact
building the "cross libstdc++" library correctly, then my simple
welcome.cpp program should work with no problems. The source code
should be compilable on any platform.
#include <iostream>
int main() {
std::cout << "Hello, world !!!" << std::endl;
return 0;
}
I am assuming that since I can successfully cross compile C lib stuff
that the compiler / binutils builds went well. It is with C++
specifically that seems to be the issue.
Andrew Cottrell said something remotely similar today. He basically
indicated that the object file libraries provided in djcrx203.zip were
compiled with gcc-2.95.3 and that my trying to build a C++ library
against them with gcc-3.2 (different versions) may be causing the
problem. He recommended I try building the gcc-3.2 cross compiler
against the headers and object libraries in djcrx204_alpha.zip since
they were built with gcc-3.2
Unfortunately, I am getting the same results with the 204 alpha
package as I did with 203.
I will be documenting all of this today in an update showing what all
I am doing and what all is happening, but what it looks like it is
boiling down to is one of three things:
either I am building incorrectly
there is a major problem with the current libstdc++-v3 with djgpp as
the target. (this could mean that cross to dos support for djgpp2 is
currently broken and needs some tweaking)
It would be abundanly helpful to know if there is anyone out there
that has successfully built a linux to msdosdjgpp crosscompiler using
bash-2.05b, binutils-2.13.1, gcc-3.2, libstdc++-v3, djgppV2, and
libc-2.2.2 or greater.
I haven't tried doing any of this with newlib yet, but that is on the
list of "iterations of feeble attempts" provided that nobody else
chimes in with a fix.
>SIGSEV is ususally the result when you try and run them.
hehe the extent of my knowledge in this particular area is
Hello, world !!! == good
and
SIGSEGV == bad
greetings,
Charles
>
>Hope this helps,
>
>Jeff
- Raw text -