Changeset 068dd86 in mainline for meson/part/compiler_args/meson.build


Ignore:
Timestamp:
2023-08-04T13:07:34Z (13 months ago)
Author:
Vojtech Horky <vojtech.horky@…>
Branches:
ticket/834-toolchain-update
Children:
24cf6694
Parents:
4dbcdf3
Message:

Support linker without —no-warn-rwx-segments

File:
1 edited

Legend:

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

    r4dbcdf3 r068dd86  
    129129        add_project_link_arguments(extra_cflags, language : [ lang ])
    130130endforeach
     131
     132# This flag is needed at several places, hence we define it here.
     133#
     134# For backwards compatibility we try to detect --no-warn-rwx-segments.
     135# However, the autodetection done by Meson also results in
     136# "cannot find entry symbol _start; defaulting to 00000000004000b0"
     137# thus the option is never supported alone. So when detecting we also
     138# specify --entry=main so that the stub source provided by Meson is build
     139# correctly.
     140ldflags_ignore_rwx_segments = []
     141if cc.has_link_argument('-Wl,--no-warn-rwx-segments,--entry=main')
     142    ldflags_ignore_rwx_segments += ['-Wl,--no-warn-rwx-segments']
     143endif
Note: See TracChangeset for help on using the changeset viewer.