www.delorie.com/archives/browse.cgi   search  
Mail Archives: pgcc/2000/07/22/21:29:39

Message-ID: <397A4A66.596F1219@mn.mediaone.net>
Date: Sat, 22 Jul 2000 20:29:10 -0500
From: Brian Foddy <bfoddy AT mn DOT mediaone DOT net>
X-Mailer: Mozilla 4.7 [en] (WinNT; U)
X-Accept-Language: en
MIME-Version: 1.0
Newsgroups: comp.os.linux.misc,alt.os.linux.mandrake
To: pcg AT goof DOT com
CC: pgcc AT delorie DOT com
Subject: Re: Problems compiling kernel with pgcc 2.95.2
Reply-To: pgcc AT delorie DOT com

Marc,

Problem solved...  Your hints did the trick.  It
turns out to be a combination of two problems.

First, since I did the configure on the PentiumII machine,
it configured itself for a default of PPro instructions.
Secondly, the kernel make file has a bug in that while
it uses the standard CFLAGS arguments for all the kernel
modules itself, it does not use these same arguments when it
builds the kernel piggyback program, hence it only passed
-O2 to the compiler, leaving it default to PPro instructions
and hence on the misc.c module a program un-runable by
Pentium computers.

The problem could have also been prevented with a little
better configure documentation and prompting as its not
really clear that it will choose a PPro instruction set
by default bases on the installed computer.
In fact the docs discourage overriding the
default target and don't document what valid options are.
In my case, I actually did the configure on the Pentium
to ensure it picked Pentium as default

Anyway, I'm not looking to assess blame, but rather
posting this message to say thanks and hopefully provide
a clue to other people who might stumble into this in the
future; hence I'm .cc the news groups and pgcc group
to get it into the archives.

Thanks again.
Brian

On Sat, Jul 22, 2000 at 02:39:35PM -0500, Brian Foddy
<bfoddy AT mn DOT mediaone DOT net> wrote:
> the gcc source and applied the patch by the instructions given on the
> web site; which a default ./configure may have picked PPro??

Try to run etc/config.sub.. if it outputs something with i686 then gcc
and
pgcc will use ppro-instructions for the runtime libraries (and
everything
else) by default.

> second time I downloaded the binary from the ftp site.  Both installs
> gave the same result.

Never trust something you haven't compiled yourself ;)

> So from reading your posted reply to Krzysztof, is it possible to use
> the same pgcc install to generate optimized code for both my Pentium
and P2?

Yes, just configure it as "i586-something" instead of as
"i686-something".
gcc -v displays the current configuration:

cerebro:~# gcc -v
Reading specs from /usr/lib/gcc-lib/i586-pc-linux-gnu/pgcc-2.95.2/specs
gcc version pgcc-2.95.2 19991024 (release)

> Attached is a .tar.gz that contains the misc.c, and both outputs
> of misc.s you requested.  The only compile option was -O2, plus
> some -D defines (the whole line is in my original post).

Indeed, the pgcc version makes a lot of use of the conditional move
instructions:
+       cmovae %eax,%ecx

However, since you said you call it with -march=pentium this should not
really happen. Strange. Are you sure the switches reach the compiler?

Anyway, configuring pgcc with pentium as default target will solve that
problem.

--
      -----==-                                             |
      ----==-- _                                           |
      ---==---(_)__  __ ____  __       Marc Lehmann      +--
      --==---/ / _ \/ // /\ \/ /       pcg AT opengroup DOT org |e|
      -=====/_/_//_/\_,_/ /_/\_\       XX11-RIPE         --+
    The choice of a GNU generation                       |
                                                         |


- Raw text -


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