Changeset 068dd86 in mainline
- Timestamp:
- 2023-08-04T13:07:34Z (19 months ago)
- Branches:
- ticket/834-toolchain-update
- Children:
- 24cf6694
- Parents:
- 4dbcdf3
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/meson.build
r4dbcdf3 r068dd86 87 87 kernel_link_args = arch_kernel_link_args + [ 88 88 '-Wl,--nmagic', 89 # The kernel is built as ELF but then copied as a blob of bytes and90 # the permissions are not relevant anyway (needed for binutils 2.39+).91 '-Wl,--no-warn-rwx-segments',92 89 '-T', meson.current_build_dir() / '_link.ld', 93 90 ] 91 # The kernel is built as ELF but then copied as a blob of bytes and 92 # the permissions are not relevant anyway (needed for binutils 2.39+). 93 kernel_link_args += ldflags_ignore_rwx_segments 94 94 95 95 if CONFIG_LTO … … 104 104 kernel_c_args = arch_kernel_c_args + kernel_defs + [ 105 105 '-ffreestanding', 106 # When accessing specific memory addresses that are below normal page size, 107 # the compiler may assume that we actually dereferenced NULL pointer and 108 # warns us about that. But in kernel we often need to access these 109 # addresses directly hence we need to ignore these warnings. 110 # 111 # TODO: might make more sense to disable this selectively in specific 112 # files (or better yet, for specific lines). 113 '--param=min-pagesize=0', 114 # TODO: remove this flag 115 cc.get_supported_arguments([ '-Wno-cast-function-type' ]), 106 cc.get_supported_arguments([ 107 # TODO: remove this flag 108 '-Wno-cast-function-type', 109 # When accessing specific memory addresses that are below normal page 110 # size, the compiler may assume that we actually dereferenced NULL 111 # pointer and warns us about that. But in kernel we often need to 112 # access these addresses directly hence we need to ignore these 113 # warnings. 114 # 115 # TODO: might make more sense to disable this selectively in specific 116 # files (or better yet, for specific lines). 117 '--param=min-pagesize=0', 118 ]), 116 119 ] 117 120 -
meson/arch/arm64/meson.build
r4dbcdf3 r068dd86 44 44 # -mstrict-align option is therefore not needed. 45 45 arch_boot_c_args = arch_uspace_c_args + [ '-fpic', '-fvisibility=hidden', '-fno-function-sections' ] 46 arch_boot_link_args = [ '-Wl,-shared', '-Wl,--no-gc-sections' ] 47 arch_boot_link_args += ['-Wl,--no-warn-rwx-segments'] 46 arch_boot_link_args = [ '-Wl,-shared', '-Wl,--no-gc-sections' ] + ldflags_ignore_rwx_segments 48 47 49 48 if MACHINE == 'virt' -
meson/arch/ia64/meson.build
r4dbcdf3 r068dd86 38 38 arch_uspace_link_args = [ '-nostdlib', '-lgcc' ] 39 39 arch_kernel_link_args = [ '-nostdlib', '-Wl,-EL' ] 40 arch_boot_link_args = ['-Wl,--no-warn-rwx-segments']40 arch_boot_link_args = ldflags_ignore_rwx_segments 41 41 42 42 -
meson/arch/ppc32/meson.build
r4dbcdf3 r068dd86 37 37 arch_kernel_link_args = [ '-nostdlib', '-Wl,-z,max-page-size=0x1000', '-Wl,--no-check-sections', '-Wl,--no-gc-sections' ] 38 38 arch_uspace_link_args = [ '-nostdlib', '-lgcc', '-Wl,-z,max-page-size=0x1000' ] 39 arch_uspace_link_args += ['-Wl,--no-warn-rwx-segments']40 arch_boot_link_args = ['-Wl,--no-warn-rwx-segments']39 arch_uspace_link_args += ldflags_ignore_rwx_segments 40 arch_boot_link_args = ldflags_ignore_rwx_segments 41 41 42 42 -
meson/arch/riscv64/meson.build
r4dbcdf3 r068dd86 33 33 arch_kernel_link_args = [ '-nostdlib' ] 34 34 arch_uspace_link_args = [ '-nostdlib', '-lgcc' ] 35 arch_boot_link_args = ['-Wl,--no-warn-rwx-segments']35 arch_boot_link_args = ldflags_ignore_rwx_segments 36 36 37 37 rd_essential += [ -
meson/part/compiler_args/meson.build
r4dbcdf3 r068dd86 129 129 add_project_link_arguments(extra_cflags, language : [ lang ]) 130 130 endforeach 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. 140 ldflags_ignore_rwx_segments = [] 141 if cc.has_link_argument('-Wl,--no-warn-rwx-segments,--entry=main') 142 ldflags_ignore_rwx_segments += ['-Wl,--no-warn-rwx-segments'] 143 endif
Note:
See TracChangeset
for help on using the changeset viewer.