Dave,

I found this problem.  If you look in linux/arch/i386/Makefile you will
see that it is adding -mpreferred-stack-boundary=2 if the compiler is
gcc (2.96) instead of the default which is 16.  LiS makefiles do no add
this.  Therefore, where a piece of kernel code references the stack (and
was compiled with a stack boundary of 2), but LiS was compiled with 16,
something is going to break.  gcc3 and kgcc do not have this flag and
therefore, they do not break.

Because of this, it is not possible to build a stable LiS module with
gcc (2.96) regardless of your optimization flags.

--brian

On Tue, 21 May 2002, Dave Grothe wrote:

> 
>    Thanks  for the tip.  I have fixed LiS Configure to set up for kgcc or
>    gcc3,  if  present, in preference to plain old gcc.  If it uses gcc it
>    reduces optimization to -O2 for safety.
>    LiS  works  quite  well  with  kgcc  and gcc3 -- no system hangs on my
>    torture test.
>    The next beta will have this in it.
>    -- Dave
>    Brian F. G. Bidulock wrote:
> 
> Dave,
> RH 7.2 and 7.3 also distributes with kgcc (egcs-2.91.66) and
> gcc3 (3.0.4) which do not have this problem.  I have had much
> better success compiling LiS with kgcc and gcc3 than gcc.  2.96
> is a completely broken release: it is amazing if it ever compiles
> anything correctly.
> --brian
> On Mon, 20 May 2002, Dave Grothe wrote:
> 
> I have observed that gcc 2.96 contains a code optimization error that 
> causes mysterious system hangs when running LiS and certain driver 
> combinations that include interactions with the ldl driver.  The hangs 
> are so bad that a 2 CPU SMP system with NMI watchdog timer enabled 
> cannot break into the loop.
> Due to the severity of the hang I was never able to get close enough to 
> the problem to pinpoint it.  Therefore it cannot be usefully reported to 
> the gcc authors.
> The solution is to use -O2 instead of -O3 to build LiS and its included 
> drivers.  The next published version of LiS will be configured to use 
> -O2.  In the meantime if anyone is experiencing these sorts of problems, 
> try editing the LiS file config.mk directly and changing the 
> optimization level.
> I am uncertain whether it is necesary to build your STREAMS drivers with 
> -O2 rather than -O3.
> gcc 2.96 is distributed with both Red Hat 7.2
>  and 7.3.  Both versions 
> have the problem.
> -- Dave
> _______________________________________________
> Linux-streams mailing list
> [EMAIL PROTECTED]
> [2]http://gsyc.escet.urjc.es/mailman/listinfo/linux-streams
> 
> References
> 
>    1. mailto:[EMAIL PROTECTED]
>    2. http://gsyc.escet.urjc.es/mailman/listinfo/linux-streams

-- 
Brian F. G. Bidulock    � The reasonable man adapts himself to the �
[EMAIL PROTECTED]    � world; the unreasonable one persists in  �
http://www.openss7.org/ � trying  to adapt the  world  to himself. �
                        � Therefore  all  progress  depends on the �
                        � unreasonable man. -- George Bernard Shaw �

_______________________________________________
Linux-streams mailing list
[EMAIL PROTECTED]
http://gsyc.escet.urjc.es/mailman/listinfo/linux-streams

Reply via email to