All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Fix headers_install for x86-64 (now with less whitespace damage!)
@ 2007-06-26 13:12 Rob Landley
  2007-06-26 14:03 ` David Woodhouse
  0 siblings, 1 reply; 3+ messages in thread
From: Rob Landley @ 2007-06-26 13:12 UTC (permalink / raw)
  To: linux-kernel; +Cc: David Woodhouse

Signed-off-by: Rob Landley <rob@landley.net>
 
 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.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] Fix headers_install for x86-64 (now with less whitespace damage!)
  2007-06-26 13:12 [PATCH] Fix headers_install for x86-64 (now with less whitespace damage!) Rob Landley
@ 2007-06-26 14:03 ` David Woodhouse
  2007-06-26 14:48   ` Rob Landley
  0 siblings, 1 reply; 3+ messages in thread
From: David Woodhouse @ 2007-06-26 14:03 UTC (permalink / raw)
  To: Rob Landley; +Cc: linux-kernel

On Tue, 2007-06-26 at 09:12 -0400, Rob Landley wrote:
> Signed-off-by: Rob Landley <rob@landley.net>
>  
>  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.

Interesting. It works here with bash 3.2 -- I thought it was the _first_
shell which expanded $FNAME and $STUBDEF inside the parentheses. Which
shell are you using?

Is it sufficient just to add the missing semicolon after FNAME=...?

-- 
dwmw2


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] Fix headers_install for x86-64 (now with less whitespace damage!)
  2007-06-26 14:03 ` David Woodhouse
@ 2007-06-26 14:48   ` Rob Landley
  0 siblings, 0 replies; 3+ messages in thread
From: Rob Landley @ 2007-06-26 14:48 UTC (permalink / raw)
  To: David Woodhouse; +Cc: linux-kernel

On Tuesday 26 June 2007 10:03:49 David Woodhouse wrote:
> On Tue, 2007-06-26 at 09:12 -0400, Rob Landley wrote:
> > Signed-off-by: Rob Landley <rob@landley.net>
> >
> >  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.
>
> Interesting. It works here with bash 3.2 -- I thought it was the _first_ 
> shell which expanded $FNAME and $STUBDEF inside the parentheses. Which
> shell are you using?

Stock Ubuntu 7.04 comes with /bin/sh pointing to the Dumb-Ass SHell.  (Motto: 
If it's not explicitly mentioned in posix, and we accidentally support it, 
let us know so we can remove it!)

> Is it sufficient just to add the missing semicolon after FNAME=...?

Huh.  Apparently, yes it is.  (I thought I'd tried that and it hadn't worked, 
but I just tried it again and it worked, so ok.  It's before noon, don't 
expect accuracy from me yet today...)

Rob
-- 
"One of my most productive days was throwing away 1000 lines of code."
  - Ken Thompson.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2007-06-26 14:48 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-06-26 13:12 [PATCH] Fix headers_install for x86-64 (now with less whitespace damage!) Rob Landley
2007-06-26 14:03 ` David Woodhouse
2007-06-26 14:48   ` Rob Landley

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.