From nobody Tue Dec 16 16:41:23 2025 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 A512CC4167B for ; Fri, 8 Dec 2023 18:13:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1574553AbjLHSNT (ORCPT ); Fri, 8 Dec 2023 13:13:19 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38130 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1574529AbjLHSM5 (ORCPT ); Fri, 8 Dec 2023 13:12:57 -0500 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4381F1729; Fri, 8 Dec 2023 10:13:04 -0800 (PST) Date: Fri, 08 Dec 2023 18:13:02 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1702059182; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xgqlJDka6FcT4G5ZGjIEyqWOQ+mW8Tn9OrL4YvFsFZI=; b=ioFe7HA1s+roqklmfgQY/Q3v6uvsMnf/QWV2LEXd/+bonvmik8CRUDCIkp0O8x0kfiuHcL DSWZlNIyyFqIAYzawGKc/Q6uiPuMnJcs2WCi9hGooBRAZGSbDy/7E3Vk3kLCf99FbYyeHZ 3wjj3Cq9kq+rOrL1X4hghCQMbf7o4r+t3F3neNgdZ1W9DN6TJ8/wm6h37F8PzpGFdsAD36 OzYi7hVdDfEWUhuPZF7LhPD9M3ilWyKF82QLKQs8sQUKAiruxGurh8w2lUDNChfScm1Fom oVthNdLt1Kb1pc5T0/nP5kYFLQdvNJfECXlxBqCU9XZd36Lsz5aD8iqk3myglA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1702059182; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xgqlJDka6FcT4G5ZGjIEyqWOQ+mW8Tn9OrL4YvFsFZI=; b=L4+5Z+giAfgkjQQMsxw6Ky9pGA+Kimc0tvE4meP5uTa6l/ZjAHwz4OXNs6B0L8V2KmEncp QNwNRKmy1J7VVBAQ== From: "tip-bot2 for Jo Van Bulck" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: x86/sgx] selftests/sgx: Separate linker options Cc: Jo Van Bulck , Dave Hansen , Jarkko Sakkinen , x86@kernel.org, linux-kernel@vger.kernel.org MIME-Version: 1.0 Message-ID: <170205918223.398.8235125463491202686.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The following commit has been merged into the x86/sgx branch of tip: Commit-ID: f79464658d858e07af0c4c9b30f5baedeeae0c04 Gitweb: https://git.kernel.org/tip/f79464658d858e07af0c4c9b30f5baede= eae0c04 Author: Jo Van Bulck AuthorDate: Thu, 05 Oct 2023 17:38:45 +02:00 Committer: Dave Hansen CommitterDate: Fri, 08 Dec 2023 10:05:26 -08:00 selftests/sgx: Separate linker options Fixes "'linker' input unused [-Wunused-command-line-argument]" errors when compiling with clang. Signed-off-by: Jo Van Bulck Signed-off-by: Dave Hansen Reviewed-by: Jarkko Sakkinen Link: https://lore.kernel.org/all/20231005153854.25566-5-jo.vanbulck%40cs.k= uleuven.be --- tools/testing/selftests/sgx/Makefile | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/tools/testing/selftests/sgx/Makefile b/tools/testing/selftests= /sgx/Makefile index 50aab6b..dcdd04b 100644 --- a/tools/testing/selftests/sgx/Makefile +++ b/tools/testing/selftests/sgx/Makefile @@ -12,9 +12,11 @@ OBJCOPY :=3D $(CROSS_COMPILE)objcopy endif =20 INCLUDES :=3D -I$(top_srcdir)/tools/include -HOST_CFLAGS :=3D -Wall -Werror -g $(INCLUDES) -fPIC -z noexecstack -ENCL_CFLAGS :=3D -Wall -Werror -static -nostdlib -nostartfiles -fPIC \ +HOST_CFLAGS :=3D -Wall -Werror -g $(INCLUDES) -fPIC +HOST_LDFLAGS :=3D -z noexecstack -lcrypto +ENCL_CFLAGS +=3D -Wall -Werror -static -nostdlib -nostartfiles -fPIC \ -fno-stack-protector -mrdrnd $(INCLUDES) +ENCL_LDFLAGS :=3D -Wl,-T,test_encl.lds,--build-id=3Dnone =20 TEST_CUSTOM_PROGS :=3D $(OUTPUT)/test_sgx TEST_FILES :=3D $(OUTPUT)/test_encl.elf @@ -28,7 +30,7 @@ $(OUTPUT)/test_sgx: $(OUTPUT)/main.o \ $(OUTPUT)/sigstruct.o \ $(OUTPUT)/call.o \ $(OUTPUT)/sign_key.o - $(CC) $(HOST_CFLAGS) -o $@ $^ -lcrypto + $(CC) $(HOST_CFLAGS) -o $@ $^ $(HOST_LDFLAGS) =20 $(OUTPUT)/main.o: main.c $(CC) $(HOST_CFLAGS) -c $< -o $@ @@ -45,8 +47,8 @@ $(OUTPUT)/call.o: call.S $(OUTPUT)/sign_key.o: sign_key.S $(CC) $(HOST_CFLAGS) -c $< -o $@ =20 -$(OUTPUT)/test_encl.elf: test_encl.lds test_encl.c test_encl_bootstrap.S - $(CC) $(ENCL_CFLAGS) -T $^ -o $@ -Wl,--build-id=3Dnone +$(OUTPUT)/test_encl.elf: test_encl.c test_encl_bootstrap.S + $(CC) $(ENCL_CFLAGS) $^ -o $@ $(ENCL_LDFLAGS) =20 EXTRA_CLEAN :=3D \ $(OUTPUT)/test_encl.elf \