[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 57/92] oss-fuzz: move linker arg to fix coverage-build
From: |
Paolo Bonzini |
Subject: |
[PULL 57/92] oss-fuzz: move linker arg to fix coverage-build |
Date: |
Thu, 24 Sep 2020 05:22:39 -0400 |
From: Alexander Bulekov <alxndr@bu.edu>
The order of the add_project_link_arguments calls impacts which
arguments are placed between --start-group and --end-group.
OSS-Fuzz coverage builds seem to just add these to CFLAGS:
-fprofile-instr-generate -fcoverage-mapping pthread -Wl,--no-as-needed
-Wl,-ldl -Wl,-lm Wno-unused-command-line-argument
The -Wl,-ldl flag that is enough to shift the fork_fuzz.ld linker-script
back into the linker group. Move the linker-script meson call before the
other calls to make sure the flag is placed correctly.
Signed-off-by: Alexander Bulekov <alxndr@bu.edu>
Message-Id: <20200909220516.614222-1-alxndr@bu.edu>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
meson.build | 15 ++++++++-------
1 file changed, 8 insertions(+), 7 deletions(-)
diff --git a/meson.build b/meson.build
index ace15dc8c0..9aeefa60fb 100644
--- a/meson.build
+++ b/meson.build
@@ -54,6 +54,14 @@ configure_file(input: files('scripts/ninjatool.py'),
# Compiler flags #
##################
+# Specify linker-script with add_project_link_arguments so that it is not
placed
+# within a linker --start-group/--end-group pair
+if 'CONFIG_FUZZ' in config_host
+ add_project_link_arguments(['-Wl,-T,',
+ (meson.current_source_dir() /
'tests/qtest/fuzz/fork_fuzz.ld')],
+ native: false, language: ['c', 'cpp', 'objc'])
+endif
+
add_project_arguments(config_host['QEMU_CFLAGS'].split(),
native: false, language: ['c', 'objc'])
add_project_arguments(config_host['QEMU_CXXFLAGS'].split(),
@@ -63,13 +71,6 @@
add_project_link_arguments(config_host['QEMU_LDFLAGS'].split(),
add_project_arguments(config_host['QEMU_INCLUDES'].split(),
language: ['c', 'cpp', 'objc'])
-# Specify linker-script with add_project_link_arguments so that it is not
placed
-# within a linker --start-group/--end-group pair
-if 'CONFIG_FUZZ' in config_host
- add_project_link_arguments(['-Wl,-T,',
- (meson.current_source_dir() /
'tests/qtest/fuzz/fork_fuzz.ld')],
- native: false, language: ['c', 'cpp', 'objc'])
-endif
link_language = meson.get_external_property('link_language', 'cpp')
if link_language == 'cpp'
--
2.26.2
- [PULL 48/92] qemu-bridge-helper: relocate path to default ACL, (continued)
- [PULL 48/92] qemu-bridge-helper: relocate path to default ACL, Paolo Bonzini, 2020/09/24
- [PULL 52/92] hw/i386/q35: Remove unreachable Xen code on Q35 machine, Paolo Bonzini, 2020/09/24
- [PULL 43/92] oslib-posix: relocate path to /var, Paolo Bonzini, 2020/09/24
- [PULL 47/92] vl: relocate path to configuration file, Paolo Bonzini, 2020/09/24
- [PULL 45/92] net: relocate paths to helpers and scripts, Paolo Bonzini, 2020/09/24
- [PULL 53/92] exec: Remove MemoryRegion::global_locking field, Paolo Bonzini, 2020/09/24
- [PULL 49/92] qga: relocate path to default configuration and hook, Paolo Bonzini, 2020/09/24
- [PULL 55/92] meson: fix installation of keymaps, Paolo Bonzini, 2020/09/24
- [PULL 54/92] checkpatch: avoid error on cover letter files, Paolo Bonzini, 2020/09/24
- [PULL 58/92] tests/tcg: reinstate or replace desired parts of rules.mak, Paolo Bonzini, 2020/09/24
- [PULL 57/92] oss-fuzz: move linker arg to fix coverage-build,
Paolo Bonzini <=
- [PULL 56/92] configure: fix performance regression due to PIC objects, Paolo Bonzini, 2020/09/24
- [PULL 63/92] smp: drop support for deprecated (invalid topologies), Paolo Bonzini, 2020/09/24
- [PULL 59/92] configure: cleanup invocation of submodule Make, Paolo Bonzini, 2020/09/24
- [PULL 61/92] configure: do not clobber environment CFLAGS/CXXFLAGS/LDFLAGS, Paolo Bonzini, 2020/09/24
- [PULL 62/92] configure: consistently pass CFLAGS/CXXFLAGS/LDFLAGS to meson, Paolo Bonzini, 2020/09/24
- [PULL 60/92] configure: cleanup CFLAGS and LDFLAGS for submodules, Paolo Bonzini, 2020/09/24
- [PULL 64/92] cphp: remove deprecated cpu-add command(s), Paolo Bonzini, 2020/09/24
- [PULL 65/92] char: fix logging when chardev write fails, Paolo Bonzini, 2020/09/24
- [PULL 66/92] qom: Document all function parameters in doc comments, Paolo Bonzini, 2020/09/24
- [PULL 67/92] qom: Use kernel-doc private/public tags in structs, Paolo Bonzini, 2020/09/24