public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jeff Dike <jdike@addtoit.com>
To: "Paolo 'Blaisorblade' 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: Mon, 9 Oct 2006 12:32:08 -0400	[thread overview]
Message-ID: <20061009163208.GA4931@ccure.user-mode-linux.org> (raw)
In-Reply-To: <20061005213836.17268.96038.stgit@memento.home.lan>

On Thu, Oct 05, 2006 at 11:38:36PM +0200, Paolo 'Blaisorblade' Giarrusso wrote:
> Again, move inclusion of arch's Makefile after CFLAGS setting - I remember
> merging the same patch eons ago in 2.6, so I added a comment.
> 
> I discovered this because debug info weren't enabled for USER_OBJS - they're
> compiled with USER_CFLAGS which is calculated from CFLAGS (the whole thing is a
> bit of an hack but fixing it is not easy, so we're leaving it as-is).

What's the matter with this:

Index: linux-2.6.18-mm/arch/um/Makefile
===================================================================
--- linux-2.6.18-mm.orig/arch/um/Makefile       2006-10-03 17:44:32.000000000 -0400
+++ linux-2.6.18-mm/arch/um/Makefile    2006-10-09 12:29:32.000000000 -0400
@@ -64,9 +64,8 @@ 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 -D__KERNEL__,,$(patsubst -I%,,$(CFLAGS))) \
+       $(ARCH_INCLUDE) $(MODE_INCLUDE) -D_FILE_OFFSET_BITS=64
 
 # -Derrno=kernel_errno - This turns all kernel references to errno into
 # kernel_errno to separate them from the libc errno.  This allows -fno-common

The real problem is the use of := which assigns USER_CFLAGS from the
current value of CFLAGS, which is incomplete, as you noted.

Moving the include around seems slightly bogus, since its precise
location shouldn't matter.

If we switch to plain =, then it will be lazy-evaluated with the full
CFLAGS.

And we should check other uses of := to make sure they don't have
similar problems.

				Jeff

  reply	other threads:[~2006-10-10  2:09 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-10-05 21:32 [PATCH 00/14] UML: simple changes for 2.6.19 Paolo 'Blaisorblade' Giarrusso
2006-10-05 21:38 ` [PATCH 01/14] uml: fix compilation options for USER_OBJS Paolo 'Blaisorblade' Giarrusso
2006-10-09 16:32   ` Jeff Dike [this message]
2006-10-11 11:08     ` [uml-devel] " Paolo Giarrusso
2006-10-13 20:10       ` Jeff Dike
2006-10-26  6:08         ` Blaisorblade
2006-10-05 21:38 ` [PATCH 02/14] uml: revert wrong patch Paolo 'Blaisorblade' Giarrusso
2006-10-05 21:45   ` Andi Kleen
2006-10-05 21:45     ` [uml-devel] " Blaisorblade
2006-10-05 21:38 ` [PATCH 03/14] uml: correct removal of pte_mkexec Paolo 'Blaisorblade' Giarrusso
2006-10-05 21:38 ` [PATCH 04/14] uml: readd forgot prototype Paolo 'Blaisorblade' Giarrusso
2006-10-06  1:00   ` Andrew Morton
2006-10-09 18:12     ` [uml-devel] " Jeff Dike
2006-10-05 21:38 ` [PATCH 05/14] uml: make TT mode compile after setjmp-related changes Paolo 'Blaisorblade' Giarrusso
2006-10-05 21:38 ` [PATCH 06/14] uml: make UML_SETJMP always safe Paolo 'Blaisorblade' Giarrusso
2006-10-09 18:00   ` [uml-devel] " Jeff Dike
2006-10-14  0:13     ` Blaisorblade
2006-10-05 21:38 ` [PATCH 07/14] uml: fix processor selection to exclude unsupported processors and features Paolo 'Blaisorblade' Giarrusso
2006-10-05 21:38 ` [PATCH 08/14] uml: fix uname under setarch i386 Paolo 'Blaisorblade' Giarrusso
2006-10-05 21:39 ` [PATCH 09/14] uml: declare in Kconfig our partial LOCKDEP support Paolo 'Blaisorblade' Giarrusso
2006-10-05 21:39 ` [PATCH 10/14] uml: allow using again x86/x86_64 crypto code Paolo 'Blaisorblade' Giarrusso
2006-10-05 21:39 ` [PATCH 11/14] uml: asm offsets duplication removal Paolo 'Blaisorblade' Giarrusso
2006-10-05 21:39 ` [PATCH 12/14] uml: remove duplicate export Paolo 'Blaisorblade' Giarrusso
2006-10-05 21:39 ` [PATCH 13/14] uml: deprecate CONFIG_MODE_TT Paolo 'Blaisorblade' Giarrusso
2006-10-09 18:05   ` [uml-devel] " Jeff Dike
2006-10-05 21:39 ` [PATCH 14/14] uml: allow finer tuning for host VMSPLIT setting Paolo 'Blaisorblade' Giarrusso
2006-10-09 18:11 ` [uml-devel] [PATCH 00/14] UML: simple changes for 2.6.19 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=20061009163208.GA4931@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox