From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from sc8-sf-mx1-b.sourceforge.net ([10.3.1.91] helo=mail.sourceforge.net) by sc8-sf-list1-new.sourceforge.net with esmtp (Exim 4.43) id 1ImXdg-0006Su-E4 for user-mode-linux-devel@lists.sourceforge.net; Mon, 29 Oct 2007 09:38:56 -0700 Received: from saraswathi.solana.com ([198.99.130.12]) by mail.sourceforge.net with esmtps (TLSv1:AES256-SHA:256) (Exim 4.44) id 1ImXdb-0005mX-Jx for user-mode-linux-devel@lists.sourceforge.net; Mon, 29 Oct 2007 09:38:56 -0700 Date: Mon, 29 Oct 2007 12:38:41 -0400 From: Jeff Dike Message-ID: <20071029163841.GA7661@c2.user-mode-linux.org> Mime-Version: 1.0 Content-Disposition: inline Subject: [uml-devel] [PATCH] Correctly strip kernel defines from userspace CFLAGS List-Id: The user-mode Linux development list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: user-mode-linux-devel-bounces@lists.sourceforge.net Errors-To: user-mode-linux-devel-bounces@lists.sourceforge.net To: Linus Torvalds Cc: LKML , uml-devel KERNEL_DEFINES needs whitespace trimmed, otherwise the whitespace crunching done by make fools the patsubst which is used to remove KERNEL_DEFINES from USER_CFLAGS. Signed-off-by: Jeff Dike --- arch/um/Makefile | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) Index: linux-2.6/arch/um/Makefile =================================================================== --- linux-2.6.orig/arch/um/Makefile 2007-10-22 16:19:38.000000000 -0400 +++ linux-2.6/arch/um/Makefile 2007-10-22 16:19:44.000000000 -0400 @@ -70,9 +70,12 @@ include $(srctree)/$(ARCH_DIR)/Makefile- # in KBUILD_CFLAGS. Otherwise, it would cause ld to complain about the two different # errnos. # These apply to kernelspace only. +# +# strip leading and trailing whitespace to make the USER_CFLAGS removal of these +# defines more robust -KERNEL_DEFINES = -Derrno=kernel_errno -Dsigprocmask=kernel_sigprocmask \ - -Dmktime=kernel_mktime $(ARCH_KERNEL_DEFINES) +KERNEL_DEFINES = $(strip -Derrno=kernel_errno -Dsigprocmask=kernel_sigprocmask \ + -Dmktime=kernel_mktime $(ARCH_KERNEL_DEFINES)) KBUILD_CFLAGS += $(KERNEL_DEFINES) KBUILD_CFLAGS += $(call cc-option,-fno-unit-at-a-time,) ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ User-mode-linux-devel mailing list User-mode-linux-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759224AbXJ2QjP (ORCPT ); Mon, 29 Oct 2007 12:39:15 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1756082AbXJ2Qi6 (ORCPT ); Mon, 29 Oct 2007 12:38:58 -0400 Received: from saraswathi.solana.com ([198.99.130.12]:36606 "EHLO saraswathi.solana.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755823AbXJ2Qi5 (ORCPT ); Mon, 29 Oct 2007 12:38:57 -0400 Date: Mon, 29 Oct 2007 12:38:41 -0400 From: Jeff Dike To: Linus Torvalds Cc: LKML , uml-devel Subject: [PATCH] Correctly strip kernel defines from userspace CFLAGS Message-ID: <20071029163841.GA7661@c2.user-mode-linux.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.2.3i Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org KERNEL_DEFINES needs whitespace trimmed, otherwise the whitespace crunching done by make fools the patsubst which is used to remove KERNEL_DEFINES from USER_CFLAGS. Signed-off-by: Jeff Dike --- arch/um/Makefile | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) Index: linux-2.6/arch/um/Makefile =================================================================== --- linux-2.6.orig/arch/um/Makefile 2007-10-22 16:19:38.000000000 -0400 +++ linux-2.6/arch/um/Makefile 2007-10-22 16:19:44.000000000 -0400 @@ -70,9 +70,12 @@ include $(srctree)/$(ARCH_DIR)/Makefile- # in KBUILD_CFLAGS. Otherwise, it would cause ld to complain about the two different # errnos. # These apply to kernelspace only. +# +# strip leading and trailing whitespace to make the USER_CFLAGS removal of these +# defines more robust -KERNEL_DEFINES = -Derrno=kernel_errno -Dsigprocmask=kernel_sigprocmask \ - -Dmktime=kernel_mktime $(ARCH_KERNEL_DEFINES) +KERNEL_DEFINES = $(strip -Derrno=kernel_errno -Dsigprocmask=kernel_sigprocmask \ + -Dmktime=kernel_mktime $(ARCH_KERNEL_DEFINES)) KBUILD_CFLAGS += $(KERNEL_DEFINES) KBUILD_CFLAGS += $(call cc-option,-fno-unit-at-a-time,)