| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | # $NetBSD: Makefile,v 1.26 2016/10/14 15:58:34 christos Exp $ | | 1 | # $NetBSD: Makefile,v 1.27 2016/10/14 23:27:00 mrg Exp $ |
2 | | | 2 | |
3 | CPPFLAGS+= -I${.CURDIR}/arch/${BINUTILS_MACHINE_ARCH} \ | | 3 | CPPFLAGS+= -I${.CURDIR}/arch/${BINUTILS_MACHINE_ARCH} \ |
4 | -I${DIST}/ld \ | | 4 | -I${DIST}/ld \ |
5 | -DDEFAULT_EMULATION=\"${G_EMUL}\" \ | | 5 | -DDEFAULT_EMULATION=\"${G_EMUL}\" \ |
6 | -DSCRIPTDIR=\"${SCRIPTSDIR}\" \ | | 6 | -DSCRIPTDIR=\"${SCRIPTSDIR}\" \ |
7 | -DTARGET=\"${G_target_alias}\" \ | | 7 | -DTARGET=\"${G_target_alias}\" \ |
8 | -DBINDIR=\"/usr/bin\" \ | | 8 | -DBINDIR=\"/usr/bin\" \ |
9 | -DTOOLBINDIR=\"/usr/bin\" \ | | 9 | -DTOOLBINDIR=\"/usr/bin\" \ |
10 | -DENABLE_PLUGINS \ | | 10 | -DENABLE_PLUGINS \ |
11 | -DELF_LIST_OPTIONS=TRUE \ | | 11 | -DELF_LIST_OPTIONS=TRUE \ |
12 | -DELF_SHLIB_LIST_OPTIONS=TRUE \ | | 12 | -DELF_SHLIB_LIST_OPTIONS=TRUE \ |
13 | -DELF_PLT_UNWIND_LIST_OPTIONS=TRUE | | 13 | -DELF_PLT_UNWIND_LIST_OPTIONS=TRUE |
14 | | | 14 | |
| @@ -82,32 +82,38 @@ EMUL_LIB_PATH.${f}=/usr/lib | | | @@ -82,32 +82,38 @@ EMUL_LIB_PATH.${f}=/usr/lib |
82 | EMUL_LIB_PATH.${f}=/usr/lib | | 82 | EMUL_LIB_PATH.${f}=/usr/lib |
83 | . endif | | 83 | . endif |
84 | | | 84 | |
85 | e${f}.c: ${DIST}/ld/genscripts.sh ${.CURDIR}/Makefile stringify.sed | | 85 | e${f}.c: ${DIST}/ld/genscripts.sh ${.CURDIR}/Makefile stringify.sed |
86 | ${_MKTARGET_CREATE} | | 86 | ${_MKTARGET_CREATE} |
87 | unset MACHINE || true; \ | | 87 | unset MACHINE || true; \ |
88 | LIB_PATH=${EMUL_LIB_PATH.${f}} NATIVE=yes \ | | 88 | LIB_PATH=${EMUL_LIB_PATH.${f}} NATIVE=yes \ |
89 | ${HOST_SH} ${DIST}/ld/genscripts.sh ${DIST}/ld \ | | 89 | ${HOST_SH} ${DIST}/ld/genscripts.sh ${DIST}/ld \ |
90 | ${LIBDIR} "/usr" "/usr/bin" \ | | 90 | ${LIBDIR} "/usr" "/usr/bin" \ |
91 | ${G_target_alias} ${G_target_alias} ${G_target_alias} \ | | 91 | ${G_target_alias} ${G_target_alias} ${G_target_alias} \ |
92 | ${G_EMUL} ${LIBDIR} yes ${G_enable_initfini_array} \ | | 92 | ${G_EMUL} ${LIBDIR} yes ${G_enable_initfini_array} \ |
93 | ${f} "${G_target_alias}" | | 93 | ${f} "${G_target_alias}" |
94 | | | 94 | |
95 | . for e in x xbn xc xd xdc xdw xn xr xs xsc xsw xu xw | | 95 | . if ${BINUTILS_MACHINE_ARCH} == "x86_64" || \ |
96 | . if exists(ldscripts/${f}.${e}) | | 96 | ${BINUTILS_MACHINE_ARCH} == "sparc64" || \ |
| | | 97 | ${BINUTILS_MACHINE_ARCH} == "aarch64" || \ |
| | | 98 | !empty(BINUTILS_MACHINE_ARCH:Mearm*) || \ |
| | | 99 | !empty(BINUTILS_MACHINE_ARCH:Marm*) || \ |
| | | 100 | !empty(BINUTILS_MACHINE_ARCH:Mmips64*) |
| | | 101 | . for e in x xbn xc xd xdc xdw xn xr xs xsc xsw xu xw |
| | | 102 | . if exists(ldscripts/${f}.${e}) |
97 | FILES+= ${f}.${e} | | 103 | FILES+= ${f}.${e} |
98 | . endif | | 104 | . endif |
99 | . endfor | | 105 | . endfor |
100 | | | 106 | . endif |
101 | .endfor | | 107 | .endfor |
102 | | | 108 | |
103 | .include <bsd.prog.mk> | | 109 | .include <bsd.prog.mk> |
104 | .include <bsd.info.mk> | | 110 | .include <bsd.info.mk> |
105 | .include <bsd.subdir.mk> | | 111 | .include <bsd.subdir.mk> |
106 | | | 112 | |
107 | # Make sure we use the pre-generated C files | | 113 | # Make sure we use the pre-generated C files |
108 | .l.c .y.c .y.h: | | 114 | .l.c .y.c .y.h: |
109 | @true | | 115 | @true |
110 | | | 116 | |
111 | cleandir: __cleanldscripts | | 117 | cleandir: __cleanldscripts |
112 | __cleanldscripts: | | 118 | __cleanldscripts: |
113 | -rm -rf ldscripts tmpdir | | 119 | -rm -rf ldscripts tmpdir |