From: Masahiro Yamada <masahiroy@kernel.org> To: Richard Weinberger <richard@nod.at>, Anton Ivanov <anton.ivanov@cambridgegreys.com>, Johannes Berg <johannes@sipsolutions.net>, linux-um@lists.infradead.org Cc: linux-kernel@vger.kernel.org, linux-kbuild@vger.kernel.org, Jiri Slaby <jirislaby@kernel.org>, Masahiro Yamada <masahiroy@kernel.org>, Borislav Petkov <bp@alien8.de>, Dave Hansen <dave.hansen@linux.intel.com>, "H. Peter Anvin" <hpa@zytor.com>, Ingo Molnar <mingo@redhat.com>, Thomas Gleixner <tglx@linutronix.de>, x86@kernel.org Subject: [PATCH v2 1/2] UML: hard-code the result of 'uname -s' Date: Sat, 22 Jul 2023 02:18:56 +0900 [thread overview] Message-ID: <20230721171857.3612639-1-masahiroy@kernel.org> (raw) We rely on 'uname -s' returning 'Linux' because there are os-Linux/ directories, but no other os-*/. Supporting a non-Linux host is unlikely to happen. Let's hard-code 'Linux'. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> --- (no changes since v1) arch/um/Makefile | 7 +++---- arch/x86/um/Makefile | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/arch/um/Makefile b/arch/um/Makefile index da4d5256af2f..1735a562453d 100644 --- a/arch/um/Makefile +++ b/arch/um/Makefile @@ -18,14 +18,13 @@ else endif ARCH_DIR := arch/um -OS := $(shell uname -s) # We require bash because the vmlinux link and loader script cpp use bash # features. SHELL := /bin/bash core-y += $(ARCH_DIR)/kernel/ \ $(ARCH_DIR)/drivers/ \ - $(ARCH_DIR)/os-$(OS)/ + $(ARCH_DIR)/os-Linux/ MODE_INCLUDE += -I$(srctree)/$(ARCH_DIR)/include/shared/skas @@ -78,7 +77,7 @@ USER_CFLAGS = $(patsubst $(KERNEL_DEFINES),,$(patsubst -I%,,$(KBUILD_CFLAGS))) \ -idirafter $(objtree)/include -D__KERNEL__ -D__UM_HOST__ #This will adjust *FLAGS accordingly to the platform. -include $(srctree)/$(ARCH_DIR)/Makefile-os-$(OS) +include $(srctree)/$(ARCH_DIR)/Makefile-os-Linux KBUILD_CPPFLAGS += -I$(srctree)/$(HOST_DIR)/include \ -I$(srctree)/$(HOST_DIR)/include/uapi \ @@ -155,4 +154,4 @@ archclean: @find . \( -name '*.bb' -o -name '*.bbg' -o -name '*.da' \ -o -name '*.gcov' \) -type f -print | xargs rm -f -export HEADER_ARCH SUBARCH USER_CFLAGS CFLAGS_NO_HARDENING OS DEV_NULL_PATH +export HEADER_ARCH SUBARCH USER_CFLAGS CFLAGS_NO_HARDENING DEV_NULL_PATH diff --git a/arch/x86/um/Makefile b/arch/x86/um/Makefile index ee89f6bb9242..e207e6748aa2 100644 --- a/arch/x86/um/Makefile +++ b/arch/x86/um/Makefile @@ -13,7 +13,7 @@ obj-y = bugs_$(BITS).o delay.o fault.o ldt.o \ ptrace_$(BITS).o ptrace_user.o setjmp_$(BITS).o signal.o \ stub_$(BITS).o stub_segv.o \ sys_call_table_$(BITS).o sysrq_$(BITS).o tls_$(BITS).o \ - mem_$(BITS).o subarch.o os-$(OS)/ + mem_$(BITS).o subarch.o os-Linux/ ifeq ($(CONFIG_X86_32),y) -- 2.39.2
WARNING: multiple messages have this Message-ID (diff)
From: Masahiro Yamada <masahiroy@kernel.org> To: Richard Weinberger <richard@nod.at>, Anton Ivanov <anton.ivanov@cambridgegreys.com>, Johannes Berg <johannes@sipsolutions.net>, linux-um@lists.infradead.org Cc: linux-kernel@vger.kernel.org, linux-kbuild@vger.kernel.org, Jiri Slaby <jirislaby@kernel.org>, Masahiro Yamada <masahiroy@kernel.org>, Borislav Petkov <bp@alien8.de>, Dave Hansen <dave.hansen@linux.intel.com>, "H. Peter Anvin" <hpa@zytor.com>, Ingo Molnar <mingo@redhat.com>, Thomas Gleixner <tglx@linutronix.de>, x86@kernel.org Subject: [PATCH v2 1/2] UML: hard-code the result of 'uname -s' Date: Sat, 22 Jul 2023 02:18:56 +0900 [thread overview] Message-ID: <20230721171857.3612639-1-masahiroy@kernel.org> (raw) We rely on 'uname -s' returning 'Linux' because there are os-Linux/ directories, but no other os-*/. Supporting a non-Linux host is unlikely to happen. Let's hard-code 'Linux'. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> --- (no changes since v1) arch/um/Makefile | 7 +++---- arch/x86/um/Makefile | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/arch/um/Makefile b/arch/um/Makefile index da4d5256af2f..1735a562453d 100644 --- a/arch/um/Makefile +++ b/arch/um/Makefile @@ -18,14 +18,13 @@ else endif ARCH_DIR := arch/um -OS := $(shell uname -s) # We require bash because the vmlinux link and loader script cpp use bash # features. SHELL := /bin/bash core-y += $(ARCH_DIR)/kernel/ \ $(ARCH_DIR)/drivers/ \ - $(ARCH_DIR)/os-$(OS)/ + $(ARCH_DIR)/os-Linux/ MODE_INCLUDE += -I$(srctree)/$(ARCH_DIR)/include/shared/skas @@ -78,7 +77,7 @@ USER_CFLAGS = $(patsubst $(KERNEL_DEFINES),,$(patsubst -I%,,$(KBUILD_CFLAGS))) \ -idirafter $(objtree)/include -D__KERNEL__ -D__UM_HOST__ #This will adjust *FLAGS accordingly to the platform. -include $(srctree)/$(ARCH_DIR)/Makefile-os-$(OS) +include $(srctree)/$(ARCH_DIR)/Makefile-os-Linux KBUILD_CPPFLAGS += -I$(srctree)/$(HOST_DIR)/include \ -I$(srctree)/$(HOST_DIR)/include/uapi \ @@ -155,4 +154,4 @@ archclean: @find . \( -name '*.bb' -o -name '*.bbg' -o -name '*.da' \ -o -name '*.gcov' \) -type f -print | xargs rm -f -export HEADER_ARCH SUBARCH USER_CFLAGS CFLAGS_NO_HARDENING OS DEV_NULL_PATH +export HEADER_ARCH SUBARCH USER_CFLAGS CFLAGS_NO_HARDENING DEV_NULL_PATH diff --git a/arch/x86/um/Makefile b/arch/x86/um/Makefile index ee89f6bb9242..e207e6748aa2 100644 --- a/arch/x86/um/Makefile +++ b/arch/x86/um/Makefile @@ -13,7 +13,7 @@ obj-y = bugs_$(BITS).o delay.o fault.o ldt.o \ ptrace_$(BITS).o ptrace_user.o setjmp_$(BITS).o signal.o \ stub_$(BITS).o stub_segv.o \ sys_call_table_$(BITS).o sysrq_$(BITS).o tls_$(BITS).o \ - mem_$(BITS).o subarch.o os-$(OS)/ + mem_$(BITS).o subarch.o os-Linux/ ifeq ($(CONFIG_X86_32),y) -- 2.39.2 _______________________________________________ linux-um mailing list linux-um@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-um
next reply other threads:[~2023-07-21 17:19 UTC|newest] Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top 2023-07-21 17:18 Masahiro Yamada [this message] 2023-07-21 17:18 ` [PATCH v2 1/2] UML: hard-code the result of 'uname -s' Masahiro Yamada 2023-07-21 17:18 ` [PATCH v2 2/2] UML: use obj-y to descend into arch/um/*/ Masahiro Yamada 2023-07-21 17:18 ` Masahiro Yamada 2023-07-24 6:53 ` Jiri Slaby 2023-07-24 6:53 ` Jiri Slaby 2023-08-08 18:21 ` Nick Desaulniers 2023-08-08 18:21 ` Nick Desaulniers 2023-08-19 21:08 ` [PATCH v2 1/2] UML: hard-code the result of 'uname -s' Richard Weinberger 2023-08-19 21:08 ` Richard Weinberger 2023-08-19 23:03 ` Masahiro Yamada 2023-08-19 23:03 ` Masahiro Yamada
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20230721171857.3612639-1-masahiroy@kernel.org \ --to=masahiroy@kernel.org \ --cc=anton.ivanov@cambridgegreys.com \ --cc=bp@alien8.de \ --cc=dave.hansen@linux.intel.com \ --cc=hpa@zytor.com \ --cc=jirislaby@kernel.org \ --cc=johannes@sipsolutions.net \ --cc=linux-kbuild@vger.kernel.org \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-um@lists.infradead.org \ --cc=mingo@redhat.com \ --cc=richard@nod.at \ --cc=tglx@linutronix.de \ --cc=x86@kernel.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.