[adtools] libstdc++-v3 Multilib Support

  • From: Trevor Scroggins <trevor.scroggins@xxxxxxxxx>
  • To: adtools@xxxxxxxxxxxxx
  • Date: Tue, 6 Jul 2010 16:05:21 -0700

All,

Cross-posted from Utilitybase.com:

***

Adtools trunk revision 356 (GCC 4.2.4) must be configured with
'--enable-version-specific-runtime-libs' to enable MULTISUBDIR support
in libstdc++-v3:

# Version-specific runtime libs processing.
if test $version_specific_libs = yes; then
# Need the gcc compiler version to know where to install libraries
# and header files if --enable-version-specific-runtime-libs option
# is selected. FIXME: these variables are misnamed, there are
# no executables installed in _toolexecdir or _toolexeclibdir.
if test x"$gxx_include_dir" = x"no"; then
gxx_include_dir='${libdir}/gcc/${host_alias}/${gcc_version}/include/c++'
fi
glibcxx_toolexecdir='${libdir}/gcc/${host_alias}'
glibcxx_toolexeclibdir='${toolexecdir}/${gcc_version}$(MULTISUBDIR)'
fi

Not only does this properly install multilibs, e.g. soft-float, it has
the side-effect of installing libs into
$PREFIX/lib/gcc/ppc-amigaos/4.2.4. The libs must still be moved to
$PREFIX/lib/gcc/ppc-amigaos/4.2.4/<crt>/lib.

This begs a new canonical configure command:

../$(SRC_DIR)/configure \
--with-bugurl='http://www.sf.net/projects/adtools' \
--with-pkgversion='adtools build $(VERSION)' \
--target=ppc-amigaos \
--prefix=$(PREFIX) \
--enable-languages=c,c++ \
--enable-haifa \
--enable-sjlj-exceptions \
--disable-libstdcxx-pch \
--disable-tls \
--enable-version-specific-runtime-libs

Of course, you can also configure with '--disable-multilib' to bypass
the whole mess.

***

I suppose the utility of '-msoft-float' is limited when the OS math
libraries are used; however, this small change does configure a
well-formed cross-compiler with hard-float and soft-float libraries in
the proper directories (prior to moving to <crt>/lib).

It would be helpful to have a script or documented process for
building an AmigaOS 4.x native GCC identical to the one provided by
the SDK. (And newlib sources would be helpful as well. ;-) With the
correct source in hand, binary incompatibilities in libstdc++.so
shouldn't be a problem for cross-compilers. Or, is that even an issue?
I haven't used ELF shared libraries under AmigaOS 4.x yet, so I don't
know what idiosyncrasies to expect.

Regards,

Trev
-- 
______________________________________________________________________________
Amiga Development tools ML - //www.freelists.org/list/adtools
Homepage...................: http://www.sourceforge.net/projects/adtools
Listserver help............: mailto:adtools-request@xxxxxxxxxxxxx?Subject=HELP

Other related posts: