public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* hail marry (booting PowerMac 8600)
@ 2011-01-22  2:10 kevin diggs
  2011-01-22  2:36 ` Ian Lance Taylor
  2011-01-25  4:16 ` kevin diggs
  0 siblings, 2 replies; 15+ messages in thread
From: kevin diggs @ 2011-01-22  2:10 UTC (permalink / raw)
  To: gcc-help

Hi,

I have a Linux kernel 2.6.28 compiled with 3.4.6 that will boot. Same
source compiled with 4.3.5 will not boot. The 4.3.5 file has a section
'.text.unlikely' that 3.4.6 does not have. Anyone know what this might
be?

Thanks!

kevin

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

* Re: hail marry (booting PowerMac 8600)
  2011-01-22  2:10 hail marry (booting PowerMac 8600) kevin diggs
@ 2011-01-22  2:36 ` Ian Lance Taylor
  2011-01-25  4:16 ` kevin diggs
  1 sibling, 0 replies; 15+ messages in thread
From: Ian Lance Taylor @ 2011-01-22  2:36 UTC (permalink / raw)
  To: kevin diggs; +Cc: gcc-help

kevin diggs <diggskevin38@gmail.com> writes:

> I have a Linux kernel 2.6.28 compiled with 3.4.6 that will boot. Same
> source compiled with 4.3.5 will not boot. The 4.3.5 file has a section
> '.text.unlikely' that 3.4.6 does not have. Anyone know what this might
> be?

The .text.unlikely section is used for code which is considered to be
unlikely to ever executed.  The compiler should only generate it if you
use the -freorder-blocks-and-partition option.  Of course it's possible
that the kernel itself uses it, though I suppose that is not the case if
you don't see it when compiling with 3.4.6.

Ian

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

* Re: hail marry (booting PowerMac 8600)
  2011-01-22  2:10 hail marry (booting PowerMac 8600) kevin diggs
  2011-01-22  2:36 ` Ian Lance Taylor
@ 2011-01-25  4:16 ` kevin diggs
  2011-02-02 19:41   ` kevin diggs
  1 sibling, 1 reply; 15+ messages in thread
From: kevin diggs @ 2011-01-25  4:16 UTC (permalink / raw)
  To: gcc-help

Hi,

If I enable SMP then I can get a 4.3.5 compiled kernel to boot. I also
tried 4.2.4 with no success (no SMP). 4.1.2 WILL boot (again no SMP).

Is there anyone here that knows more than I do (which means they know
something - I know nothing) about the intricacies of Linux kernel
building, especially on PowerPC.

Thanks!

kevin

On Fri, Jan 21, 2011 at 8:10 PM, kevin diggs <diggskevin38@gmail.com> wrote:
> Hi,
>
> I have a Linux kernel 2.6.28 compiled with 3.4.6 that will boot. Same
> source compiled with 4.3.5 will not boot. The 4.3.5 file has a section
> '.text.unlikely' that 3.4.6 does not have. Anyone know what this might
> be?
>
> Thanks!
>
> kevin
>

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

* Re: hail marry (booting PowerMac 8600)
  2011-01-25  4:16 ` kevin diggs
@ 2011-02-02 19:41   ` kevin diggs
  2011-02-02 20:04     ` Jeff Kenton
  2011-02-02 22:07     ` Ian Lance Taylor
  0 siblings, 2 replies; 15+ messages in thread
From: kevin diggs @ 2011-02-02 19:41 UTC (permalink / raw)
  To: gcc-help

Hi,

I have narrowed this down to one file, drivers/scsi/mesh.c which is
the host adapter driver for the internal SCSI controller on a
PowerMac8600. If I compile this file with 4.1.2 and everything else
with 4.3.5 then the beast will boot.

Anyone have any thoughts on what changed (something optimizery I would
guess?) between 4.1.2 and 4.3.5?

Thanks!

kevin

P.S.:  MAN I'M FREAKIN' FREEZIN!

On Mon, Jan 24, 2011 at 10:15 PM, kevin diggs <diggskevin38@gmail.com> wrote:
> Hi,
>
> If I enable SMP then I can get a 4.3.5 compiled kernel to boot. I also
> tried 4.2.4 with no success (no SMP). 4.1.2 WILL boot (again no SMP).
>
> Is there anyone here that knows more than I do (which means they know
> something - I know nothing) about the intricacies of Linux kernel
> building, especially on PowerPC.
>
> Thanks!
>
> kevin
>

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

* Re: hail marry (booting PowerMac 8600)
  2011-02-02 19:41   ` kevin diggs
@ 2011-02-02 20:04     ` Jeff Kenton
  2011-02-02 21:06       ` kevin diggs
  2011-02-02 22:07     ` Ian Lance Taylor
  1 sibling, 1 reply; 15+ messages in thread
From: Jeff Kenton @ 2011-02-02 20:04 UTC (permalink / raw)
  To: kevin diggs; +Cc: gcc-help

On 02/02/2011 02:41 PM, kevin diggs wrote:
> Hi,
>
> I have narrowed this down to one file, drivers/scsi/mesh.c which is
> the host adapter driver for the internal SCSI controller on a
> PowerMac8600. If I compile this file with 4.1.2 and everything else
> with 4.3.5 then the beast will boot.
>
> Anyone have any thoughts on what changed (something optimizery I would
> guess?) between 4.1.2 and 4.3.5?

strict-aliasing? Try building with -fnostrict-aliasing and see if it helps.


> Thanks!
>
> kevin
>
> P.S.:  MAN I'M FREAKIN' FREEZIN!
>
> On Mon, Jan 24, 2011 at 10:15 PM, kevin diggs<diggskevin38@gmail.com>  wrote:
>> Hi,
>>
>> If I enable SMP then I can get a 4.3.5 compiled kernel to boot. I also
>> tried 4.2.4 with no success (no SMP). 4.1.2 WILL boot (again no SMP).
>>
>> Is there anyone here that knows more than I do (which means they know
>> something - I know nothing) about the intricacies of Linux kernel
>> building, especially on PowerPC.
>>
>> Thanks!
>>
>> kevin
>>

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

* Re: hail marry (booting PowerMac 8600)
  2011-02-02 20:04     ` Jeff Kenton
@ 2011-02-02 21:06       ` kevin diggs
  0 siblings, 0 replies; 15+ messages in thread
From: kevin diggs @ 2011-02-02 21:06 UTC (permalink / raw)
  To: Jeff Kenton; +Cc: gcc-help

Hi,

Is that different from -fno-strict-aliasing, which is already being
passed according to the .mesh.o.cmd file from the build system?

kevin

On Wed, Feb 2, 2011 at 2:04 PM, Jeff Kenton <jkenton@tilera.com> wrote:
>
> strict-aliasing? Try building with -fnostrict-aliasing and see if it helps.
>

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

* Re: hail marry (booting PowerMac 8600)
  2011-02-02 19:41   ` kevin diggs
  2011-02-02 20:04     ` Jeff Kenton
@ 2011-02-02 22:07     ` Ian Lance Taylor
  2011-02-02 22:23       ` kevin diggs
  1 sibling, 1 reply; 15+ messages in thread
From: Ian Lance Taylor @ 2011-02-02 22:07 UTC (permalink / raw)
  To: kevin diggs; +Cc: gcc-help

kevin diggs <diggskevin38@gmail.com> writes:

> I have narrowed this down to one file, drivers/scsi/mesh.c which is
> the host adapter driver for the internal SCSI controller on a
> PowerMac8600. If I compile this file with 4.1.2 and everything else
> with 4.3.5 then the beast will boot.
>
> Anyone have any thoughts on what changed (something optimizery I would
> guess?) between 4.1.2 and 4.3.5?

Many many things changed.  I would recommend looking at the code
generated by the two compilers to see if you can spot the key
difference.

As a short in the dark, you said you use -fno-strict-aliasing; do you
also use -fno-strict-overflow?

Ian

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

* Re: hail marry (booting PowerMac 8600)
  2011-02-02 22:07     ` Ian Lance Taylor
@ 2011-02-02 22:23       ` kevin diggs
  2011-02-02 22:36         ` Ian Lance Taylor
  0 siblings, 1 reply; 15+ messages in thread
From: kevin diggs @ 2011-02-02 22:23 UTC (permalink / raw)
  To: Ian Lance Taylor; +Cc: gcc-help

Hi,

The differences are pretty extensive. But I will try to weed through
it and see if something jumps out.

According to the .mesh.o.cmd file -fno-strict-overflow is also there.

If it helps, I don't think 4.2.4 works either. I have not repeated the
exact test (a 4.2.4 compiled mesh with 4.3.5 everything else) but I
have tried to build the entire kernel with 4.2.4 and it behaved the
same as 4.3.5. Any chance the list of changes is smaller (between
4.1.2 and 4.2.4)?

Thanks!

kevin

On Wed, Feb 2, 2011 at 4:07 PM, Ian Lance Taylor <iant@google.com> wrote:
>
> Many many things changed.  I would recommend looking at the code
> generated by the two compilers to see if you can spot the key
> difference.
>
> As a short in the dark, you said you use -fno-strict-aliasing; do you
> also use -fno-strict-overflow?
>
> Ian
>
cmd_drivers/scsi/mesh.o := gcc -m32 -Wp,-MD,drivers/scsi/.mesh.o.d  \
-nostdinc -isystem
/opt/gcc-4.3.5-gnu/lib/gcc/powerpc-unknown-linux-gnu/4.3.5/include \
-I/mnt/mnt3/linux-2.6.36/arch/powerpc/include -Iinclude  \
-include include/generated/autoconf.h -D__KERNEL__ \
-Iarch/powerpc -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \
-fno-strict-aliasing -fno-common -Werror-implicit-function-declaration \
-Wno-format-security -fno-delete-null-pointer-checks -O2 -msoft-float \
-pipe -Iarch/powerpc -ffixed-r2 -mmultiple -mno-altivec -mno-spe -mspe=no \
-funit-at-a-time -mno-string -mcpu=powerpc -Wa,-maltivec -fno-stack-protector \
-fomit-frame-pointer -Wdeclaration-after-statement -Wno-pointer-sign \
-fno-strict-overflow    -D"KBUILD_STR(s)=\#s" \
-D"KBUILD_BASENAME=KBUILD_STR(mesh)"  \
-D"KBUILD_MODNAME=KBUILD_STR(mesh)"  -c \
-o drivers/scsi/mesh.o drivers/scsi/mesh.c

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

* Re: hail marry (booting PowerMac 8600)
  2011-02-02 22:23       ` kevin diggs
@ 2011-02-02 22:36         ` Ian Lance Taylor
  2011-02-03  0:03           ` kevin diggs
  0 siblings, 1 reply; 15+ messages in thread
From: Ian Lance Taylor @ 2011-02-02 22:36 UTC (permalink / raw)
  To: kevin diggs; +Cc: gcc-help

kevin diggs <diggskevin38@gmail.com> writes:

> The differences are pretty extensive. But I will try to weed through
> it and see if something jumps out.
>
> According to the .mesh.o.cmd file -fno-strict-overflow is also there.
>
> If it helps, I don't think 4.2.4 works either. I have not repeated the
> exact test (a 4.2.4 compiled mesh with 4.3.5 everything else) but I
> have tried to build the entire kernel with 4.2.4 and it behaved the
> same as 4.3.5. Any chance the list of changes is smaller (between
> 4.1.2 and 4.2.4)?

Unfortunately not in any useful way.  There are large numbers of changes
in each gcc release, far too many to be able to usefully point at a
specific change.

Ian

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

* Re: hail marry (booting PowerMac 8600)
  2011-02-02 22:36         ` Ian Lance Taylor
@ 2011-02-03  0:03           ` kevin diggs
  2011-02-03  0:13             ` Ian Lance Taylor
  0 siblings, 1 reply; 15+ messages in thread
From: kevin diggs @ 2011-02-03  0:03 UTC (permalink / raw)
  To: Ian Lance Taylor; +Cc: gcc-help

Hi,

Thanks for taking the time for the replies!

Does the fact that -O1 does not work either suggest any particular
clue of what to look for? -O0 does work (but that is probably
expected?). This is for 4.3.5.

Thanks!

kevin

On Wed, Feb 2, 2011 at 4:36 PM, Ian Lance Taylor <iant@google.com> wrote:
>
> Unfortunately not in any useful way.  There are large numbers of changes
> in each gcc release, far too many to be able to usefully point at a
> specific change.
>
> Ian
>

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

* Re: hail marry (booting PowerMac 8600)
  2011-02-03  0:03           ` kevin diggs
@ 2011-02-03  0:13             ` Ian Lance Taylor
  2011-02-03  0:59               ` kevin diggs
  0 siblings, 1 reply; 15+ messages in thread
From: Ian Lance Taylor @ 2011-02-03  0:13 UTC (permalink / raw)
  To: kevin diggs; +Cc: gcc-help

kevin diggs <diggskevin38@gmail.com> writes:

> Does the fact that -O1 does not work either suggest any particular
> clue of what to look for? -O0 does work (but that is probably
> expected?). This is for 4.3.5.

That doesn't suggest anything to me and actually it's rather surprising.
-O2 is much more aggressive than -O1 when it comes to breaking code
which superficially looks like it should work.  When code breaks with
-O1 it usually means that the code is obviously broken.  Or, of course,
there could be a compiler bug.

Sorry I can't of much help here.  What you are asking seems to be a
reasonable question but unfortunately the gcc release process doesn't
work in a way that makes it possible to answer it.

Ian

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

* Re: hail marry (booting PowerMac 8600)
  2011-02-03  0:13             ` Ian Lance Taylor
@ 2011-02-03  0:59               ` kevin diggs
  2011-02-03  1:58                 ` Ian Lance Taylor
  0 siblings, 1 reply; 15+ messages in thread
From: kevin diggs @ 2011-02-03  0:59 UTC (permalink / raw)
  To: Ian Lance Taylor; +Cc: gcc-help

Hi,

Uh ... What does your gut tell you about whether this could be a
compiler bug? I could look for that till our sun burns out and
probably not find it (I don't know what this computers life expectancy
is - but it probably won't last that long). I'm a little more
confident about finding something wrong in mesh.c?

For the record I've bumped into two files (mesh.c from the Linux
kernel and nsUnknownDecoder.cpp from Firefox 2.0.0.15pre) that won't
run with 4.3.5. I think nsUnknownDecoder.cpp is ok with -O1. Both
Linux and Firefox are pretty big programs.

kevin

On Wed, Feb 2, 2011 at 6:13 PM, Ian Lance Taylor <iant@google.com> wrote:
>
> That doesn't suggest anything to me and actually it's rather surprising.
> -O2 is much more aggressive than -O1 when it comes to breaking code
> which superficially looks like it should work.  When code breaks with
> -O1 it usually means that the code is obviously broken.  Or, of course,
> there could be a compiler bug.
>
> Sorry I can't of much help here.  What you are asking seems to be a
> reasonable question but unfortunately the gcc release process doesn't
> work in a way that makes it possible to answer it.
>
> Ian
>

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

* Re: hail marry (booting PowerMac 8600)
  2011-02-03  0:59               ` kevin diggs
@ 2011-02-03  1:58                 ` Ian Lance Taylor
  2011-02-03  8:39                   ` VAUGHAN Jay
  0 siblings, 1 reply; 15+ messages in thread
From: Ian Lance Taylor @ 2011-02-03  1:58 UTC (permalink / raw)
  To: kevin diggs; +Cc: gcc-help

kevin diggs <diggskevin38@gmail.com> writes:

> Uh ... What does your gut tell you about whether this could be a
> compiler bug?

My gut tells me that it is very unlikely.  However, compiler bugs have
been known to happen.

Ian

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

* Re: hail marry (booting PowerMac 8600)
  2011-02-03  1:58                 ` Ian Lance Taylor
@ 2011-02-03  8:39                   ` VAUGHAN Jay
  2011-02-03 21:10                     ` kevin diggs
  0 siblings, 1 reply; 15+ messages in thread
From: VAUGHAN Jay @ 2011-02-03  8:39 UTC (permalink / raw)
  To: Ian Lance Taylor; +Cc: gcc-help, diggskevin38

On 02/03/2011 02:58 AM, Ian Lance Taylor wrote:
> kevin diggs<diggskevin38@gmail.com>  writes:
>   >  Uh ... What does your gut tell you about whether this could be a
>   >  compiler bug?
> My gut tells me that it is very unlikely. However, compiler bugs have
> been known to happen.

I just want to encourage you guys to continue this discussion until some sort of 
meaningful conclusion can be made about what is going on with the differences;- such 
circumstances are precisely what some of us lurkers are here for.

My gut feeling is that the narrowing-down process is going to lead to such a conclusion, 
eventually, and that this will be a Eureka! moment for a few of us working on PPC-related 
work with gcc .. I can't contribute much else, but I am definitely watching this thread 
with interest and from my end I'll be looking at mesh.c today ..

(Not worth setting up gdb-kernel for this, to find out where exactly the hang is 
occurring?  Doesn't linux-ppc have a sysreq-like inline debugger, somewhere?)

-- 
;                                           Thales Austria GmbH
Jay Vaughan,                                Scheydgasse 41
Software Developer                          1210 Vienna AUSTRIA
============================================--------------------

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

* Re: hail marry (booting PowerMac 8600)
  2011-02-03  8:39                   ` VAUGHAN Jay
@ 2011-02-03 21:10                     ` kevin diggs
  0 siblings, 0 replies; 15+ messages in thread
From: kevin diggs @ 2011-02-03 21:10 UTC (permalink / raw)
  To: VAUGHAN Jay; +Cc: Ian Lance Taylor, gcc-help

Hi,

There is also a thread (BootX) on linux power pc kernel list (see
linuxppc-dev mailing list on penguinppc.org). I find it very curious
that it can't even do simple device queries. I don't even think
inquiry works.

I think I'm gonna try to move the root disk to the 53c94 controller.
Or maybe I'll borrow the pci ide controller I have in another system
and move it to that. Debugging this will be ALOT easier if the mesh is
not required for 'operation' of the system.

kevin

On Thu, Feb 3, 2011 at 2:39 AM, VAUGHAN Jay <jay.vaughan@thalesgroup.com> wrote:
> On 02/03/2011 02:58 AM, Ian Lance Taylor wrote:
>> kevin diggs<diggskevin38@gmail.com>  writes:
>>   >  Uh ... What does your gut tell you about whether this could be a
>>   >  compiler bug?
>> My gut tells me that it is very unlikely. However, compiler bugs have
>> been known to happen.
>
> I just want to encourage you guys to continue this discussion until some sort of
> meaningful conclusion can be made about what is going on with the differences;- such
> circumstances are precisely what some of us lurkers are here for.
>
> My gut feeling is that the narrowing-down process is going to lead to such a conclusion,
> eventually, and that this will be a Eureka! moment for a few of us working on PPC-related
> work with gcc .. I can't contribute much else, but I am definitely watching this thread
> with interest and from my end I'll be looking at mesh.c today ..
>
> (Not worth setting up gdb-kernel for this, to find out where exactly the hang is
> occurring?  Doesn't linux-ppc have a sysreq-like inline debugger, somewhere?)
>
> --
> ;                                           Thales Austria GmbH
> Jay Vaughan,                                Scheydgasse 41
> Software Developer                          1210 Vienna AUSTRIA
> ============================================--------------------
>

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

end of thread, other threads:[~2011-02-03 21:10 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-01-22  2:10 hail marry (booting PowerMac 8600) kevin diggs
2011-01-22  2:36 ` Ian Lance Taylor
2011-01-25  4:16 ` kevin diggs
2011-02-02 19:41   ` kevin diggs
2011-02-02 20:04     ` Jeff Kenton
2011-02-02 21:06       ` kevin diggs
2011-02-02 22:07     ` Ian Lance Taylor
2011-02-02 22:23       ` kevin diggs
2011-02-02 22:36         ` Ian Lance Taylor
2011-02-03  0:03           ` kevin diggs
2011-02-03  0:13             ` Ian Lance Taylor
2011-02-03  0:59               ` kevin diggs
2011-02-03  1:58                 ` Ian Lance Taylor
2011-02-03  8:39                   ` VAUGHAN Jay
2011-02-03 21:10                     ` kevin diggs

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).