This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ 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: libstdc++ atomicity.h and ppc405 problem


On Thu, Jul 18, 2002 at 06:20:37PM -0700, Dan Kegel wrote:
> Dan Kegel wrote:
> > Is there a way I can force libstdc++ to be compiled with the appropriate 
> > -mcpu option?

When I was reading your messages, I thought to myself, "he's about to
discover multilibs, I wish him well..."  And there are some comments about
those below.

While experimenting, however, you might configure your build with the

    --enable-cxx-flags='-mcpu=405'

option.  That's a hook described in the libstdc++ documentation as a way of
passing arbitrary options to the libstdc++ build.  (But only that library,
and the flags are not turned on automatically for users of the installed
compiler/libs.  They are build-time only.)

As trial-and-error, this would go much quicker than multilibs.


> I'm now reading about gcc's "multilibs" build option.
> Perhaps if I edit gcc/config/rs6000/t-rs6000 to read
> 
> MULTILIB_OPTIONS = mcpu=405 msoft-float
> 
> instead of just
> 
> MULTILIB_OPTIONS = msoft-float
> 
> I would get both generic and ppc405-specific versions?

You would get four versions:  2^N libraries for N entries in the
multilib_options list.  (Unless you specify particular combinations to
/not/ build.)

> Does that affect libstdc++ builds as well as libgcc builds?

Yes.  It affects all the target libraries, meaning, all the subdirectories
you see under the <builddir>/powerpc-linux/ directory.


> Sigh.  I'm such a gcc newbie.

:-)  The following paragraphs were written in a tongue-in-cheek manner, so
please take them as such.

Most people don't learn about multilibs until they break them; count
yourself ahead of the curve.

You are about to learn (if you don't know already) of another aspect of
GCC development, however:  port maintainership.  The gcc/config/.... files
are outside the realm of libstdc++.  So while a multilibs change like the
one above may be an appropriate solution, you would have to convince

    fenric 4% grep rs6000 MAINTAINERS
    rs6000 port             Geoff Keating           geoffk@redhat.com
    rs6000 port             David Edelsohn          dje@watson.ibm.com
    fenric 5% 

on the gcc-patches mailing list to make the change.  Since adding options to
the multilibs list exponentially increases the time it takes to bootstrap
gcc, most such changes are frowned upon.  So in the worst case (from your
point of view), you might have to maintain the change as a third party patch.


Phil

-- 
If ye love wealth greater than liberty, the tranquility of servitude greater
than the animating contest for freedom, go home and leave us in peace.  We seek
not your counsel, nor your arms.  Crouch down and lick the hand that feeds you;
and may posterity forget that ye were our countrymen.            - Samuel Adams


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