Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • meson/part/compiler_args/meson.build

    r18969ce r3fcea34  
    4242        '-Wl,--warn-common',
    4343        '-Wl,--fatal-warnings',
     44        '-Wl,-z,text',
    4445        language : [ 'c', 'cpp' ],
    4546)
     
    5758
    5859        '-Wa,--fatal-warnings',
     60        '-Wl,-z,text',
    5961
    6062        '-Wall',
    6163        '-Wextra',
    62         '-Werror-implicit-function-declaration',
    6364        '-Wwrite-strings',
    6465        '-Wunknown-pragmas',
     
    6970
    7071        '-ffunction-sections',
     72        '-fdata-sections',
    7173        '-fno-common',
    72         '-fdebug-prefix-map=' + meson.source_root() + '=.',
     74        '-fdebug-prefix-map=' + meson.source_root() + '/=',
     75        '-fdebug-prefix-map=../../=',
    7376]
    7477
     
    8790
    8891if CONFIG_LINE_DEBUG
    89         extra_common_flags += [ '-gdwarf-4', '-g3' ]
     92        extra_common_flags += [ '-gdwarf-5', '-g3' ]
    9093endif
    9194
    9295extra_cflags = extra_common_flags + [
    9396        '-Wmissing-prototypes',
     97        '-Werror-implicit-function-declaration',
    9498
    9599        '-Wno-missing-braces',
     
    110114extra_cppflags = extra_common_flags + [
    111115        '-fno-exceptions',
     116        '-Wno-misleading-indentation',
    112117        '-frtti',
    113118]
     
    128133        add_project_link_arguments(extra_cflags, language : [ lang ])
    129134endforeach
     135
     136# This flag is needed at several places, hence we define it here.
     137#
     138# For backwards compatibility we try to detect --no-warn-rwx-segments.
     139# However, the autodetection done by Meson also results in
     140# "cannot find entry symbol _start; defaulting to 00000000004000b0"
     141# thus the option is never supported alone. So when detecting we also
     142# specify --entry=main so that the stub source provided by Meson is build
     143# correctly.
     144ldflags_ignore_rwx_segments = []
     145if cc.has_link_argument('-Wl,--no-warn-rwx-segments,--entry=main')
     146    ldflags_ignore_rwx_segments += ['-Wl,--no-warn-rwx-segments']
     147endif
Note: See TracChangeset for help on using the changeset viewer.