delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2002/11/07/12:45:16

NNTP-Posting-Date: Thu, 07 Nov 2002 11:36:19 -0600
From: Charles Wilkins <chas AT pcscs DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: problems making linux build/host for target msdosdjgpp
Date: Thu, 07 Nov 2002 12:38:12 -0500
Message-ID: <3c7lsuk8r4vl9sn342g6n1hv55es7k5tal@4ax.com>
References: <004201c285fd$3969cb90$021ca8c0 AT helm> <aqdjot$l2h$1 AT nets3 DOT rz DOT RWTH-Aachen DOT DE> <tmtksu0eplnnu9rbb39591kvmu5mnj3s16 AT 4ax DOT com> <aqdug4$2oc$1 AT nets3 DOT rz DOT RWTH-Aachen DOT DE> <ia0lsu8ihg4dsopq3im5icd6riuilgvtbo AT 4ax DOT com> <aqe37n$7ug$1 AT nets3 DOT rz DOT RWTH-Aachen DOT DE>
X-Newsreader: Forte Agent 1.92/32.570
MIME-Version: 1.0
Lines: 84
X-Trace: sv3-i19+DHgIzsTUOiLvNj4U0eKcDBJ5x5E65Uh0jMqgLuJJ3mZtT/Pj3JUZ4l6Vic4Fo0qdzyiEJ3pPAfX!adicaiisZ3VujStVkTZ24hRrVQL/oo8/jzcRNpzmjhWCyDcng8bV/ZBpFeULKuNA8clSCtw=
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

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


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