From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757047AbXFZNMl (ORCPT ); Tue, 26 Jun 2007 09:12:41 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752356AbXFZNMd (ORCPT ); Tue, 26 Jun 2007 09:12:33 -0400 Received: from static-71-162-243-5.phlapa.fios.verizon.net ([71.162.243.5]:34154 "EHLO grelber.thyrsus.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752236AbXFZNMc (ORCPT ); Tue, 26 Jun 2007 09:12:32 -0400 From: Rob Landley Organization: Boundaries Unlimited To: linux-kernel@vger.kernel.org Subject: [PATCH] Fix headers_install for x86-64 (now with less whitespace damage!) Date: Tue, 26 Jun 2007 09:12:36 -0400 User-Agent: KMail/1.9.6 Cc: David Woodhouse MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200706260912.37441.rob@landley.net> Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Signed-off-by: Rob Landley A bug in headers_install for ARCH=x86_64 yields an asm/ directory full of files all of which are using the same #ifdef guard, "__ASM_STUB_" with no postfix. So the second and later asm files #included in the same C file (often through standard headers like ioctl.h) yields no symbols. -- There's a missing semicolon after the assignment to FNAME (so the assignment of STUBDEF on the next line doesn't see the value), and it helps to export variables before calling a subshell. Second try, telling Kmail not to wordwrap inappropriately. (I am up waaaay too early to get ready for OLS...) --- linux-2.6/scripts/Makefile.headersinst 2007-06-15 02:45:07.000000000 -0400 +++ linux/scripts/Makefile.headersinst 2007-06-26 08:54:13.000000000 -0400 @@ -108,8 +108,8 @@ quiet_cmd_gen = GEN $(patsubst $(INSTALL_HDR_PATH)/%,%,$@) cmd_gen = \ -FNAME=$(patsubst $(INSTALL_HDR_PATH)/$(_dst)/%,%,$@) \ -STUBDEF=__ASM_STUB_`echo $$FNAME | tr a-z.- A-Z__`; \ +export FNAME=$(patsubst $(INSTALL_HDR_PATH)/$(_dst)/%,%,$@); \ +export STUBDEF=__ASM_STUB_`echo $$FNAME | tr a-z.- A-Z__`; \ (echo "/* File autogenerated by 'make headers_install' */" ; \ echo "\#ifndef $$STUBDEF" ; \ echo "\#define $$STUBDEF" ; \ -- "One of my most productive days was throwing away 1000 lines of code." - Ken Thompson.