diff options
author | imp <imp@FreeBSD.org> | 2015-11-21 16:37:11 +0000 |
---|---|---|
committer | imp <imp@FreeBSD.org> | 2015-11-21 16:37:11 +0000 |
commit | 9f6454037a82b147f2aeb4b53edacaa09f0a7556 (patch) | |
tree | 274202934e17d79f0ba3ce17c19ed79322fac125 /usr.sbin/uathload | |
parent | b16f8900a2fce1f88566b257660b4f428b134600 (diff) | |
download | FreeBSD-src-9f6454037a82b147f2aeb4b53edacaa09f0a7556.zip FreeBSD-src-9f6454037a82b147f2aeb4b53edacaa09f0a7556.tar.gz |
Document why we use -z nonexecstack in the Makefile since it
is so unusual. Turn off mis-match warnings for building uathload
because the firmware .o file is produced in a way that we
can't get to match exactly. This fixes the build on mips,
so stop excluding it from the build.
Diffstat (limited to 'usr.sbin/uathload')
-rw-r--r-- | usr.sbin/uathload/Makefile | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/usr.sbin/uathload/Makefile b/usr.sbin/uathload/Makefile index d7b808c..949f800 100644 --- a/usr.sbin/uathload/Makefile +++ b/usr.sbin/uathload/Makefile @@ -7,10 +7,20 @@ SRCS= uathload.c ar5523.bin CLEANFILES= ar5523.bin +# It's hard to tag ar5523.o with the proper gnu note saying that it has a +# non-executable stack, so ld doesn't properly mark his executable as +# not having an executable stack. Mark it explicitly, but only for those +# platforms that support his feature (otherwise signals don't work). +# Note: Newer versions of ld than is in the tree ignore -z. .if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "powerpc" || ${MACHINE_ARCH} == "powerpc64" LDFLAGS+= -Wl,-z,noexecstack .endif +# The conversion from .bin to .o doesn't always produce a pedantically correct +# .o's. And it doesn't matter, so turn off the mismatch warnings since it is +# pure data. On mips64 here's no easy way to produce a proper .o. +LDFLAGS+= -Wl,--no-warn-mismatch + ar5523.bin: ${.CURDIR}/../../sys/contrib/dev/uath/ar5523.bin.uu uudecode -p ${.CURDIR}/../../sys/contrib/dev/uath/ar5523.bin.uu > ${.TARGET} |