public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/1] My tools break here
@ 2005-11-07 21:56 Zachary Amsden
  2005-11-07 22:50 ` Sam Ravnborg
  0 siblings, 1 reply; 7+ messages in thread
From: Zachary Amsden @ 2005-11-07 21:56 UTC (permalink / raw)
  To: Linus Torvalds, Andrew Morton, Linux Kernel Mailing List,
	Sam Ravnborg, davej, thang, Zachary Amsden

I have to revert the recent addition of -imacros to the Makefile to get my
tool chain to build.  Without the change, below, I get:

Note that this looks entirely like a toolchain bug.  Here is the offending command:

[pid 12163] execve("/usr/lib/gcc-lib/i386-redhat-linux/3.2.2/tradcpp0", ["/usr/lib/gcc-lib/i386-redhat-linux/3.2.2/tradcpp0", "-lang-asm", "-nostdinc", "-Iinclude", "-Iinclude/asm-i386/mach-default", "-D__GNUC__=3", "-D__GNUC_MINOR__=2", "-D__GNUC_PATCHLEVEL__=2", "-D__GXX_ABI_VERSION=102", "-D__ELF__", "-Dunix", "-D__gnu_linux__", "-Dlinux", "-D__ELF__", "-D__unix__", "-D__gnu_linux__", "-D__linux__", "-D__unix", "-D__linux", "-Asystem=posix", "-D__NO_INLINE__", "-D__STDC_HOSTED__=1", "-Acpu=i386", "-Amachine=i386", "-Di386", "-D__i386", "-D__i386__", "-D__tune_i386__", "-D__KERNEL__", "-D__ASSEMBLY__", "-isystem", "/usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include", "-imacros", "include/linux/autoconf.h", "-MD", "arch/i386/kernel/.entry.o.d", "arch/i386/kernel/entry.S", "-o", "/tmp/ccOlsFJR.s"]

Which should execute properly, I think.  But it does not:

zach-dev:linux-2.6.14-zach-work $ make
  CHK     include/linux/version.h
  CHK     include/linux/compile.h
  CHK     usr/initramfs_list
  AS      arch/i386/kernel/entry.o
/usr/lib/gcc-lib/i386-redhat-linux/3.2.2/tradcpp0: output filename specified twice
make[1]: *** [arch/i386/kernel/entry.o] Error 1
make: *** [arch/i386/kernel] Error 2

gcc (GCC) 3.2.2 20030222 (Red Hat Linux 3.2.2-5)

Deprecating the -imacros fixes the build for me.  It does not appear to be a
simple argument overflow problem in trapcpp0, since deprecating all the defines
reproduces the problem as well.  Also, switching -imacros to -include fixes the
problem.

Signed-off-by: Zachary Amsden <zach@vmware.com>

Index: linux-2.6.14-zach-work/Makefile
===================================================================
--- linux-2.6.14-zach-work.orig/Makefile	2005-11-07 09:41:09.000000000 -0800
+++ linux-2.6.14-zach-work/Makefile	2005-11-07 13:34:14.000000000 -0800
@@ -346,8 +346,7 @@ AFLAGS_KERNEL	=
 # Use LINUXINCLUDE when you must reference the include/ directory.
 # Needed to be compatible with the O= option
 LINUXINCLUDE    := -Iinclude \
-                   $(if $(KBUILD_SRC),-Iinclude2 -I$(srctree)/include) \
-		   -imacros include/linux/autoconf.h
+                   $(if $(KBUILD_SRC),-Iinclude2 -I$(srctree)/include)
 
 CPPFLAGS        := -D__KERNEL__ $(LINUXINCLUDE)
 

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

* Re: [PATCH 1/1] My tools break here
  2005-11-07 21:56 [PATCH 1/1] My tools break here Zachary Amsden
@ 2005-11-07 22:50 ` Sam Ravnborg
  2005-11-07 23:08   ` Andrew Morton
                     ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Sam Ravnborg @ 2005-11-07 22:50 UTC (permalink / raw)
  To: Zachary Amsden, Russell King
  Cc: Linus Torvalds, Andrew Morton, Linux Kernel Mailing List, davej,
	than

On Mon, Nov 07, 2005 at 01:56:26PM -0800, Zachary Amsden wrote:
> I have to revert the recent addition of -imacros to the Makefile to get my
> tool chain to build.  Without the change, below, I get:
> 
> Note that this looks entirely like a toolchain bug.
Then fix your toolchain instead of reverting the -imacros patch.

The change has been in -git for a full day and in latest -mm too.
And so far this is the only report that it breaks - I no one else
complains it will stay.

	Sam

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

* Re: [PATCH 1/1] My tools break here
  2005-11-07 22:50 ` Sam Ravnborg
@ 2005-11-07 23:08   ` Andrew Morton
  2005-11-10 10:12     ` Andrew Morton
  2005-11-07 23:15   ` Russell King
  2005-11-07 23:27   ` [UPDATED,PATCH " Zachary Amsden
  2 siblings, 1 reply; 7+ messages in thread
From: Andrew Morton @ 2005-11-07 23:08 UTC (permalink / raw)
  To: Sam Ravnborg; +Cc: zach, rmk, torvalds, linux-kernel, davej, than

Sam Ravnborg <sam@ravnborg.org> wrote:
>
> On Mon, Nov 07, 2005 at 01:56:26PM -0800, Zachary Amsden wrote:
> > I have to revert the recent addition of -imacros to the Makefile to get my
> > tool chain to build.  Without the change, below, I get:
> > 
> > Note that this looks entirely like a toolchain bug.
> Then fix your toolchain instead of reverting the -imacros patch.

Well.   We work around toolchain bugs regularly.

> The change has been in -git for a full day and in latest -mm too.
> And so far this is the only report that it breaks - I no one else
> complains it will stay.

Let's wait and see how many more people are affected.

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

* Re: [PATCH 1/1] My tools break here
  2005-11-07 22:50 ` Sam Ravnborg
  2005-11-07 23:08   ` Andrew Morton
@ 2005-11-07 23:15   ` Russell King
  2005-11-07 23:27   ` [UPDATED,PATCH " Zachary Amsden
  2 siblings, 0 replies; 7+ messages in thread
From: Russell King @ 2005-11-07 23:15 UTC (permalink / raw)
  To: Sam Ravnborg
  Cc: Zachary Amsden, Linus Torvalds, Andrew Morton,
	Linux Kernel Mailing List, davej, than

On Mon, Nov 07, 2005 at 11:50:24PM +0100, Sam Ravnborg wrote:
> On Mon, Nov 07, 2005 at 01:56:26PM -0800, Zachary Amsden wrote:
> > I have to revert the recent addition of -imacros to the Makefile to get my
> > tool chain to build.  Without the change, below, I get:
> > 
> > Note that this looks entirely like a toolchain bug.
> Then fix your toolchain instead of reverting the -imacros patch.
> 
> The change has been in -git for a full day and in latest -mm too.
> And so far this is the only report that it breaks - I no one else
> complains it will stay.

If more people run into this problem, maybe we should switch to using
-include instead (Zachary indicates that this also fixes the problem.)

Let's try not to throw the preverbial baby out with the bath water.

-- 
Russell King
 Linux kernel    2.6 ARM Linux   - http://www.arm.linux.org.uk/
 maintainer of:  2.6 Serial core

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

* [UPDATED,PATCH 1/1] My tools break here
  2005-11-07 22:50 ` Sam Ravnborg
  2005-11-07 23:08   ` Andrew Morton
  2005-11-07 23:15   ` Russell King
@ 2005-11-07 23:27   ` Zachary Amsden
  2 siblings, 0 replies; 7+ messages in thread
From: Zachary Amsden @ 2005-11-07 23:27 UTC (permalink / raw)
  To: Sam Ravnborg
  Cc: Russell King, Linus Torvalds, Andrew Morton,
	Linux Kernel Mailing List, davej, than

[-- Attachment #1: Type: text/plain, Size: 766 bytes --]

Sam Ravnborg wrote:

>On Mon, Nov 07, 2005 at 01:56:26PM -0800, Zachary Amsden wrote:
>  
>
>>I have to revert the recent addition of -imacros to the Makefile to get my
>>tool chain to build.  Without the change, below, I get:
>>
>>Note that this looks entirely like a toolchain bug.
>>    
>>
>Then fix your toolchain instead of reverting the -imacros patch.
>
>The change has been in -git for a full day and in latest -mm too.
>And so far this is the only report that it breaks - I no one else
>complains it will stay.
>  
>

My tool chain is an unmodified RedHat 9 default install with all updates 
applied.

Can we at least consider using -include instead of -imacros? I don't 
think breaking the compile on this tool chain is a good idea, even if it 
is old.



[-- Attachment #2: my-tools-break-here --]
[-- Type: text/plain, Size: 2346 bytes --]

I have to revert the recent addition of -imacros to the Makefile to get my
tool chain to build.  Without the change, below, I get:

Note that this looks entirely like a toolchain bug.  Here is the offending command:

[pid 12163] execve("/usr/lib/gcc-lib/i386-redhat-linux/3.2.2/tradcpp0", ["/usr/lib/gcc-lib/i386-redhat-linux/3.2.2/tradcpp0", "-lang-asm", "-nostdinc", "-Iinclude", "-Iinclude/asm-i386/mach-default", "-D__GNUC__=3", "-D__GNUC_MINOR__=2", "-D__GNUC_PATCHLEVEL__=2", "-D__GXX_ABI_VERSION=102", "-D__ELF__", "-Dunix", "-D__gnu_linux__", "-Dlinux", "-D__ELF__", "-D__unix__", "-D__gnu_linux__", "-D__linux__", "-D__unix", "-D__linux", "-Asystem=posix", "-D__NO_INLINE__", "-D__STDC_HOSTED__=1", "-Acpu=i386", "-Amachine=i386", "-Di386", "-D__i386", "-D__i386__", "-D__tune_i386__", "-D__KERNEL__", "-D__ASSEMBLY__", "-isystem", "/usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include", "-imacros", "include/linux/autoconf.h", "-MD", "arch/i386/kernel/.entry.o.d", "arch/i386/kernel/entry.S", "-o", "/tmp/ccOlsFJR.s"]

Which should execute properly, I think.  But it does not:

zach-dev:linux-2.6.14-zach-work $ make
  CHK     include/linux/version.h
  CHK     include/linux/compile.h
  CHK     usr/initramfs_list
  AS      arch/i386/kernel/entry.o
/usr/lib/gcc-lib/i386-redhat-linux/3.2.2/tradcpp0: output filename specified twice
make[1]: *** [arch/i386/kernel/entry.o] Error 1
make: *** [arch/i386/kernel] Error 2

gcc (GCC) 3.2.2 20030222 (Red Hat Linux 3.2.2-5)

Deprecating the -imacros fixes the build for me.  It does not appear to be a
simple argument overflow problem in trapcpp0, since deprecating all the defines
reproduces the problem as well.  Also, switching -imacros to -include fixes the
problem.

Signed-off-by: Zachary Amsden <zach@vmware.com>
Index: linux-2.6.14-zach-work/Makefile
===================================================================
--- linux-2.6.14-zach-work.orig/Makefile	2005-11-07 15:24:35.000000000 -0800
+++ linux-2.6.14-zach-work/Makefile	2005-11-07 15:25:33.000000000 -0800
@@ -347,7 +347,7 @@ AFLAGS_KERNEL	=
 # Needed to be compatible with the O= option
 LINUXINCLUDE    := -Iinclude \
                    $(if $(KBUILD_SRC),-Iinclude2 -I$(srctree)/include) \
-		   -imacros include/linux/autoconf.h
+		   -include include/linux/autoconf.h
 
 CPPFLAGS        := -D__KERNEL__ $(LINUXINCLUDE)
 

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

* Re: [PATCH 1/1] My tools break here
  2005-11-07 23:08   ` Andrew Morton
@ 2005-11-10 10:12     ` Andrew Morton
  2005-11-10 20:54       ` Sam Ravnborg
  0 siblings, 1 reply; 7+ messages in thread
From: Andrew Morton @ 2005-11-10 10:12 UTC (permalink / raw)
  To: zach; +Cc: sam, rmk, torvalds, linux-kernel, davej, than

Andrew Morton <akpm@osdl.org> wrote:
>
> > The change has been in -git for a full day and in latest -mm too.
>  > And so far this is the only report that it breaks - I no one else
>  > complains it will stay.
> 
>  Let's wait and see how many more people are affected.

duh.  The next bunny is me.

/usr/local/gcc-3.2.1/lib/gcc-lib/i686-pc-linux-gnu/3.2.1/tradcpp0: output filename specified twice

That's a vanilla gcc-3.2.1

Is there any downside to using -include?

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

* Re: [PATCH 1/1] My tools break here
  2005-11-10 10:12     ` Andrew Morton
@ 2005-11-10 20:54       ` Sam Ravnborg
  0 siblings, 0 replies; 7+ messages in thread
From: Sam Ravnborg @ 2005-11-10 20:54 UTC (permalink / raw)
  To: Andrew Morton; +Cc: zach, rmk, torvalds, linux-kernel, davej, than

On Thu, Nov 10, 2005 at 02:12:55AM -0800, Andrew Morton wrote:
> Andrew Morton <akpm@osdl.org> wrote:
> >
> > > The change has been in -git for a full day and in latest -mm too.
> >  > And so far this is the only report that it breaks - I no one else
> >  > complains it will stay.
> > 
> >  Let's wait and see how many more people are affected.
> 
> duh.  The next bunny is me.
> 
> /usr/local/gcc-3.2.1/lib/gcc-lib/i686-pc-linux-gnu/3.2.1/tradcpp0: output filename specified twice
> 
> That's a vanilla gcc-3.2.1
And Zachary's gcc was a redhat 9.0 native compiler.

> 
> Is there any downside to using -include?
> 
-imacros was simpler according to info gcc.
I've applied Zachary's patch and will push to kernel.org later tonight.

	Sam

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

end of thread, other threads:[~2005-11-10 20:53 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-11-07 21:56 [PATCH 1/1] My tools break here Zachary Amsden
2005-11-07 22:50 ` Sam Ravnborg
2005-11-07 23:08   ` Andrew Morton
2005-11-10 10:12     ` Andrew Morton
2005-11-10 20:54       ` Sam Ravnborg
2005-11-07 23:15   ` Russell King
2005-11-07 23:27   ` [UPDATED,PATCH " Zachary Amsden

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