From patchwork Thu Feb 6 16:24:25 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Jones X-Patchwork-Id: 11368845 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id D9AE3924 for ; Thu, 6 Feb 2020 16:24:46 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id B8925217BA for ; Thu, 6 Feb 2020 16:24:46 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="XCj9pxPA" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727516AbgBFQYp (ORCPT ); Thu, 6 Feb 2020 11:24:45 -0500 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:27779 "EHLO us-smtp-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727392AbgBFQYp (ORCPT ); Thu, 6 Feb 2020 11:24:45 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1581006284; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=QVn3KA9sEn9fMwY63Oid8rmv0wn5jHhT2Lb83C9NoNE=; b=XCj9pxPAnCNaGUI33Qpro8K8DYJOss1vDDsOFcWoL9YcUc9agTzT+mcN2JQfyXJIyMge6V NORzJi8yQkte0Zq63KyqS73LeQu+LrC3cdYKP91MrVAEoq6NqS231lMROEemE0hDrLWPGU ehUF9qemR6ODiZTuT67jw0cYsJ8Q0QA= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-244-lLGbsx5PPqO-h-8cZbfiCw-1; Thu, 06 Feb 2020 11:24:41 -0500 X-MC-Unique: lLGbsx5PPqO-h-8cZbfiCw-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 9FCDA800D54; Thu, 6 Feb 2020 16:24:40 +0000 (UTC) Received: from kamzik.brq.redhat.com (unknown [10.43.2.160]) by smtp.corp.redhat.com (Postfix) with ESMTP id A20A91001B05; Thu, 6 Feb 2020 16:24:36 +0000 (UTC) From: Andrew Jones To: kvm@vger.kernel.org Cc: pbonzini@redhat.com, Alexandru Elisei , Drew Jones , Laurent Vivier , Thomas Huth , David Hildenbrand , Janosch Frank Subject: [PULL kvm-unit-tests 01/10] Makefile: Use no-stack-protector compiler options Date: Thu, 6 Feb 2020 17:24:25 +0100 Message-Id: <20200206162434.14624-2-drjones@redhat.com> In-Reply-To: <20200206162434.14624-1-drjones@redhat.com> References: <20200206162434.14624-1-drjones@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org From: Alexandru Elisei 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. Fixes: e5c73790f5f0 ("build: don't reevaluate cc-option shell command") CC: Paolo Bonzini CC: Drew Jones CC: Laurent Vivier CC: Thomas Huth CC: David Hildenbrand CC: Janosch Frank Signed-off-by: Alexandru Elisei Reviewed-by: Thomas Huth Reviewed-by: Laurent Vivier Signed-off-by: Andrew Jones --- 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, "")