- add a i386/t-netbsd64 makefile fragment to build 32/64 bit

libgcc/multilib on amd64
- enable the 32/64 bit libgcc/multilib support on sparc64
- adapt mknative-gcc to grab multilib.h
- use --enable-multilib on amd64 and sparc64

none of this affects the installed tools yet, just the src/tools one.
This commit is contained in:
mrg 2008-10-11 05:03:43 +00:00
parent c53df256ca
commit 9917d709a8
5 changed files with 30 additions and 12 deletions

View File

@ -1036,6 +1036,7 @@ i[34567]86-*-netbsd*)
;;
x86_64-*-netbsd*)
tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h netbsd.h netbsd-elf.h i386/x86-64.h i386/netbsd64.h"
tmake_file="${tmake_file} i386/t-netbsd64"
;;
i[34567]86-*-openbsd2.*|i[34567]86-*openbsd3.[0123])
tm_file="i386/i386.h i386/unix.h i386/bsd.h i386/gas.h i386/gstabs.h openbsd-oldgas.h openbsd.h i386/openbsd.h"

View File

@ -0,0 +1,9 @@
# NetBSD has (will have) "non-native" libraries in /usr/lib/<arch>.
# For NetBSD/amd64 we thus have /usr/lib and /usr/lib/i386.
MULTILIB_OPTIONS = m64/m32
MULTILIB_DIRNAMES = 64 32
MULTILIB_OSDIRNAMES = . ../lib/i386
LIBGCC = stmp-multilib
INSTALL_LIBGCC = install-multilib

View File

@ -1,8 +1,9 @@
# Disable multilib fow now, as NetBSD/sparc64 does not ship with
# a 32-bit environment.
#MULTILIB_OPTIONS = m32/m64
#MULTILIB_DIRNAMES = 32 64
#MULTILIB_MATCHES =
# NetBSD has (will have) "non-native" libraries in /usr/lib/<arch>.
# For NetBSD/sparc64 we thus have /usr/lib and /usr/lib/sparc.
#LIBGCC = stmp-multilib
#INSTALL_LIBGCC = install-multilib
MULTILIB_OPTIONS = m64/m32
MULTILIB_DIRNAMES = 64 32
MULTILIB_OSDIRNAMES = . ../lib/sparc
LIBGCC = stmp-multilib
INSTALL_LIBGCC = install-multilib

View File

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.27 2007/09/20 12:26:51 drochner Exp $
# $NetBSD: Makefile,v 1.28 2008/10/11 05:03:44 mrg Exp $
.include <bsd.own.mk>
@ -10,9 +10,15 @@ BINENV= /usr/bin/env -i
VAX_CONFIGURE_ARGS=
.if ${MACHINE_ARCH} == "x86_64" || ${MACHINE_ARCH} == "sparc64"
MULTILIB_ARGS= --enable-multilib
.else
MULTILIB_ARGS= --disable-multilib
.endif
CONFIGURE_ARGS= --target=${MACHINE_GNU_PLATFORM} --disable-nls \
--enable-long-long \
--disable-multilib \
${MULTILIB_ARGS} \
--enable-threads \
${VAX_CONFIGURE_ARGS} \
--program-transform-name="s,^,${MACHINE_GNU_PLATFORM}-," \
@ -39,6 +45,7 @@ MKNATIVE_ENV= ${BINENV} ${CONFIGURE_ENV:NC*:NLD*} \
ac_cv_prog_cc_cross=yes \
ac_cv_func_strcoll_works=yes \
gcc_cv_func_printf_ptr=yes \
gcc_cv_libc_provides_ssp=yes \
gdb_cv_printf_has_long_double=yes \
gdb_cv_printf_has_long_long=yes \
gdb_cv_scanf_has_long_double=yes
@ -87,7 +94,7 @@ native-gcc: .native/.configure_done
# edit Makefile so that maybe-all-gcc does not depend on all-gcc any more.
(cd .native && mv Makefile Makefile.config && \
sed -e 's/\(maybe-all-gcc:\) all-gcc/\1/' < Makefile.config > Makefile) && \
(cd .native/gcc && ${MKNATIVE_ENV} ${BUILD_MAKE} -e tree-check.h config.h)
(cd .native/gcc && ${MKNATIVE_ENV} ${BUILD_MAKE} -e tree-check.h config.h multilib.h gcov-iov.h)
.else
PATH=${TOOLDIR}/bin:$$PATH; export PATH; \
(cd .native && ${MKNATIVE_ENV} ${BUILD_MAKE} all-libiberty) && \

View File

@ -1,5 +1,5 @@
#!/bin/sh
# $NetBSD: mknative-gcc,v 1.24 2008/09/19 13:18:28 skrll Exp $
# $NetBSD: mknative-gcc,v 1.25 2008/10/11 05:03:44 mrg Exp $
#
# Shell script for generating all the constants needed for a native
# platform build of src/gnu/dist/gcc.
@ -289,7 +289,7 @@ get_gcc () {
;;
gcc4)
write_c gnu/usr.bin/$_subdir/libcpp/arch/$MACHINE_ARCH/config.h <$_TMPDIR/libcpp/config.h
hfiles='auto-host configargs gencheck gthr-default tm bconfig config'
hfiles='auto-host configargs gencheck gthr-default tm bconfig config multilib'
;;
esac
for f in $hfiles; do