www.delorie.com/archives/browse.cgi   search  
Mail Archives: pgcc/1998/08/29/19:23:12

X-pop3-spooler: POP3MAIL 2.1.0 b 4 980420 -bs-
Message-Id: <199808291924.OAA23848@indy1.indy.net>
From: "Steve Snyder" <ssnyder AT indy DOT net>
To: "pcg AT goof DOT com" <pcg AT goof DOT com>,
"pascal AT ramoth DOT xs4all DOT nl" <pascal AT ramoth DOT xs4all DOT nl>,
"PGCC Mailing List" <beastium-list AT desk DOT nl>
Date: Sat, 29 Aug 1998 15:07:29 -0500
Reply-To: "Steve Snyder" <ssnyder AT indy DOT net>
X-Mailer: PMMail 1.96a For OS/2
MIME-Version: 1.0
Subject: What's with --risc-const and 2.1.1x kernel?
Sender: Marc Lehmann <pcg AT goof DOT com>
Status: RO
X-Status: A
Lines: 59

My experience with building the 2.1.x Linux kernel with PGCC v1.03 has been
that the -O3 switch is OK, but that any greater optimization results in
that kernel hanging during boot-up.  I recently tracked down the exact
compiler switch that is causing the problem.

I used the description on http://goof.com/pcg/pgcc-faq.html#SEC04 as a
guide to which -Ox switches enable which optimizations.  Starting with -O3,
at which no problems are seen, I did successive builds of kernel 2.1.117
each with an additional compiler switch, then attempted to boot with that
kernel.  I used only switches described as 'safe'.  Naturally, I first
removed the standard '-m486' switch from the kernel's makefile.

The kernel works fine when built with these -O4 switches:

    -O3 
    --schedule-insns2 
    --swap-for-agi 
    --risc 
    --interleave-stack-non-stack 
    --schedule-stack-reg-insns

Adding the '--risc-const' switch breaks the kernel.  It always boots to the
point where it mounts the swap partition, then it just freezes up.  I
removed that switch from the makefile and continued the successive kernel
builds.  Eventually, the optimizations I had enabled looked like this:

    -O3 
    --schedule-insns2 
    --swap-for-agi 
    --risc 
    --interleave-stack-non-stack 
    --schedule-stack-reg-insns
    --runtime-lift-stores
    --all-mem-givs 
    --do-offload 
    --risc-mem-dest

Using this list of optimizations, the 2.1.117 kernel builds, boots and runs
great.  Adding back in the '--risc-const' switch again caused the kernel to
freeze up at boot time.

(BTW, use of these last 4 switches seemed to make no difference in the
kernel size at all, so it might be that those otimization never actually
generated any code changes.)

About my system:  RedHat v5.1 with PGCC v1.03a installed.  PGCC was
installed via the '586 packages found on the Foyers' Web site
(www.foyer.se/downloads/pgcc_rpms.html).  I also installed the library RPMs
from that same page.  My version of binutils is 2.9.1.0.10.  My machine is
a Pentium with 32MB of RAM.

So...  what is the story on '--risc-const'?  It is listed on the PGCC Web
page as 'safe', but my experience is that it is not safe at all on the
2.1.x Linux kernel.

Thank you.


***** Steve Snyder *****

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019