Re: [kvm-unit-tests PATCH v4 01/10] Makefile: Use no-stack-protector compiler options

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 31/01/2020 17.37, Alexandru Elisei wrote:
> Let's fix the typos so that the -fno-stack-protector and
> -fno-stack-protector-all compiler options are actually used.
> 
> Tested by compiling for arm64, x86_64 and ppc64 little endian. Before the
> patch, the arguments were missing from the gcc invocation; after the patch,
> they were present. Also fixes a compilation error that I was seeing with
> aarch64 gcc version 9.2.0, where the linker was complaining about an
> undefined reference to the symbol __stack_chk_guard.
> 
> CC: Paolo Bonzini <pbonzini@xxxxxxxxxx>
> CC: Drew Jones <drjones@xxxxxxxxxx>
> CC: Laurent Vivier <lvivier@xxxxxxxxxx>
> CC: Thomas Huth <thuth@xxxxxxxxxx>
> CC: David Hildenbrand <david@xxxxxxxxxx>
> CC: Janosch Frank <frankja@xxxxxxxxxxxxx>
> Signed-off-by: Alexandru Elisei <alexandru.elisei@xxxxxxx>
> ---
>  Makefile | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/Makefile b/Makefile
> index 767b6c6a51d0..754ed65ecd2f 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -55,8 +55,8 @@ COMMON_CFLAGS += -Wignored-qualifiers -Werror
>  
>  frame-pointer-flag=-f$(if $(KEEP_FRAME_POINTER),no-,)omit-frame-pointer
>  fomit_frame_pointer := $(call cc-option, $(frame-pointer-flag), "")
> -fnostack_protector := $(call cc-option, -fno-stack-protector, "")
> -fnostack_protector_all := $(call cc-option, -fno-stack-protector-all, "")
> +fno_stack_protector := $(call cc-option, -fno-stack-protector, "")
> +fno_stack_protector_all := $(call cc-option, -fno-stack-protector-all, "")
>  wno_frame_address := $(call cc-option, -Wno-frame-address, "")
>  fno_pic := $(call cc-option, -fno-pic, "")
>  no_pie := $(call cc-option, -no-pie, "")

Ouch, very well spotted.

Fixes: e5c73790f5f0 ("build: don't reevaluate cc-option shell command")

Reviewed-by: Thomas Huth <thuth@xxxxxxxxxx>




[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux