[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Building packages and compiler flags



Selon Wolfgang Pfeiffer <roto@gmx.net>:

> On Thu, Apr 14, 2005 at 07:15:45PM +0200, Wolfgang Pfeiffer wrote:
> > On Thu, Apr 14, 2005 at 03:47:35PM +0200, Carsten Friede wrote:
> > > Hi.
> > >
> > > Is it possible to activate specific compiler flags, when building
> > > packages from source, eg. for the AltiVec, to improve performance?
> >
> > Not being sure whether you need to know the flags, or how to use them
> > with the Debian package build system, like make-kpkg etc.
> >
> > If you simply want some flags: From my bookmarks:
> >
> > <http://www.freehackers.org/gentoo/gccflags/flag_gcc3.html>
> > <http://www.freehackers.org/gentoo/gccflags/flag_gcc3opt.html>
> >
>
<http://gcc.gnu.org/onlinedocs/gcc/RS_002f6000-and-PowerPC-Options.html#RS_002f6000-and-PowerPC-Options>
> > <http://linuxreviews.org/howtos/compiling/safe-cflags/>
> > <http://linuxreviews.org/howtos/compiling/unsafe-cflags/#toc1>
> >
> > But I'd have a look at the sources you want the flags being fed into,
> > and whether the flags described on the pages above are not already
> > used there ... :)
> >
> > If you want to know how to feed the flags to, e.g, make-kpkg for a
> > "live" compile, then I can't help. Sorry ..
>
> Hah, by accident, when trying to learn something for kernel compiles I
> stumbled over this in /usr/share/doc/kernel-package/README.gz (which
> is part of, IINM, "kernel-package")
>
> ---------------------------------------------------------
> % MAKEFLAGS="CC=gcc-3.2" make-kpkg ...
> --------------------------------------------------------
>
> So it seems you can feed flags directly into Debian build processes, on
> the command line ... but I don't know yet the syntax if there's more than
> one flag to be fed to, e.g., make-kpkg ...
>
> [Minutes later:]
>
> After some very fast glance over some Google results it looks like
> there is a solution for multiflags-on-command-line:
>
> Example:
>
> MAKEFLAGS="CC=amd64-linux-gcc V=1 HOSTCC=gcc-3.4"
>
> [from:
>
<http://debian-amd64.alioth.debian.org/patches/current/kernel-image-2.6.8-amd64_2.6.8-12.0.0.1.gcc4.patch>
> .... and I can't gauge whether the code on this page is correct or not]
>
> I just played a bit with it:
>
> $ export MAKEFLAGS=CC=gcc-3.2 CXXFLAGS="-O3 -pipe -mpowerpc-gfxopt"
> $ env | grep mpower
> CXXFLAGS=-O3 -pipe -mpowerpc-gfxopt
> $ env | grep gcc
> MAKEFLAGS=CC=gcc-3.2
> $
>
> :)))))
>
>
> Please:
>
> Don't take the flags above as valid ones: I was just playing ..  Don't
> do the above, if you need some serious work get done :) ... And wait
> for those here being able to confirm I wasn't writing bs .. :)
>
> At any rate it seems to look good ... perhaps ask Google for more ... :)
>
> Good luck, and please let us know if you know more than I do currently ...
>
> And thanks for asking your question: I was looking for the answer
> since some time ago ... simply forgot about it, only being re-minded
> to it by your email today ... :)
>
> Regards
> Wolfgang
>
> --
> Wolfgang Pfeiffer
> http://profiles.yahoo.com/wolfgangpfeiffer
>
>
> --
> To UNSUBSCRIBE, email to debian-powerpc-REQUEST@lists.debian.org
> with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
>
>


Hi.
I have had debian for a long time before installing a gentoo to test it.
I've build it from scratch (stage1...) with the following flags

CFLAGS="-O3 -mpowerpc -mtune=G4 -mcpu=G4 -mabi=altivec -maltivec
-mpowerpc-gfxopt -mpowerpc-gpopt -mnew-mnemonics -mno-strict-align -pipe"

If you get an error with mtune or mcpu you should try with march (which is now
deprecated)...

Arnaud FONTAINE



Reply to: