Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 10270C6FD1D for ; Mon, 20 Mar 2023 15:51:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232413AbjCTPv1 (ORCPT ); Mon, 20 Mar 2023 11:51:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58996 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233330AbjCTPtr (ORCPT ); Mon, 20 Mar 2023 11:49:47 -0400 Received: from todd.t-8ch.de (todd.t-8ch.de [159.69.126.157]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DE4078A77; Mon, 20 Mar 2023 08:41:24 -0700 (PDT) From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=weissschuh.net; s=mail; t=1679326881; bh=8+nQaJm+ZpSS5pDVDYI8Ih7aP+obiBBNskXrcuawcY4=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=VdYuP7uYCUpZyRNirukTM8/cDEaFkpqBlXmt2CKnGfoSb+HKuGYOax1JiCSV2ZDdt LbJkixmmNM134m39O+raBfqHfuG3c9Hj2n8LdjunxEFlpwBFEN48z5HfW4SjPpLL7X oHx1Qg7jnXszNuARoiFN+CyCpfAa384ZtFERU0y0= Date: Mon, 20 Mar 2023 15:41:05 +0000 Subject: [PATCH v2 5/8] tools/nolibc: tests: fold in no-stack-protector cflags MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Message-Id: <20230223-nolibc-stackprotector-v2-5-4c938e098d67@weissschuh.net> References: <20230223-nolibc-stackprotector-v2-0-4c938e098d67@weissschuh.net> In-Reply-To: <20230223-nolibc-stackprotector-v2-0-4c938e098d67@weissschuh.net> To: Willy Tarreau , Shuah Khan Cc: linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, =?utf-8?q?Thomas_Wei=C3=9Fschuh?= X-Mailer: b4 0.12.1 X-Developer-Signature: v=1; a=ed25519-sha256; t=1679326878; l=987; i=linux@weissschuh.net; s=20221212; h=from:subject:message-id; bh=8+nQaJm+ZpSS5pDVDYI8Ih7aP+obiBBNskXrcuawcY4=; b=TaXGkzUL3xHCtunu6pxuTjT6Der+r4LEofS5YgQayMdk3NgAUO2r6DsVBZrRzelmREo9bB9L1 nrNsis9gLYgDvKhmE0MsrOgYVZe3KOKZ1ROVCIsjF6flvn6rD3033hm X-Developer-Key: i=linux@weissschuh.net; a=ed25519; pk=KcycQgFPX2wGR5azS7RhpBqedglOZVgRPfdFSPB1LNw= Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org For the cflags to enable stack protectors to work properly they need to be specified after -fno-stack-protector. To do this fold all cflags into a single variable and move -fno-stack-protector before the arch-specific cflags. Signed-off-by: Thomas Weißschuh --- tools/testing/selftests/nolibc/Makefile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tools/testing/selftests/nolibc/Makefile b/tools/testing/selftests/nolibc/Makefile index c99bbcda7495..236c0364f5fb 100644 --- a/tools/testing/selftests/nolibc/Makefile +++ b/tools/testing/selftests/nolibc/Makefile @@ -77,8 +77,9 @@ Q=@ endif CFLAGS_s390 = -m64 -CFLAGS ?= -Os -fno-ident -fno-asynchronous-unwind-tables $(CFLAGS_$(ARCH)) -CFLAGS += $(call cc-option,-fno-stack-protector) +CFLAGS ?= -Os -fno-ident -fno-asynchronous-unwind-tables \ + $(call cc-option,-fno-stack-protector) \ + $(CFLAGS_$(ARCH)) LDFLAGS := -s help: -- 2.40.0