get this some what working with GCC 4.5. i at least have managed to
get crtstuff and libgcc to build for amd64, and have linked and tested /bin/sh with all these GCC 4.5 compiled part.
This commit is contained in:
parent
79492abbce
commit
64f6248066
|
@ -1,4 +1,4 @@
|
|||
# $NetBSD: Makefile,v 1.38 2011/06/21 09:37:41 mrg Exp $
|
||||
# $NetBSD: Makefile,v 1.39 2011/06/23 05:42:37 mrg Exp $
|
||||
|
||||
.include <bsd.own.mk>
|
||||
|
||||
|
@ -76,6 +76,7 @@ MKNATIVE_ENV= ${BINENV} ${CONFIGURE_ENV:NC*:NLD*} \
|
|||
LIBS=-lintl \
|
||||
ac_cv_prog_cc_cross=yes \
|
||||
ac_cv_func_strcoll_works=yes \
|
||||
ac_cv_func_elf_getshstrndx=no \
|
||||
gcc_cv_func_printf_ptr=yes \
|
||||
gcc_cv_libc_provides_ssp=yes \
|
||||
gdb_cv_printf_has_long_double=yes \
|
||||
|
@ -100,7 +101,7 @@ GCCSRCDIR=${.CURDIR}/../../external/gpl3/gcc/dist
|
|||
|
||||
.if ${HAVE_GCC} >= 45
|
||||
CXXADDFLAGS= --sysroot=${DESTDIR}
|
||||
CCADDFLAGS= --sysroot=${DESTDIR} -L${DESTDIR}/lib -L${DESTDIR}/usr/lib -B${DESTDIR}/usr/lib/
|
||||
CCADDFLAGS= --sysroot=${DESTDIR} -L${DESTDIR}/lib -L${DESTDIR}/usr/lib -B${DESTDIR}/usr/lib/ -I${.OBJDIR}/.native/gcc/include
|
||||
.else
|
||||
CXXADDFLAGS= ${CPPFLAG_ISYSTEMXX} ${DESTDIR}/usr/include/g++
|
||||
CCADDFLAGS= ${CPPFLAG_ISYSTEM} ${DESTDIR}/usr/include -L${DESTDIR}/lib -L${DESTDIR}/usr/lib -B${DESTDIR}/usr/lib/
|
||||
|
@ -147,6 +148,8 @@ NATIVE_CONFIGURE_ARGS+= \
|
|||
${TOOL_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 multilib.h gcov-iov.h)
|
||||
PATH=${TOOLDIR}/bin:$$PATH; export PATH; \
|
||||
(cd .native/gcc && ${MKNATIVE_ENV} ${BUILD_MAKE} -e libgcc.mvars tconfig.h unwind.h)
|
||||
PATH=${TOOLDIR}/bin:$$PATH; export PATH; \
|
||||
(cd .native && touch gcc/cc1obj gcc/cc1plus gcc/f771 gcc/libgcc.a gcc/libgcc_s.so && \
|
||||
${MKNATIVE_ENV} ${BUILD_MAKE} configure-target-libiberty \
|
||||
|
@ -167,9 +170,11 @@ NATIVE_CONFIGURE_ARGS+= \
|
|||
CPP=${CPP:Q}' '-I${DESTDIR}/usr/include \
|
||||
all-local) && \
|
||||
true
|
||||
.if 0
|
||||
PATH=${TOOLDIR}/bin:$$PATH; export PATH; \
|
||||
(cd .native/${MACHINE_GNU_PLATFORM}/libiberty && \
|
||||
${MKNATIVE_ENV} ${BUILD_MAKE} needed-list)
|
||||
.endif
|
||||
@touch $@
|
||||
|
||||
clean: clean.native
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#!/bin/sh
|
||||
# $NetBSD: mknative-gcc,v 1.46 2011/06/21 04:11:12 mrg Exp $
|
||||
# $NetBSD: mknative-gcc,v 1.47 2011/06/23 05:42:37 mrg Exp $
|
||||
#
|
||||
# Shell script for generating all the constants needed for a native
|
||||
# platform build of src/gnu/dist/gcc.
|
||||
|
@ -519,24 +519,24 @@ get_libstdcxx_v3 () {
|
|||
get_gcc () {
|
||||
_subdir="$1"
|
||||
mkdir -p $_OUTDIR/usr.bin/$_subdir/arch/$MACHINE_ARCH
|
||||
mkdir -p $_OUTDIR/usr.bin/$_subdir/libcpp/arch/$MACHINE_ARCH
|
||||
case ${_subdir} in
|
||||
gcc4)
|
||||
mkdir -p $_OUTDIR/usr.bin/$_subdir/libcpp/arch/$MACHINE_ARCH
|
||||
_buildname="BUILD_"
|
||||
_libcppsubdir=""
|
||||
_extravars="TM_H ALL_OPT_FILES"
|
||||
_hconfig_h=""
|
||||
_extravars2="tm_file_list build_xm_include_list"
|
||||
_extravars3="tm_p_include_list"
|
||||
|
||||
;;
|
||||
*)
|
||||
_buildname="HOST_"
|
||||
_libcppsubdir="gcc/"
|
||||
_extravars=""
|
||||
_hconfig_h="HCONFIG_H"
|
||||
_extravars2=""
|
||||
_extravars3=""
|
||||
|
||||
gcc)
|
||||
_buildname="BUILD_"
|
||||
_libcppsubdir=""
|
||||
_extravars="TM_H ALL_OPT_FILES"
|
||||
_hconfig_h=""
|
||||
_extravars2="tm_file_list build_xm_include_list"
|
||||
_extravars3="tm_p_include_list"
|
||||
;;
|
||||
esac
|
||||
|
||||
|
|
Loading…
Reference in New Issue