public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Re: 2.6.21-rc4-mm1 [PATCH] init/missing_syscalls.h fix
  2007-03-20  4:56 2.6.21-rc4-mm1 Andrew Morton
@ 2007-03-20 10:52 ` Stephane Jourdois
  0 siblings, 0 replies; 2+ messages in thread
From: Stephane Jourdois @ 2007-03-20 10:52 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-kernel, David Woodhouse

On Mon, Mar 19, 2007 at 08:56:23PM -0800, Andrew Morton wrote:
> 
> Temporarily at
> 
>   http://userweb.kernel.org/~akpm/2.6.21-rc4-mm1/

[..]

> +complain-about-missing-system-calls.patch
> +complain-about-missing-system-calls-update.patch


Hi,

I needed the following patch to fix this compile error (which does not
happend at first compile):

kwisatz@ambre:/usr/src/linux-2.6.21-rc4-mm1 $ rm init/missing_syscalls.h 
kwisatz@ambre:/usr/src/linux-2.6.21-rc4-mm1 $ make init
  CHK     include/linux/version.h
  CHK     include/linux/utsrelease.h
  CHK     include/linux/compile.h
  GEN     init/missing_syscalls.h
  CC      init/missing_syscalls.o
  LD      init/built-in.o
kwisatz@ambre:/usr/src/linux-2.6.21-rc4-mm1 $ cat init/.missing_syscalls.h.cmd
cmd_init/missing_syscalls.h := sed -n '/^\#define/s/[^_]*__NR_\([^[:space:]]*\).*/ \#if !defined (__NR_) \&\& !defined (__IGNORE_)
 \#warning syscall  not implemented
 \#endif/p' /usr/src/linux-2.6.21-rc4-mm1/include/asm-i386/unistd.h >init/missing_syscalls.h

# (note all three \1 missing, replaced by char '^A', not visible here.
# note also that my /bin/sh is symlinked to dash (not bash) 0.5.3

kwisatz@ambre:/usr/src/linux-2.6.21-rc4-mm1 $ make init
  CHK     include/linux/version.h
  CHK     include/linux/utsrelease.h
init/.missing_syscalls.h.cmd:2: *** séparateur manquant . Arrêt.
make: *** [init] Erreur 2


As far as I understand it, Makefile rule cmd_missing_syscalls (from
init/Makefile) is used twice in two different ways:
- At first compile:
  - run the command directly from Makefile,
  - dump this command to init/.missing_syscalls.h.cmd for further use;
- At every but first compile:
  - run existing init/.missing_syscalls.h.cmd


Can someone confirm that this is the right way to patch this ?



Thanks,
- Stéphane.

# complain-about-missing-system-calls-fix.patch
# Make generation of init/missing_syscalls.h more robust.
# Note: This fix is required only for "all but first" compilations, and
# perhaps only on some configurations (cf. /bin/sh).

Signed-off-by: Stéphane (kwisatz) Jourdois <kwisatz@rubis.org>

diff -uNr linux-2.6.21-rc4-mm1.orig/init/Makefile linux-2.6.21-rc4-mm1/init/Makefile
--- linux-2.6.21-rc4-mm1.orig/init/Makefile	2007-03-20 09:54:23.000000000 +0100
+++ linux-2.6.21-rc4-mm1/init/Makefile	2007-03-20 11:19:02.000000000 +0100
@@ -35,10 +35,8 @@
 
 
 quiet_cmd_missing_syscalls = GEN     $@
-      cmd_missing_syscalls = sed -n '/^\#define/s/[^_]*__NR_\([^[:space:]]*\).*/\
-	\#if !defined (__NR_\1) \&\& !defined (__IGNORE_\1)\n\
-	\#warning syscall \1 not implemented\n\
-	\#endif/p' $(srctree)/include/asm-i386/unistd.h >$@
+      cmd_missing_syscalls = sed -n -f scripts/mkmissing_syscalls_h \
+      			$(srctree)/include/asm-i386/unistd.h >$@
 targets += missing_syscalls.h
 $(obj)/missing_syscalls.h: include/asm-i386/unistd.h
 	$(call if_changed,missing_syscalls)
diff -uNr linux-2.6.21-rc4-mm1.orig/scripts/mkmissing_syscalls_h linux-2.6.21-rc4-mm1/scripts/mkmissing_syscalls_h
--- linux-2.6.21-rc4-mm1.orig/scripts/mkmissing_syscalls_h	1970-01-01 01:00:00.000000000 +0100
+++ linux-2.6.21-rc4-mm1/scripts/mkmissing_syscalls_h	2007-03-20 11:34:21.000000000 +0100
@@ -0,0 +1,6 @@
+/^\#define/ {
+	s/[^_]*__NR_\([^[:space:]]*\).*/\
+\#if !defined (__NR_\1) \&\& !defined (__IGNORE_\1)\
+\#warning syscall \1 not implemented\
+\#endif/p
+}

-- 
 ///  Stephane Jourdois     /"\  ASCII RIBBON CAMPAIGN \\\
(((    Consultant securite  \ /    AGAINST HTML MAIL    )))
 \\\   24 rue Cauchy         X                         ///
  \\\  75015  Paris         / \    +33 6 8643 3085    ///

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

* Re: 2.6.21-rc4-mm1 [PATCH] init/missing_syscalls.h fix
@ 2007-03-20 12:55 Ben Nizette
  0 siblings, 0 replies; 2+ messages in thread
From: Ben Nizette @ 2007-03-20 12:55 UTC (permalink / raw)
  To: Linux Kernel list; +Cc: Andrew Morton, dwmw2

Stephane Jourdois wrote:
> On Mon, Mar 19, 2007 at 08:56:23PM -0800, Andrew Morton wrote:
>> Temporarily at
>>
>>   http://userweb.kernel.org/~akpm/2.6.21-rc4-mm1/
> 
> [..]
> 
>> +complain-about-missing-system-calls.patch
>> +complain-about-missing-system-calls-update.patch
> 
> 
> Hi,
> 
> I needed the following patch to fix this compile error (which does not
> happend at first compile):
> [..]
> # (note all three \1 missing, replaced by char '^A', not visible here.
> # note also that my /bin/sh is symlinked to dash (not bash) 0.5.3
> [..] 
> Can someone confirm that this is the right way to patch this ?
> 

Can't confirm the correctness but I can confirm that this problem
appears for me using both bash and dash and that the attached patch
allows compile to progress.  Cheers :)

--Ben.

> 
> Thanks,
> - Stéphane.

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

end of thread, other threads:[~2007-03-20 12:55 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-03-20 12:55 2.6.21-rc4-mm1 [PATCH] init/missing_syscalls.h fix Ben Nizette
  -- strict thread matches above, loose matches on Subject: below --
2007-03-20  4:56 2.6.21-rc4-mm1 Andrew Morton
2007-03-20 10:52 ` 2.6.21-rc4-mm1 [PATCH] init/missing_syscalls.h fix Stephane Jourdois

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox