[Mesa-dev] [PATCH] meson: Add support for read-only text segment on x86

Dylan Baker dylan at pnwbakers.com
Thu Jun 7 18:39:00 UTC 2018


Quoting Matt Turner (2018-06-07 11:31:46)
> On Thu, Jun 7, 2018 at 11:29 AM, Dylan Baker <dylan at pnwbakers.com> wrote:
> > Quoting Matt Turner (2018-06-07 11:20:37)
> >> Port of 6dfc5e28f7d0 (configure.ac: Add support to enable read-only text
> >> segment on x86.) to Meson.
> >> ---
> >>  meson.build       | 5 +++++
> >>  meson_options.txt | 6 ++++++
> >>  2 files changed, 11 insertions(+)
> >>
> >> diff --git a/meson.build b/meson.build
> >> index 32ab30faa4b..161aae83e31 100644
> >> --- a/meson.build
> >> +++ b/meson.build
> >> @@ -50,6 +50,7 @@ with_tests = get_option('build-tests')
> >>  with_valgrind = get_option('valgrind')
> >>  with_libunwind = get_option('libunwind')
> >>  with_asm = get_option('asm')
> >> +with_glx_read_only_text = get_option('glx-read-only-text')
> >>  with_osmesa = get_option('osmesa')
> >>  with_swr_arches = get_option('swr-arches')
> >>  with_tools = get_option('tools')
> >> @@ -871,6 +872,10 @@ if with_asm
> >>        with_asm_arch = 'x86'
> >>        pre_args += ['-DUSE_X86_ASM', '-DUSE_MMX_ASM', '-DUSE_3DNOW_ASM',
> >>                     '-DUSE_SSE_ASM']
> >> +
> >> +      if with_glx_read_only_text
> >> +         pre_args += ['-DGLX_X86_READONLY_TEXT']
> >> +      endif
> >>      endif
> >>    elif host_machine.cpu_family() == 'x86_64'
> >>      if system_has_kms_drm
> >> diff --git a/meson_options.txt b/meson_options.txt
> >> index 2c1f514debe..28e92509198 100644
> >> --- a/meson_options.txt
> >> +++ b/meson_options.txt
> >> @@ -224,6 +224,12 @@ option(
> >>    value : true,
> >>    description : 'Build assembly code if possible'
> >>  )
> >> +option(
> >> +   'glx-read-only-text',
> >> +   type : 'boolean',
> >> +   value : false,
> >> +   description : 'Disable writable .text section on x86 (decreases performance)'
> >> +)
> >>  option(
> >>    'llvm',
> >>    type : 'combo',
> >> --
> >> 2.16.1
> >
> > This should only be defined on x86 and not x86_64, right?
> 
> Yes, exactly.

cool,
Reviewed-by: Dylan Baker <dylan at pnwbakers.com>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: signature
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20180607/4718b014/attachment.sig>


More information about the mesa-dev mailing list