X-Git-Url: https://git.tld-linux.org/?p=packages%2Fqemu.git;a=blobdiff_plain;f=qemu-no-fortify.patch;fp=qemu-no-fortify.patch;h=587f30a776e9d6ccba37cfa93a2dac750c5532ae;hp=0000000000000000000000000000000000000000;hb=03e2dc25997fc63182b12f2932412c0dc1ccdcfd;hpb=f799dc25f4dd72b2a62d6dae4f4a90158445a28a diff --git a/qemu-no-fortify.patch b/qemu-no-fortify.patch new file mode 100644 index 0000000..587f30a --- /dev/null +++ b/qemu-no-fortify.patch @@ -0,0 +1,51 @@ +diff -ur qemu-7.1.0.orig/configure qemu-7.1.0/configure +--- qemu-7.1.0.orig/configure 2022-09-02 16:07:34.783540992 +0200 ++++ qemu-7.1.0/configure 2022-09-02 16:11:03.625989858 +0200 +@@ -299,7 +299,6 @@ + debug_tcg="no" + sanitizers="no" + tsan="no" +-fortify_source="yes" + EXESUF="" + modules="no" + prefix="/usr/local" +@@ -819,7 +818,6 @@ + debug_tcg="yes" + meson_option_parse --enable-debug-mutex "" + meson_option_add -Doptimization=0 +- fortify_source="no" + ;; + --enable-sanitizers) sanitizers="yes" + ;; +@@ -1743,20 +1741,6 @@ + ccache_cpp2=yes + fi + +-################################################# +-# clang does not support glibc + FORTIFY_SOURCE. +- +-if test "$fortify_source" != "no"; then +- if echo | $cc -dM -E - | grep __clang__ > /dev/null 2>&1 ; then +- fortify_source="no"; +- elif test -n "$cxx" && has $cxx && +- echo | $cxx -dM -E - | grep __clang__ >/dev/null 2>&1 ; then +- fortify_source="no"; +- else +- fortify_source="yes" +- fi +-fi +- + ########################################## + # checks for sanitizers + +@@ -2246,10 +2230,6 @@ + + write_c_skeleton + +-if test "$fortify_source" = "yes" ; then +- QEMU_CFLAGS="-U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 $QEMU_CFLAGS" +-fi +- + if test "$have_asan" = "yes"; then + QEMU_CFLAGS="-fsanitize=address $QEMU_CFLAGS" + QEMU_LDFLAGS="-fsanitize=address $QEMU_LDFLAGS"