version 1.59, 2017/01/11 12:19:43 |
version 1.59.14.2, 2020/04/08 14:07:23 |
Line 37 CFLAGS+= -fno-strict-aliasing -Wno-point |
|
Line 37 CFLAGS+= -fno-strict-aliasing -Wno-point |
|
# The real solution to this involves generating trampolines for those |
# The real solution to this involves generating trampolines for those |
# relocations inside the loader and removing this workaround, as the |
# relocations inside the loader and removing this workaround, as the |
# resulting code would be much faster. |
# resulting code would be much faster. |
.if ${MACHINE_CPU} == "arm" |
.if ${MACHINE_CPU} == "aarch64" |
|
CFLAGS+= -march=armv8-a+nofp+nosimd |
|
.elif ${MACHINE_CPU} == "arm" |
CFLAGS+= -fno-common -fno-unwind-tables |
CFLAGS+= -fno-common -fno-unwind-tables |
.elif ${MACHINE_CPU} == "hppa" |
.elif ${MACHINE_CPU} == "hppa" |
CFLAGS+= -mlong-calls |
CFLAGS+= -mlong-calls |
Line 105 PROG?= ${KMOD}.kmod |
|
Line 107 PROG?= ${KMOD}.kmod |
|
##### Build rules |
##### Build rules |
realall: ${PROG} |
realall: ${PROG} |
|
|
.if (defined(USE_COMBINE) && ${USE_COMBINE} != "no" && !commands(${_P}) \ |
|
&& !defined(NOCOMBINE.${_P}) && !defined(NOCOMBINE)) |
|
.for f in ${SRCS:N*.h:N*.sh:N*.fth:C/\.[yl]$/.c/g} |
|
.if (${CPPFLAGS.$f:D1} == "1" || ${CPUFLAGS.$f:D2} == "2" \ |
|
|| ${COPTS.$f:D3} == "3" || ${OBJCOPTS.$f:D4} == "4" \ |
|
|| ${CXXFLAGS.$f:D5} == "5") \ |
|
|| ("${f:M*.[cyl]}" == "" || commands(${f:R:S/$/.o/})) |
|
XOBJS+= ${f:R:S/$/.o/} |
|
.else |
|
XSRCS+= ${f} |
|
NODPSRCS+= ${f} |
|
.endif |
|
.endfor |
|
|
|
.if !empty(XOBJS) |
|
${XOBJS}: ${DPSRCS} |
|
.endif |
|
|
|
.if ${MKLDSCRIPT} == "yes" |
|
${KMODSCRIPT}: ${KMODSCRIPTSRC} ${XOBJS} $S/conf/mkldscript.sh |
|
@rm -f ${.TARGET} |
|
@OBJDUMP=${OBJDUMP} ${HOST_SH} $S/conf/mkldscript.sh \ |
|
-t ${KMODSCRIPTSRC} ${XOBJS} > ${.TARGET} |
|
.endif |
|
|
|
${PROG}: ${XOBJS} ${XSRCS} ${DPSRCS} ${DPADD} ${KMODSCRIPT} |
|
${CC} ${LDFLAGS} -nostdlib -MD -combine -r -Wl,-T,${KMODSCRIPT},-d \ |
|
-Wl,-Map=${.TARGET}.map \ |
|
-o ${.TARGET} ${CFLAGS} ${CPPFLAGS} ${XOBJS} \ |
|
${XSRCS:@.SRC.@${.ALLSRC:M*.c:M*${.SRC.}}@:O:u} && \ |
|
echo '.-include "${KMOD}.d"' > .depend |
|
|
|
.else |
|
OBJS+= ${SRCS:N*.h:N*.sh:R:S/$/.o/g} |
OBJS+= ${SRCS:N*.h:N*.sh:R:S/$/.o/g} |
|
|
${OBJS} ${LOBJS}: ${DPSRCS} |
${OBJS} ${LOBJS}: ${DPSRCS} |
Line 169 ${KMOD}_tramp.S: ${KMOD}_tmp.o ${ARCHDIR |
|
Line 138 ${KMOD}_tramp.S: ${KMOD}_tmp.o ${ARCHDIR |
|
${OBJDUMP} --syms --reloc ${KMOD}_tmp.o | \ |
${OBJDUMP} --syms --reloc ${KMOD}_tmp.o | \ |
${TOOL_AWK} -f ${ARCHDIR}/kmodtramp.awk \ |
${TOOL_AWK} -f ${ARCHDIR}/kmodtramp.awk \ |
> tmp.S && \ |
> tmp.S && \ |
mv tmp.S ${.TARGET} |
${MV} tmp.S ${.TARGET} |
|
|
${PROG}: ${KMOD}_tmp.o ${KMOD}_tramp.o |
${PROG}: ${KMOD}_tmp.o ${KMOD}_tramp.o |
${_MKTARGET_LINK} |
${_MKTARGET_LINK} |
Line 191 ${PROG}: ${OBJS} ${DPADD} ${KMODSCRIPT} |
|
Line 160 ${PROG}: ${OBJS} ${DPADD} ${KMODSCRIPT} |
|
-Wl,-Map=${.TARGET}.map \ |
-Wl,-Map=${.TARGET}.map \ |
-o ${.TARGET} ${OBJS} |
-o ${.TARGET} ${OBJS} |
.endif |
.endif |
.endif |
|
.if defined(CTFMERGE) |
.if defined(CTFMERGE) |
${CTFMERGE} ${CTFMFLAGS} -o ${.TARGET} ${OBJS} |
${CTFMERGE} ${CTFMFLAGS} -o ${.TARGET} ${OBJS} |
.endif |
.endif |
Line 199 ${PROG}: ${OBJS} ${DPADD} ${KMODSCRIPT} |
|
Line 167 ${PROG}: ${OBJS} ${DPADD} ${KMODSCRIPT} |
|
##### Install rules |
##### Install rules |
.if !target(kmodinstall) |
.if !target(kmodinstall) |
.if !defined(KMODULEDIR) |
.if !defined(KMODULEDIR) |
_OSRELEASE!= ${HOST_SH} $S/conf/osrelease.sh -k |
.if ${KERNEL_DIR:Uno} == "yes" |
|
KMODULEDIR= ${DESTDIR}/netbsd/modules/${KMOD} |
|
_INST_DIRS= ${DESTDIR}/netbsd |
|
_INST_DIRS+= ${DESTDIR}/netbsd/modules |
|
_INST_DIRS+= ${DESTDIR}/netbsd/modules/${KMOD} |
|
.else |
# Ensure these are recorded properly in METALOG on unprived installes: |
# Ensure these are recorded properly in METALOG on unprived installes: |
|
_OSRELEASE!= ${HOST_SH} $S/conf/osrelease.sh -k |
KMODULEARCHDIR?= ${MACHINE} |
KMODULEARCHDIR?= ${MACHINE} |
_INST_DIRS= ${DESTDIR}/stand/${KMODULEARCHDIR} |
_INST_DIRS= ${DESTDIR}/stand/${KMODULEARCHDIR} |
_INST_DIRS+= ${DESTDIR}/stand/${KMODULEARCHDIR}/${_OSRELEASE} |
_INST_DIRS+= ${DESTDIR}/stand/${KMODULEARCHDIR}/${_OSRELEASE} |
_INST_DIRS+= ${DESTDIR}/stand/${KMODULEARCHDIR}/${_OSRELEASE}/modules |
_INST_DIRS+= ${DESTDIR}/stand/${KMODULEARCHDIR}/${_OSRELEASE}/modules |
KMODULEDIR= ${DESTDIR}/stand/${KMODULEARCHDIR}/${_OSRELEASE}/modules/${KMOD} |
KMODULEDIR= ${DESTDIR}/stand/${KMODULEARCHDIR}/${_OSRELEASE}/modules/${KMOD} |
.endif |
.endif |
|
.endif |
_PROG:= ${KMODULEDIR}/${PROG} # installed path |
_PROG:= ${KMODULEDIR}/${PROG} # installed path |
|
|
.if ${MKUPDATE} == "no" |
.if ${MKUPDATE} == "no" |