delorie.com/archives/browse.cgi | search |
X-pop3-spooler: | POP3MAIL 2.1.0 b 4 980420 -bs- |
X-Authentication-Warning: | basis.Desk.nl: listserv set sender to owner-beastium-list AT basis DOT desk DOT nl using -f |
Message-ID: | <365E70C3.37F63E93@oranda.demon.co.uk> |
Date: | Fri, 27 Nov 1998 09:28:35 +0000 |
From: | "Gary V. Vaughan" <gvaughan AT oranda DOT demon DOT co DOT uk> |
Organization: | Aethos Communication Systems ltd. |
X-Mailer: | Mozilla 4.5 [en] (WinNT; I) |
X-Accept-Language: | en |
MIME-Version: | 1.0 |
To: | Steve <smkennedy AT uwaterloo DOT ca> |
CC: | beastium-list AT desk DOT nl |
Subject: | Re: Optimization with PGCC |
References: | <365E3B57 DOT 1B5908C1 AT uwaterloo DOT ca> |
Sender: | Marc Lehmann <pcg AT goof DOT com> |
Status: | RO |
Lines: | 44 |
Steve wrote: > > Hi, > I just recently switched from gcc 2.8.1 to pgcc 1.1. I would > like to start compiling my programs passing the -O6 and -mpentiumpro > switches to pgcc (to get the most optimization). I would prefer not > to have to go into each program's makefile and edit it. Is there a > way to do this from the command line? I tried : 'make CFLAGS="-O6 > -mpentiumpro" but that overrides all the other CFLAGS. I was > wondering if there is a way to add to the other CFLAGS. Anyone? The easiest would be make CC='pgcc -O6 -mpentiumpro' but you might end up with lines like this: pgcc -O6 -mpentiumpro -g -O2 -Dblah -c ... If you are compiling a package made with autoconf, this is supposed to work: CC=pgcc CFLAGS='-O6 -mpentiumpro' ./configure --options ... make ....but sometimes the package authors write their configure scripts badly and this doesn't work -- that would be a bug for you to report to them =)O| Otherwise you probably will need to do the substitution in each makefile: for file in `find . -name Makefile -print`; do tmp=$file.$$ sed 's,-O2,-O6 -mpentiumpro,g' $file > $tmp && mv $tmp $file done > > Thanks in advance. You're welcome. Cheers, Gary V. Vaughan
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |