diff options
author | Warner Losh <imp@FreeBSD.org> | 2015-11-21 16:37:11 +0000 |
---|---|---|
committer | Warner Losh <imp@FreeBSD.org> | 2015-11-21 16:37:11 +0000 |
commit | f0e44ca33760dc51bc52d8836e3c160d765af176 (patch) | |
tree | 274202934e17d79f0ba3ce17c19ed79322fac125 | |
parent | 722281c0706d37c840ac375496e7875f7602474d (diff) | |
download | src-f0e44ca33760dc51bc52d8836e3c160d765af176.tar.gz src-f0e44ca33760dc51bc52d8836e3c160d765af176.zip |
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.
Notes
Notes:
svn path=/head/; revision=291139
-rw-r--r-- | usr.sbin/Makefile.mips | 4 | ||||
-rw-r--r-- | usr.sbin/uathload/Makefile | 10 |
2 files changed, 10 insertions, 4 deletions
diff --git a/usr.sbin/Makefile.mips b/usr.sbin/Makefile.mips index cd60887b5503..8987110dba31 100644 --- a/usr.sbin/Makefile.mips +++ b/usr.sbin/Makefile.mips @@ -1,7 +1,3 @@ # $FreeBSD$ SUBDIR+= ofwdump -# uathload broken for n32 and n64 due to toolchain issues, only build for o32 -.if ${MACHINE_ARCH} != "mips" && ${MACHINE_ARCH} != "mipsel" -SUBDIR.yes:= ${SUBDIR.yes:Nuathload} -.endif diff --git a/usr.sbin/uathload/Makefile b/usr.sbin/uathload/Makefile index d7b808cc59e8..949f800ee138 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} |