From nobody Sat Jun 13 03:31:07 2026 Received: from mail-dy1-f178.google.com (mail-dy1-f178.google.com [74.125.82.178]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4AB3E23ED60 for ; Mon, 11 May 2026 03:29:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=74.125.82.178 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778470162; cv=none; b=Q0ZSFA8xhNDB6kx+/Yj3eUzB7qjuHkMLRvXLkbYBpqrEgLLPWCPFk3sHvlRyCQ6QN7zdJoRkoXOAZEfpoU6cZIUBA+8pts78I1btU4+RUp91ktvpZ5ffK3tKibnYE7DlFia3bfb+qaIWHl40rvz5ZoF4ZkCiSARPGm/5kDqw82k= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778470162; c=relaxed/simple; bh=uARdaHq3AAQjZuZeOgb45uXepUqXDbV/qJDqRcrrBbw=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=FfZZg8tNzp/+8oJ662uhcIgHjeAISLMqfDNM6PuACPE0Dfirgp1WQVAtRHzPiNNfkhlvOH99ZR1ApE/1Tf3S5YkiOK0talggRl4teLoVBXb0kHf0ZPstVa2JTD1K48cy1g3mJ2q/R/2Zc3B94vIttp+iVPKzyK+1VUyS/mr90BQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=sifive.com; spf=pass smtp.mailfrom=sifive.com; dkim=pass (2048-bit key) header.d=sifive.com header.i=@sifive.com header.b=YRS0xspX; arc=none smtp.client-ip=74.125.82.178 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=sifive.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sifive.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=sifive.com header.i=@sifive.com header.b="YRS0xspX" Received: by mail-dy1-f178.google.com with SMTP id 5a478bee46e88-2c15849aa2cso4652699eec.0 for ; Sun, 10 May 2026 20:29:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sifive.com; s=google; t=1778470160; x=1779074960; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=Y/0AIvK8BCcj8XqdwEdcIT92Ta29adSchEewMFBK5y0=; b=YRS0xspX4RcxijsD+IYjLxdeXwvrdzbxwemyCuQn/cRbQTJ2/PEq6icfdpfKKMD0K8 iigA7o+ak9bCA1T589/PVgW4MoZvNZtv3aFsRO+2DssubWtmi33Nb8a0nRSb9XGrwANv Z/aUGkyf6u/SVdLslnVUL/syL7vDXE/RkUAJZ0XKjciQnWfNmW3BeHFUM4xBc9CJIqrX /LWoGbnK5rfH5zSWEsaQ+3oy/MeMXfdrtmL2pZRETVYAksxXYVTRsyMHFCTL45bz66sH xeLiD2CcggnPiaLDpHT7UHp4M/0j9mc7Uqz+/CGmnqrNAoblQ4tk804e1sZcVHs8NtyG l7xA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1778470160; x=1779074960; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=Y/0AIvK8BCcj8XqdwEdcIT92Ta29adSchEewMFBK5y0=; b=SZOydxOucsolVFfg7NjoipiLWsJiiX8ehSHMLBxP2xpOqUJcSAPw4rwQbEa3PZh+i1 INUTtR0U0dKikp8nh2GbQ9i8li20IkKDPmxP6/kxuN132itRRfu+9+E5KDnFbz8nQfCH TvmBEtUiHGhpk2cO2jopNy8usbFz4rE4BOoCoqzI2dUr9S9tdDo7UyC4A3wuRTEF6zyn BKzw3/kU0AhE8PfWBT91g7yOdz31TorScvTY+kuS/riH+hAU7aRc2dJQpxcE//XPEhPV PdhZ3oow0sdCYeHrFsVS7nV5oLXZyIstYuZWcfEPQ4oiwV7Y3ka1ItuWb7CgoIkAkP8p 68Bg== X-Forwarded-Encrypted: i=1; AFNElJ+qZEhJkwDpvv8S+nCVcNaF5bornPjkGpszYPmgWNN0K/41YB/m4NSG10hShQD18qBNDJTC1ys8Ee0HplQ=@vger.kernel.org X-Gm-Message-State: AOJu0YzFLKW1575cd0XiYyyUYs9Q8QlEuAz3FztUgOBsH6DTy0bsVZ0C XyGp9Bzh8wgOIcZDO6Bf/pQEal/EbBt6m5pwEZAk3TOqt53iHold2HEAzc2dlY7NoCY= X-Gm-Gg: Acq92OFnrbf7qyPwGrdER1k3MeWdXOcZzxQsgQxrmS90z3Si0KO1x9c772P8Ub7Dm7e DJQpUoCNF9kwqJCV48aYVvAoLPBr/bji8OhUhCqboWx5pSjtVmAP08yembmSp5YhkDOkMn9kzoJ LpNbNHoRTsGsHOIexb6q1wyHWYXOPdnPMnMBvcZb0cSDN2r39s2O4YIAeY2x5k3IuZ/gCg6z/H8 4GigjuVwxfmeYxeDePSpYoW4fa/tzG9W6kzbBu2XtMobUAUc9DCrOHoVibiIjZf61zEgBVndaeB MQKv5ccrEq6ca77J2wq46FUQC70qgZvD87yId9M4d1rpGl1NV25I/s7f2T+2efBrTqRlRtGtYw7 RSWG1qATPyBpCFYJCH8JtICskhd6dp2myO0RpEbQAH3Q7GStu9LL79100YFJWGkcY4wKIw5/q/s m4nUopVrIw0/YmwwmN0huXCfs3rrqgVajxZNI= X-Received: by 2002:a05:7301:128b:b0:2d3:f3fc:bb6b with SMTP id 5a478bee46e88-2f5482664b0mr11091502eec.1.1778470160415; Sun, 10 May 2026 20:29:20 -0700 (PDT) Received: from sw04.internal.sifive.com ([4.53.31.132]) by smtp.gmail.com with ESMTPSA id 5a478bee46e88-2f8859eafc2sm15049827eec.4.2026.05.10.20.29.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 10 May 2026 20:29:19 -0700 (PDT) From: Zong Li To: pjw@kernel.org, palmer@dabbelt.com, aou@eecs.berkeley.edu, alex@ghiti.fr, shuah@kernel.org, linux-kselftest@vger.kernel.org, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org Cc: Zong Li Subject: [PATCH] selftests/riscv: fix compiler output flag spacing in all Makefiles Date: Sun, 10 May 2026 20:29:17 -0700 Message-ID: <20260511032917.3542802-1-zong.li@sifive.com> X-Mailer: git-send-email @GIT_VERSION@ Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Standardize the compiler output flag format across all RISC-V selftests by adding a space between '-o' and '$@'. Although '-o$@' is perfectly valid for GCC/Clang to parse, But changing it to '-o $@' with a space could align with the GNU official documentation conventions, improves readability by visually separating the flag from the target variable, and ensures consistency with other architectures Currently, RISC-V selftests use '-o$@' (without space) in 13 instances across 6 Makefiles, while all other architectures consistently use '-o $@' (with space). This inconsistency makes RISC-V an outlier in the kernel's selftest infrastructure. Signed-off-by: Zong Li --- tools/testing/selftests/riscv/abi/Makefile | 2 +- tools/testing/selftests/riscv/cfi/Makefile | 2 +- tools/testing/selftests/riscv/hwprobe/Makefile | 6 +++--- tools/testing/selftests/riscv/mm/Makefile | 2 +- tools/testing/selftests/riscv/sigreturn/Makefile | 2 +- tools/testing/selftests/riscv/vector/Makefile | 12 ++++++------ 6 files changed, 13 insertions(+), 13 deletions(-) diff --git a/tools/testing/selftests/riscv/abi/Makefile b/tools/testing/sel= ftests/riscv/abi/Makefile index ed82ff9c664e..041114675ad5 100644 --- a/tools/testing/selftests/riscv/abi/Makefile +++ b/tools/testing/selftests/riscv/abi/Makefile @@ -7,4 +7,4 @@ TEST_GEN_PROGS :=3D pointer_masking include ../../lib.mk =20 $(OUTPUT)/pointer_masking: pointer_masking.c - $(CC) -static -o$@ $(CFLAGS) $(LDFLAGS) $^ + $(CC) -static -o $@ $(CFLAGS) $(LDFLAGS) $^ diff --git a/tools/testing/selftests/riscv/cfi/Makefile b/tools/testing/sel= ftests/riscv/cfi/Makefile index 93b4738c0e2e..418b4b5325a5 100644 --- a/tools/testing/selftests/riscv/cfi/Makefile +++ b/tools/testing/selftests/riscv/cfi/Makefile @@ -16,7 +16,7 @@ ifeq ($(shell $(CC) $(CFLAGS) -nostdlib -xc /dev/null -o = /dev/null > /dev/null 2 TEST_GEN_PROGS :=3D cfitests =20 $(OUTPUT)/cfitests: cfitests.c shadowstack.c - $(CC) -o$@ $(CFLAGS) $(LDFLAGS) $^ + $(CC) -o $@ $(CFLAGS) $(LDFLAGS) $^ else =20 $(shell echo "Toolchain doesn't support CFI, skipping CFI kselftest." >&2) diff --git a/tools/testing/selftests/riscv/hwprobe/Makefile b/tools/testing= /selftests/riscv/hwprobe/Makefile index cec81610a5f2..71e3f26c541b 100644 --- a/tools/testing/selftests/riscv/hwprobe/Makefile +++ b/tools/testing/selftests/riscv/hwprobe/Makefile @@ -9,10 +9,10 @@ TEST_GEN_PROGS :=3D hwprobe cbo which-cpus include ../../lib.mk =20 $(OUTPUT)/hwprobe: hwprobe.c sys_hwprobe.S - $(CC) -static -o$@ $(CFLAGS) $(LDFLAGS) $^ + $(CC) -static -o $@ $(CFLAGS) $(LDFLAGS) $^ =20 $(OUTPUT)/cbo: cbo.c sys_hwprobe.S - $(CC) -static -o$@ $(CFLAGS) $(LDFLAGS) $^ + $(CC) -static -o $@ $(CFLAGS) $(LDFLAGS) $^ =20 $(OUTPUT)/which-cpus: which-cpus.c sys_hwprobe.S - $(CC) -static -o$@ $(CFLAGS) $(LDFLAGS) $^ + $(CC) -static -o $@ $(CFLAGS) $(LDFLAGS) $^ diff --git a/tools/testing/selftests/riscv/mm/Makefile b/tools/testing/self= tests/riscv/mm/Makefile index 4664ed79e20b..24122453e3d0 100644 --- a/tools/testing/selftests/riscv/mm/Makefile +++ b/tools/testing/selftests/riscv/mm/Makefile @@ -12,4 +12,4 @@ TEST_PROGS :=3D run_mmap.sh include ../../lib.mk =20 $(OUTPUT)/mm: mmap_default.c mmap_bottomup.c mmap_tests.h - $(CC) -o$@ $(CFLAGS) $(LDFLAGS) $^ + $(CC) -o $@ $(CFLAGS) $(LDFLAGS) $^ diff --git a/tools/testing/selftests/riscv/sigreturn/Makefile b/tools/testi= ng/selftests/riscv/sigreturn/Makefile index eb8bac9279a8..8c77508641f3 100644 --- a/tools/testing/selftests/riscv/sigreturn/Makefile +++ b/tools/testing/selftests/riscv/sigreturn/Makefile @@ -9,4 +9,4 @@ TEST_GEN_PROGS :=3D sigreturn include ../../lib.mk =20 $(OUTPUT)/sigreturn: sigreturn.c - $(CC) -static -o$@ $(CFLAGS) $(LDFLAGS) $^ + $(CC) -static -o $@ $(CFLAGS) $(LDFLAGS) $^ diff --git a/tools/testing/selftests/riscv/vector/Makefile b/tools/testing/= selftests/riscv/vector/Makefile index 326dafd739bf..7e0017b3fb8b 100644 --- a/tools/testing/selftests/riscv/vector/Makefile +++ b/tools/testing/selftests/riscv/vector/Makefile @@ -11,29 +11,29 @@ include ../../lib.mk TEST_GEN_OBJ :=3D $(patsubst %.c, $(OUTPUT)/%.o, $(TEST_GEN_LIBS)) =20 $(OUTPUT)/sys_hwprobe.o: ../hwprobe/sys_hwprobe.S - $(CC) -static -c -o$@ $(CFLAGS) $^ + $(CC) -static -c -o $@ $(CFLAGS) $^ =20 $(OUTPUT)/v_helpers.o: v_helpers.c - $(CC) -static -c -o$@ $(CFLAGS) $^ + $(CC) -static -c -o $@ $(CFLAGS) $^ =20 $(OUTPUT)/vstate_prctl: vstate_prctl.c $(OUTPUT)/sys_hwprobe.o $(OUTPUT)/v= _helpers.o - $(CC) -static -o$@ $(CFLAGS) $(LDFLAGS) $^ + $(CC) -static -o $@ $(CFLAGS) $(LDFLAGS) $^ =20 $(OUTPUT)/vstate_exec_nolibc: vstate_exec_nolibc.c $(CC) -nostdlib -static -include ../../../../include/nolibc/nolibc.h \ -Wall $(CFLAGS) $(LDFLAGS) $^ -o $@ -lgcc =20 $(OUTPUT)/v_initval: v_initval.c $(OUTPUT)/sys_hwprobe.o $(OUTPUT)/v_helpe= rs.o - $(CC) -static -o$@ $(CFLAGS) $(LDFLAGS) $^ + $(CC) -static -o $@ $(CFLAGS) $(LDFLAGS) $^ =20 $(OUTPUT)/v_exec_initval_nolibc: v_exec_initval_nolibc.c $(CC) -nostdlib -static -include ../../../../include/nolibc/nolibc.h \ -Wall $(CFLAGS) $(LDFLAGS) $^ -o $@ -lgcc =20 $(OUTPUT)/vstate_ptrace: vstate_ptrace.c $(OUTPUT)/sys_hwprobe.o $(OUTPUT)= /v_helpers.o - $(CC) -static -o$@ $(CFLAGS) $(LDFLAGS) $^ + $(CC) -static -o $@ $(CFLAGS) $(LDFLAGS) $^ =20 $(OUTPUT)/validate_v_ptrace: validate_v_ptrace.c $(OUTPUT)/sys_hwprobe.o $= (OUTPUT)/v_helpers.o - $(CC) -static -o$@ $(CFLAGS) $(LDFLAGS) $^ + $(CC) -static -o $@ $(CFLAGS) $(LDFLAGS) $^ =20 EXTRA_CLEAN +=3D $(TEST_GEN_OBJ) --=20 2.43.7