1 # $NetBSD: Makefile,v 1.22 2012/04/15 08:37:32 mrg Exp $
7 GNUHOSTDIST
= ${.CURDIR
}/..
/..
/external
/gpl3
/binutils
/dist
10 --with-pkgversion
="NetBSD Binutils nb1" \
11 --with-bugurl
="http://www.NetBSD.org/support/send-pr.html" \
12 --with-lib-path
="=/usr/lib" --with-sysroot
14 CONFIGURE_ARGS
= --target
=${MACHINE_GNU_PLATFORM} --disable-nls \
15 --program-transform-name
="s,^,${MACHINE_GNU_PLATFORM}-," \
19 MAKE_ARGS
= MACHINE
= MAKEINFO
=${TOOL_MAKEINFO
:Q
}
21 ALL_TARGET
= all-binutils all-gas all-ld
22 INSTALL_TARGET
= install-binutils install-gas install-ld
23 .if
${MKCROSSGPROF
:Uno
} != "no"
24 ALL_TARGET
+= all-gprof
25 INSTALL_TARGET
+=install-gprof
30 INSTALL_TARGET
+=install-gold
35 # LSC: Here we use the MK variable, as we have to select the right default
36 # linker. Problem is, when Gold is not seen, USE_BITCODE is forced to
38 .if
${MKBITCODE
:Uno
} == "yes"
46 .
endif # ${MKBITCODE:Uno} == "yes"
47 .
endif # defined(__MINIX)
48 .
include "${.CURDIR}/../Makefile.gnuhost"
50 CCADDFLAGS
= -I
${DESTDIR}/usr
/include -L
${DESTDIR}/lib
-L
${DESTDIR}/usr
/lib
-B
${DESTDIR}/usr
/lib
/
52 # Force avoiding possibly non-executable install-sh.
53 CONFIGURE_ENV
+= ac_cv_path_mkdir
="${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-install -d"
55 NEWCONFIGDIR?
= ${.CURDIR
}/..
/..
56 MKNATIVE?
= ${.CURDIR
}/mknative-binutils
58 native-binutils
: .native
/.configure_done
59 @echo
'Extracting GNU binutils configury for a native toolchain.'
60 MAKE
=${MAKE
:Q
} ${HOST_SH} ${MKNATIVE} binutils \
61 ${.OBJDIR
}/.native
${NEWCONFIGDIR} ${MACHINE_GNU_PLATFORM}
63 .native
/.configure_done
: ${_GNU_CFGSRC} ${.CURDIR
}/Makefile
64 mkdir .native
2>/dev
/null || true
65 PATH
=${TOOLDIR}/bin
:$$PATH; export PATH
; \
66 (cd .native
&& ${CONFIGURE_ENV
:NC
*:NLD
*} \
67 CC_FOR_BUILD
=${HOST_CC
:Q
} \
68 CC
=${CC
:Q
}' '${CCADDFLAGS
:Q
} \
69 CXX
=${CXX
:Q
}' '${CCADDFLAGS
:Q
} \
70 CPP
=${CPP
:Q
}' '-I
${DESTDIR}/usr
/include \
71 CFLAGS
= CPPFLAGS
= CXXFLAGS
= LDFLAGS
= \
72 MSGFMT
=${TOOLDIR}/bin
/${_TOOL_PREFIX}msgfmt \
73 XGETTEXT
=${TOOLDIR}/bin
/${_TOOL_PREFIX}xgettext \
75 ac_cv_prog_cc_cross
=yes \
76 ac_cv_func_strcoll_works
=yes \
77 ${HOST_SH} ${GNUHOSTDIST}/configure \
78 --build
=`${GNUHOSTDIST}/config.guess` \
79 --host
=${MACHINE_GNU_PLATFORM} \
80 --target
=${MACHINE_GNU_PLATFORM} \
83 PATH
=${TOOLDIR}/bin
:$$PATH; export PATH
; \
84 (cd .native
&& ${MAKE} configure-host
)
85 PATH
=${TOOLDIR}/bin
:$$PATH; export PATH
; \
86 (cd .native
/bfd
&& ${MAKE} bfd.h bfdver.h
)
87 PATH
=${TOOLDIR}/bin
:$$PATH; export PATH
; \
88 (cd .native
/ld && ${MAKE} ldemul-list.h
)