1 # $NetBSD: Makefile,v 1.24 2014/02/15 13:34:28 tsutsui 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 .if defined
(__MINIX
) && ! exists
(${GNUHOSTDIST}/gas
/m68k-parse.c
)
20 # MINIX: LSC: Make sure we trigger the fetch rule
21 .
include "${.CURDIR}/../../minix/Makefile.fetchgnu"
23 ${GNUHOSTDIST}/gas
/m68k-parse.c
: ${fetch_done}
25 .
endif # defined(__MINIX)
27 build
/gas
/m68k-parse.c
: ${GNUHOSTDIST}/gas
/m68k-parse.c
28 @mkdir build
2>/dev
/null || true
29 @mkdir build
/gas
2>/dev
/null || true
30 cat
${GNUHOSTDIST}/gas
/m68k-parse.c
> ${.TARGET
}
32 .configure_done
: build
/gas
/m68k-parse.c
34 MAKE_ARGS
= MACHINE
= MAKEINFO
=${TOOL_MAKEINFO
:Q
}
36 ALL_TARGET
= all-binutils all-gas all-ld
37 INSTALL_TARGET
= install-binutils install-gas install-ld
38 .if
${MKCROSSGPROF
:Uno
} != "no"
39 ALL_TARGET
+= all-gprof
40 INSTALL_TARGET
+=install-gprof
43 .if defined
(__MINIX
) && ${HAVE_GOLD
:Uyes
} != "no"
45 INSTALL_TARGET
+=install-gold
50 # LSC: Here we use the MK variable, as we have to select the right default
51 # linker. Problem is, when Gold is not seen, USE_BITCODE is forced to
53 .if
${MKBITCODE
:Uno
} == "yes"
61 .
endif # ${MKBITCODE:Uno} == "yes"
62 .
endif # defined(__MINIX)
63 .
include "${.CURDIR}/../Makefile.gnuhost"
65 CCADDFLAGS
= -I
${DESTDIR}/usr
/include -L
${DESTDIR}/lib
-L
${DESTDIR}/usr
/lib
-B
${DESTDIR}/usr
/lib
/
67 # Force avoiding possibly non-executable install-sh.
68 CONFIGURE_ENV
+= ac_cv_path_mkdir
="${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-install -d"
70 NEWCONFIGDIR?
= ${.CURDIR
}/..
/..
71 MKNATIVE?
= ${.CURDIR
}/mknative-binutils
73 native-binutils
: .native
/.configure_done
74 @echo
'Extracting GNU binutils configury for a native toolchain.'
75 MAKE
=${MAKE
:Q
} ${HOST_SH} ${MKNATIVE} binutils \
76 ${.OBJDIR
}/.native
${NEWCONFIGDIR} ${MACHINE_GNU_PLATFORM}
78 .native
/.configure_done
: ${_GNU_CFGSRC} ${.CURDIR
}/Makefile
79 mkdir .native
2>/dev
/null || true
80 PATH
=${TOOLDIR}/bin
:$$PATH; export PATH
; \
81 (cd .native
&& ${CONFIGURE_ENV
:NC
*:NLD
*} \
82 CC_FOR_BUILD
=${HOST_CC
:Q
} \
83 CC
=${CC
:Q
}' '${CCADDFLAGS
:Q
} \
84 CXX
=${CXX
:Q
}' '${CCADDFLAGS
:Q
} \
85 CPP
=${CPP
:Q
}' '-I
${DESTDIR}/usr
/include \
86 CFLAGS
= CPPFLAGS
= CXXFLAGS
= LDFLAGS
= \
87 MSGFMT
=${TOOLDIR}/bin
/${_TOOL_PREFIX}msgfmt \
88 XGETTEXT
=${TOOLDIR}/bin
/${_TOOL_PREFIX}xgettext \
90 ac_cv_prog_cc_cross
=yes \
91 ac_cv_func_strcoll_works
=yes \
92 ${HOST_SH} ${GNUHOSTDIST}/configure \
93 --build
=`${GNUHOSTDIST}/config.guess` \
94 --host
=${MACHINE_GNU_PLATFORM} \
95 --target
=${MACHINE_GNU_PLATFORM} \
98 PATH
=${TOOLDIR}/bin
:$$PATH; export PATH
; \
99 (cd .native
&& ${MAKE} configure-host
)
100 PATH
=${TOOLDIR}/bin
:$$PATH; export PATH
; \
101 (cd .native
/bfd
&& ${MAKE} bfd.h bfdver.h
)
102 PATH
=${TOOLDIR}/bin
:$$PATH; export PATH
; \
103 (cd .native
/ld && ${MAKE} ldemul-list.h
)