From: Jeff Dike <jdike@addtoit.com>
To: Paolo Giarrusso <blaisorblade@yahoo.it>
Cc: Andrew Morton <akpm@osdl.org>,
linux-kernel@vger.kernel.org,
user-mode-linux-devel@lists.sourceforge.net
Subject: Re: [uml-devel] [PATCH 01/14] uml: fix compilation options for USER_OBJS
Date: Fri, 13 Oct 2006 16:10:10 -0400 [thread overview]
Message-ID: <20061013201010.GC5517@ccure.user-mode-linux.org> (raw)
In-Reply-To: <20061011110828.43576.qmail@web25221.mail.ukl.yahoo.com>
On Wed, Oct 11, 2006 at 01:08:27PM +0200, Paolo Giarrusso wrote:
> Ok, at a first glance this alternative solution is ok. Make sure (run
> gdb on an userspace object file and saying list <function>) that it
> works and we'll be ok.
After discovering that the original patch broke UML/i386 and broke the
UML/x86_64 build, I now have the patch below.
Listing userspace functions is fine.
Jeff
Index: linux-2.6.18-mm/arch/um/Makefile
===================================================================
--- linux-2.6.18-mm.orig/arch/um/Makefile 2006-10-13 10:20:51.000000000 -0400
+++ linux-2.6.18-mm/arch/um/Makefile 2006-10-13 10:21:50.000000000 -0400
@@ -64,9 +64,14 @@ CFLAGS += $(CFLAGS-y) -D__arch_um__ -DSU
AFLAGS += $(ARCH_INCLUDE)
-USER_CFLAGS := $(patsubst -I%,,$(CFLAGS))
-USER_CFLAGS := $(patsubst -D__KERNEL__,,$(USER_CFLAGS)) $(ARCH_INCLUDE) \
- $(MODE_INCLUDE) -D_FILE_OFFSET_BITS=64
+USER_CFLAGS = $(patsubst $(KERNEL_DEFINES),,$(patsubst -D__KERNEL__,,\
+ $(patsubst -I%,,$(CFLAGS)))) $(ARCH_INCLUDE) $(MODE_INCLUDE) \
+ -D_FILE_OFFSET_BITS=64
+
+include $(srctree)/$(ARCH_DIR)/Makefile-$(SUBARCH)
+
+#This will adjust *FLAGS accordingly to the platform.
+include $(srctree)/$(ARCH_DIR)/Makefile-os-$(OS)
# -Derrno=kernel_errno - This turns all kernel references to errno into
# kernel_errno to separate them from the libc errno. This allows -fno-common
@@ -74,15 +79,11 @@ USER_CFLAGS := $(patsubst -D__KERNEL__,,
# errnos.
# These apply to kernelspace only.
-CFLAGS += -Derrno=kernel_errno -Dsigprocmask=kernel_sigprocmask \
- -Dmktime=kernel_mktime
+KERNEL_DEFINES = -Derrno=kernel_errno -Dsigprocmask=kernel_sigprocmask \
+ -Dmktime=kernel_mktime $(ARCH_KERNEL_DEFINES)
+CFLAGS += $(KERNEL_DEFINES)
CFLAGS += $(call cc-option,-fno-unit-at-a-time,)
-include $(srctree)/$(ARCH_DIR)/Makefile-$(SUBARCH)
-
-#This will adjust *FLAGS accordingly to the platform.
-include $(srctree)/$(ARCH_DIR)/Makefile-os-$(OS)
-
# These are needed for clean and mrproper, since in that case .config is not
# included; the values here are meaningless
Index: linux-2.6.18-mm/arch/um/Makefile-x86_64
===================================================================
--- linux-2.6.18-mm.orig/arch/um/Makefile-x86_64 2006-10-13 10:20:51.000000000 -0400
+++ linux-2.6.18-mm/arch/um/Makefile-x86_64 2006-10-13 10:21:50.000000000 -0400
@@ -8,8 +8,8 @@ _extra_flags_ = -fno-builtin -m64
#We #undef __x86_64__ for kernelspace, not for userspace where
#it's needed for headers to work!
-CFLAGS += -U__$(SUBARCH)__ $(_extra_flags_)
-USER_CFLAGS += $(_extra_flags_)
+ARCH_KERNEL_DEFINES = -U__$(SUBARCH)__
+CFLAGS += $(_extra_flags_)
CHECKFLAGS += -m64
AFLAGS += -m64
Index: linux-2.6.18-mm/arch/um/Makefile-i386
===================================================================
--- linux-2.6.18-mm.orig/arch/um/Makefile-i386 2006-10-10 09:10:21.000000000 -0400
+++ linux-2.6.18-mm/arch/um/Makefile-i386 2006-10-13 10:28:43.000000000 -0400
@@ -16,7 +16,6 @@ OBJCOPYFLAGS := -O binary -R .note -R
ifeq ("$(origin SUBARCH)", "command line")
ifneq ("$(shell uname -m | sed -e s/i.86/i386/)", "$(SUBARCH)")
CFLAGS += $(call cc-option,-m32)
-USER_CFLAGS += $(call cc-option,-m32)
AFLAGS += $(call cc-option,-m32)
LINK-y += $(call cc-option,-m32)
UML_OBJCOPYFLAGS += -F $(ELF_FORMAT)
@@ -25,7 +24,7 @@ export LDFLAGS HOSTCFLAGS HOSTLDFLAGS UM
endif
endif
-CFLAGS += -U__$(SUBARCH)__ -U$(SUBARCH)
+ARCH_KERNEL_DEFINES += -U__$(SUBARCH)__ -U$(SUBARCH)
# First of all, tune CFLAGS for the specific CPU. This actually sets cflags-y.
include $(srctree)/arch/i386/Makefile.cpu
@@ -38,4 +37,3 @@ cflags-y += $(call cc-option,-mpreferred
cflags-y += -ffreestanding
CFLAGS += $(cflags-y)
-USER_CFLAGS += $(cflags-y)
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
WARNING: multiple messages have this Message-ID (diff)
From: Jeff Dike <jdike@addtoit.com>
To: Paolo Giarrusso <blaisorblade@yahoo.it>
Cc: Andrew Morton <akpm@osdl.org>,
linux-kernel@vger.kernel.org,
user-mode-linux-devel@lists.sourceforge.net
Subject: Re: [uml-devel] [PATCH 01/14] uml: fix compilation options for USER_OBJS
Date: Fri, 13 Oct 2006 16:10:10 -0400 [thread overview]
Message-ID: <20061013201010.GC5517@ccure.user-mode-linux.org> (raw)
In-Reply-To: <20061011110828.43576.qmail@web25221.mail.ukl.yahoo.com>
On Wed, Oct 11, 2006 at 01:08:27PM +0200, Paolo Giarrusso wrote:
> Ok, at a first glance this alternative solution is ok. Make sure (run
> gdb on an userspace object file and saying list <function>) that it
> works and we'll be ok.
After discovering that the original patch broke UML/i386 and broke the
UML/x86_64 build, I now have the patch below.
Listing userspace functions is fine.
Jeff
Index: linux-2.6.18-mm/arch/um/Makefile
===================================================================
--- linux-2.6.18-mm.orig/arch/um/Makefile 2006-10-13 10:20:51.000000000 -0400
+++ linux-2.6.18-mm/arch/um/Makefile 2006-10-13 10:21:50.000000000 -0400
@@ -64,9 +64,14 @@ CFLAGS += $(CFLAGS-y) -D__arch_um__ -DSU
AFLAGS += $(ARCH_INCLUDE)
-USER_CFLAGS := $(patsubst -I%,,$(CFLAGS))
-USER_CFLAGS := $(patsubst -D__KERNEL__,,$(USER_CFLAGS)) $(ARCH_INCLUDE) \
- $(MODE_INCLUDE) -D_FILE_OFFSET_BITS=64
+USER_CFLAGS = $(patsubst $(KERNEL_DEFINES),,$(patsubst -D__KERNEL__,,\
+ $(patsubst -I%,,$(CFLAGS)))) $(ARCH_INCLUDE) $(MODE_INCLUDE) \
+ -D_FILE_OFFSET_BITS=64
+
+include $(srctree)/$(ARCH_DIR)/Makefile-$(SUBARCH)
+
+#This will adjust *FLAGS accordingly to the platform.
+include $(srctree)/$(ARCH_DIR)/Makefile-os-$(OS)
# -Derrno=kernel_errno - This turns all kernel references to errno into
# kernel_errno to separate them from the libc errno. This allows -fno-common
@@ -74,15 +79,11 @@ USER_CFLAGS := $(patsubst -D__KERNEL__,,
# errnos.
# These apply to kernelspace only.
-CFLAGS += -Derrno=kernel_errno -Dsigprocmask=kernel_sigprocmask \
- -Dmktime=kernel_mktime
+KERNEL_DEFINES = -Derrno=kernel_errno -Dsigprocmask=kernel_sigprocmask \
+ -Dmktime=kernel_mktime $(ARCH_KERNEL_DEFINES)
+CFLAGS += $(KERNEL_DEFINES)
CFLAGS += $(call cc-option,-fno-unit-at-a-time,)
-include $(srctree)/$(ARCH_DIR)/Makefile-$(SUBARCH)
-
-#This will adjust *FLAGS accordingly to the platform.
-include $(srctree)/$(ARCH_DIR)/Makefile-os-$(OS)
-
# These are needed for clean and mrproper, since in that case .config is not
# included; the values here are meaningless
Index: linux-2.6.18-mm/arch/um/Makefile-x86_64
===================================================================
--- linux-2.6.18-mm.orig/arch/um/Makefile-x86_64 2006-10-13 10:20:51.000000000 -0400
+++ linux-2.6.18-mm/arch/um/Makefile-x86_64 2006-10-13 10:21:50.000000000 -0400
@@ -8,8 +8,8 @@ _extra_flags_ = -fno-builtin -m64
#We #undef __x86_64__ for kernelspace, not for userspace where
#it's needed for headers to work!
-CFLAGS += -U__$(SUBARCH)__ $(_extra_flags_)
-USER_CFLAGS += $(_extra_flags_)
+ARCH_KERNEL_DEFINES = -U__$(SUBARCH)__
+CFLAGS += $(_extra_flags_)
CHECKFLAGS += -m64
AFLAGS += -m64
Index: linux-2.6.18-mm/arch/um/Makefile-i386
===================================================================
--- linux-2.6.18-mm.orig/arch/um/Makefile-i386 2006-10-10 09:10:21.000000000 -0400
+++ linux-2.6.18-mm/arch/um/Makefile-i386 2006-10-13 10:28:43.000000000 -0400
@@ -16,7 +16,6 @@ OBJCOPYFLAGS := -O binary -R .note -R
ifeq ("$(origin SUBARCH)", "command line")
ifneq ("$(shell uname -m | sed -e s/i.86/i386/)", "$(SUBARCH)")
CFLAGS += $(call cc-option,-m32)
-USER_CFLAGS += $(call cc-option,-m32)
AFLAGS += $(call cc-option,-m32)
LINK-y += $(call cc-option,-m32)
UML_OBJCOPYFLAGS += -F $(ELF_FORMAT)
@@ -25,7 +24,7 @@ export LDFLAGS HOSTCFLAGS HOSTLDFLAGS UM
endif
endif
-CFLAGS += -U__$(SUBARCH)__ -U$(SUBARCH)
+ARCH_KERNEL_DEFINES += -U__$(SUBARCH)__ -U$(SUBARCH)
# First of all, tune CFLAGS for the specific CPU. This actually sets cflags-y.
include $(srctree)/arch/i386/Makefile.cpu
@@ -38,4 +37,3 @@ cflags-y += $(call cc-option,-mpreferred
cflags-y += -ffreestanding
CFLAGS += $(cflags-y)
-USER_CFLAGS += $(cflags-y)
next prev parent reply other threads:[~2006-10-13 20:11 UTC|newest]
Thread overview: 54+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-10-05 21:32 [uml-devel] [PATCH 00/14] UML: simple changes for 2.6.19 Paolo 'Blaisorblade' Giarrusso
2006-10-05 21:32 ` Paolo 'Blaisorblade' Giarrusso
2006-10-05 21:38 ` [uml-devel] [PATCH 01/14] uml: fix compilation options for USER_OBJS Paolo 'Blaisorblade' Giarrusso
2006-10-05 21:38 ` Paolo 'Blaisorblade' Giarrusso
2006-10-09 16:32 ` [uml-devel] " Jeff Dike
2006-10-09 16:32 ` Jeff Dike
2006-10-11 11:08 ` Paolo Giarrusso
2006-10-11 11:08 ` Paolo Giarrusso
2006-10-13 20:10 ` Jeff Dike [this message]
2006-10-13 20:10 ` Jeff Dike
2006-10-26 6:08 ` Blaisorblade
2006-10-26 6:08 ` Blaisorblade
2006-10-05 21:38 ` [uml-devel] [PATCH 02/14] uml: revert wrong patch Paolo 'Blaisorblade' Giarrusso
2006-10-05 21:38 ` Paolo 'Blaisorblade' Giarrusso
2006-10-05 21:45 ` [uml-devel] " Andi Kleen
2006-10-05 21:45 ` Andi Kleen
2006-10-05 21:45 ` [uml-devel] " Blaisorblade
2006-10-05 21:45 ` Blaisorblade
2006-10-05 21:38 ` [uml-devel] [PATCH 03/14] uml: correct removal of pte_mkexec Paolo 'Blaisorblade' Giarrusso
2006-10-05 21:38 ` Paolo 'Blaisorblade' Giarrusso
2006-10-05 21:38 ` [uml-devel] [PATCH 04/14] uml: readd forgot prototype Paolo 'Blaisorblade' Giarrusso
2006-10-05 21:38 ` Paolo 'Blaisorblade' Giarrusso
2006-10-06 1:00 ` [uml-devel] " Andrew Morton
2006-10-06 1:00 ` Andrew Morton
2006-10-09 18:12 ` [uml-devel] " Jeff Dike
2006-10-09 18:12 ` Jeff Dike
2006-10-05 21:38 ` [uml-devel] [PATCH 05/14] uml: make TT mode compile after setjmp-related changes Paolo 'Blaisorblade' Giarrusso
2006-10-05 21:38 ` Paolo 'Blaisorblade' Giarrusso
2006-10-05 21:38 ` [uml-devel] [PATCH 06/14] uml: make UML_SETJMP always safe Paolo 'Blaisorblade' Giarrusso
2006-10-05 21:38 ` Paolo 'Blaisorblade' Giarrusso
2006-10-09 18:00 ` [uml-devel] " Jeff Dike
2006-10-09 18:00 ` Jeff Dike
2006-10-14 0:13 ` Blaisorblade
2006-10-14 0:13 ` Blaisorblade
2006-10-05 21:38 ` [uml-devel] [PATCH 07/14] uml: fix processor selection to exclude unsupported processors and features Paolo 'Blaisorblade' Giarrusso
2006-10-05 21:38 ` Paolo 'Blaisorblade' Giarrusso
2006-10-05 21:38 ` [uml-devel] [PATCH 08/14] uml: fix uname under setarch i386 Paolo 'Blaisorblade' Giarrusso
2006-10-05 21:38 ` Paolo 'Blaisorblade' Giarrusso
2006-10-05 21:39 ` [uml-devel] [PATCH 09/14] uml: declare in Kconfig our partial LOCKDEP support Paolo 'Blaisorblade' Giarrusso
2006-10-05 21:39 ` Paolo 'Blaisorblade' Giarrusso
2006-10-05 21:39 ` [uml-devel] [PATCH 10/14] uml: allow using again x86/x86_64 crypto code Paolo 'Blaisorblade' Giarrusso
2006-10-05 21:39 ` Paolo 'Blaisorblade' Giarrusso
2006-10-05 21:39 ` [uml-devel] [PATCH 11/14] uml: asm offsets duplication removal Paolo 'Blaisorblade' Giarrusso
2006-10-05 21:39 ` Paolo 'Blaisorblade' Giarrusso
2006-10-05 21:39 ` [uml-devel] [PATCH 12/14] uml: remove duplicate export Paolo 'Blaisorblade' Giarrusso
2006-10-05 21:39 ` Paolo 'Blaisorblade' Giarrusso
2006-10-05 21:39 ` [uml-devel] [PATCH 13/14] uml: deprecate CONFIG_MODE_TT Paolo 'Blaisorblade' Giarrusso
2006-10-05 21:39 ` Paolo 'Blaisorblade' Giarrusso
2006-10-09 18:05 ` [uml-devel] " Jeff Dike
2006-10-09 18:05 ` Jeff Dike
2006-10-05 21:39 ` [uml-devel] [PATCH 14/14] uml: allow finer tuning for host VMSPLIT setting Paolo 'Blaisorblade' Giarrusso
2006-10-05 21:39 ` Paolo 'Blaisorblade' Giarrusso
2006-10-09 18:11 ` [uml-devel] [PATCH 00/14] UML: simple changes for 2.6.19 Jeff Dike
2006-10-09 18:11 ` Jeff Dike
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=20061013201010.GC5517@ccure.user-mode-linux.org \
--to=jdike@addtoit.com \
--cc=akpm@osdl.org \
--cc=blaisorblade@yahoo.it \
--cc=linux-kernel@vger.kernel.org \
--cc=user-mode-linux-devel@lists.sourceforge.net \
/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: link
Be 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.