This is the mail archive of the 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

Loren James Rittle wrote:
Dan, thanks for keeping the list apprised of the issue.  Once you
reported that mapping to the system mutex implementation appeared
correct under gdb, I was at a loss.  If your patch works, report the
fact and we will get it into gcc 3.1.1 and the mainline.
Thanks, I will!  If we get inspired, maybe we'll throw in a regression test, too.

The first patch I made works great: the resulting gcc does indeed define __PPC405__
if I give the appropriate -mcpu option on the gcc commandline.

Unfortunately, the second patch isn't triggering.  It seems libstdc++ is
built using xgcc without the appropriate -mcpu option, and
 objdump -S gcc-build-ppc405/powerpc-linux/libstdc++-v3/src/.libs/misc-inst.o
reveals that my nice macro is expanding to nothing, because the
compiler didn't know I was building for ppc405.

Am I running afoul of some nice feature of gcc, where the library is
compiled in a generic way so it can be used for multiple architectures?
Or am I just configuing gcc wrong?

Here's how I'm configuring and building:

../gcc-3.0.2/configure --target=powerpc-linux --prefix=/opt/hardhat/devkit/ppc/405
--with-headers=/opt/hardhat/devkit/ppc/405/target/usr/include --enable-shared
--enable-long-long --enable-threads=posix --enable-langugages=c,c++ --with-cpu=403 --nfp

mv -f Makefile Makefile.orig
sed -e 's/^TARGET_CONFIGDIRS.*$/TARGET_CONFIGDIRS = libiberty libstdc++-v3 boehm-gc zlib/' Makefile.orig

Is there a way I can force libstdc++ to be compiled with the appropriate -mcpu option?

(No comments about 403 vs. 405, please; the reason I keep saying 'the appropriate -mcpu option'
is because I use -mcpu=403 always, as there is no -mcpu=403 in gcc3.0.2, and I've
hacked rs6000.h to make -mcpu=403 define __PPC405__.  In gcc3.1, this hackery won't
be needed, but I'm pretty sure it's not part of my problem.)


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