diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2020-08-03 17:04:25 +0200 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2020-08-21 06:30:40 -0400 |
commit | 64ed6f92ffebb419ba71ef61e7bdb5f165c5043a (patch) | |
tree | 1b7a2d3f7448e8e5c54c03d5a258cc3759dfe12d /scripts | |
parent | f556b4a10d3ccd6cad01f704e4ccb2252520d61e (diff) | |
download | qemu-64ed6f92ffebb419ba71ef61e7bdb5f165c5043a.zip qemu-64ed6f92ffebb419ba71ef61e7bdb5f165c5043a.tar.gz qemu-64ed6f92ffebb419ba71ef61e7bdb5f165c5043a.tar.bz2 |
meson: link emulators without Makefile.target
The binaries move to the root directory, e.g. qemu-system-i386 or
qemu-arm. This requires changes to qtests, CI, etc.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/device-crash-test | 2 | ||||
-rwxr-xr-x | scripts/oss-fuzz/build.sh | 20 |
2 files changed, 12 insertions, 10 deletions
diff --git a/scripts/device-crash-test b/scripts/device-crash-test index 305d042..866baf7 100755 --- a/scripts/device-crash-test +++ b/scripts/device-crash-test @@ -383,7 +383,7 @@ def binariesToTest(args, testcase): if args.qemu: r = args.qemu else: - r = glob.glob('./*-softmmu/qemu-system-*') + r = glob.glob('./qemu-system-*') return r diff --git a/scripts/oss-fuzz/build.sh b/scripts/oss-fuzz/build.sh index 52430cb..f0b7442 100755 --- a/scripts/oss-fuzz/build.sh +++ b/scripts/oss-fuzz/build.sh @@ -64,24 +64,26 @@ mkdir -p "$DEST_DIR/lib/" # Copy the shared libraries here # Build once to get the list of dynamic lib paths, and copy them over ../configure --disable-werror --cc="$CC" --cxx="$CXX" --enable-fuzzing \ + --prefix="$DEST_DIR" --bindir="$DEST_DIR" --datadir="$DEST_DIR/data/" \ --extra-cflags="$EXTRA_CFLAGS" --target-list="i386-softmmu" -if ! make "-j$(nproc)" i386-softmmu/fuzz; then +if ! make "-j$(nproc)" qemu-fuzz-i386; then fatal "Build failed. Please specify a compiler with fuzzing support"\ "using the \$CC and \$CXX environemnt variables"\ "\nFor example: CC=clang CXX=clang++ $0" fi -for i in $(ldd ./i386-softmmu/qemu-fuzz-i386 | cut -f3 -d' '); do +for i in $(ldd ./qemu-fuzz-i386 | cut -f3 -d' '); do cp "$i" "$DEST_DIR/lib/" done -rm ./i386-softmmu/qemu-fuzz-i386 +rm qemu-fuzz-i386 # Build a second time to build the final binary with correct rpath -../configure --bindir="$DEST_DIR" --datadir="$DEST_DIR/data/" --disable-werror \ - --cc="$CC" --cxx="$CXX" --extra-cflags="$EXTRA_CFLAGS" \ - --extra-ldflags="-Wl,-rpath,'\$\$ORIGIN/lib'" -make "-j$(nproc)" i386-softmmu/fuzz +../configure --disable-werror --cc="$CC" --cxx="$CXX" --enable-fuzzing \ + --prefix="$DEST_DIR" --bindir="$DEST_DIR" --datadir="$DEST_DIR/data/" \ + --extra-cflags="$EXTRA_CFLAGS" --extra-ldflags="-Wl,-rpath,'\$\$ORIGIN/lib'" \ + --target-list="i386-softmmu" +make "-j$(nproc)" qemu-fuzz-i386 V=1 # Copy over the datadir cp -r ../pc-bios/ "$DEST_DIR/pc-bios" @@ -90,9 +92,9 @@ cp -r ../pc-bios/ "$DEST_DIR/pc-bios" # of available fuzz-targets. Copy over the qemu-fuzz-i386, naming it according # to each available fuzz target (See 05509c8e6d fuzz: select fuzz target using # executable name) -for target in $(./i386-softmmu/qemu-fuzz-i386 | awk '$1 ~ /\*/ {print $2}'); +for target in $(./qemu-fuzz-i386 | awk '$1 ~ /\*/ {print $2}'); do - cp ./i386-softmmu/qemu-fuzz-i386 "$DEST_DIR/qemu-fuzz-i386-target-$target" + cp qemu-fuzz-i386 "$DEST_DIR/qemu-fuzz-i386-target-$target" done echo "Done. The fuzzers are located in $DEST_DIR" |