diff options
Diffstat (limited to 'graphics/MesaLib/options.mk')
-rw-r--r-- | graphics/MesaLib/options.mk | 42 |
1 files changed, 1 insertions, 41 deletions
diff --git a/graphics/MesaLib/options.mk b/graphics/MesaLib/options.mk index d739b19127f..b4af8459c18 100644 --- a/graphics/MesaLib/options.mk +++ b/graphics/MesaLib/options.mk @@ -1,7 +1,6 @@ -# $NetBSD: options.mk,v 1.9 2008/06/03 11:06:17 tron Exp $ +# $NetBSD: options.mk,v 1.10 2008/07/27 00:03:42 bjs Exp $ PKG_OPTIONS_VAR= PKG_OPTIONS.MesaLib -PKG_SUPPORTED_OPTIONS= mesa-execmem-mmap # Assembler code build configurations .if (${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "x86_64") && \ @@ -10,35 +9,6 @@ PKG_SUPPORTED_OPTIONS+= ${MACHINE_ARCH} PKG_SUGGESTED_OPTIONS+= ${MACHINE_ARCH} .endif ### -### XXX Prior to this patch, Mesa only allocated executable memory -### with mmap(2) and PROT_EXEC on linux. On e.g. OpenBSD and NetBSD, -### pages which absolutely required PROT_EXEC were allocated using -### malloc(3). You may wonder why it only worked on Linux. Answer: -### the code was excluded with '#ifdef __linux__'! "Porting" this -### [to BSD platforms] involved adding three lines of [preprocessor] -### code (see patch-ap if you're curious). -### -### Please do note hack (NetBSD-only for now) I added to wire down -### this memory by setting the MESA_EXECMEM_MMAP environment variable; -### you probably don't want it paged out. MAP_WIRED is probably -### overkill--I will revisit this at a later date. -### -### You may also define MESA_EXECMEM_HEAP_SIZE in your build -### environment to adjust the size of the anonymous executable -### memory pool (in bytes). The default is 10MB (huge?). -### -### Here's the bottom line: IF YOUR PLATFORM DOES NOT HAVE AN -### EXECUTABLE HEAP, YOU RUN THE RISK OF MANY SEGMENTATION FAULTS -### UNLESS THIS OPTION IS ENABLED. If enabling this option results in -### build failure, please do file a PR. Thanks to Owain Ainsworth -### <oga@openbsd.org> for discovering this. -### -### --bjs (04/23/08) -### -.if (!empty(OPSYS:M*BSD) || ${OPSYS} == "DragonFly" || ${OPSYS} == "Linux") -PKG_SUGGESTED_OPTIONS= mesa-execmem-mmap -.endif -### ### XXX There are [probably] others, but let's not get crazy just yet. ### This will take a while to test for the myriad platforms we ### support. @@ -84,13 +54,3 @@ PLIST.nodri= # empty ### MAKE_JOBS_SAFE= no .endif -### -### XXX This is the default heap size. Would there be an occasion to -### change it? It seems large, so we should investigate further. -### -MESA_EXECMEM_HEAPSIZE?= 10485760 - -.if !empty(PKG_OPTIONS:Mmesa-execmem-mmap) -CFLAGS+= -DMESA_EXECMEM_MMAP -CFLAGS+= -DEXEC_HEAP_SIZE=${MESA_EXECMEM_HEAPSIZE:M[0-9]*:Q} -.endif |