delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2002/11/08/17:00:09

NNTP-Posting-Date: Fri, 08 Nov 2002 15:49:28 -0600
From: Charles Wilkins <chas AT pcscs DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: i686-pc-msdosdjgpp-g++ problems (long)
Date: Fri, 08 Nov 2002 16:51:23 -0500
Message-ID: <vbaosuor134o08np74bt7ghf0lgpiidj1o@4ax.com>
References: <lrplsuounbjm9n878rvu4e4sobqofcu437 AT 4ax DOT com> <Pine DOT GSO DOT 4 DOT 21 DOT 0211072301220 DOT 26998-100000 AT neptune DOT calstatela DOT edu> <fqtnsus1c9ns6seotvrsa7m9155ug310v2 AT 4ax DOT com> <3DCC18A8 DOT D4CFF7EE AT lmco DOT nospam DOT com>
X-Newsreader: Forte Agent 1.92/32.570
MIME-Version: 1.0
Lines: 89
NNTP-Posting-Host: 68.45.75.113
X-Trace: sv3-q9V5v8OmsVjsZadGQvw+uyKH93VZ93IxPUsNQmA7uiYsHiU0LcWwwJ7GYazpVhir/YxefaUy7sttrlg!4k4C2Gu9ewdH6voUjKCjtjccOOuptBcIiaLiLydbtLm5sxjHnF5c36biLcSord8/uIDizB8=
X-Complaints-To: abuse AT comcast DOT com
X-DMCA-Complaints-To: dmca AT comcast DOT net
X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers
X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly
X-Postfilter: 1.1
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

>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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019