[gentoo-user] Compiling the kernel with CFLAGS from make.conf

2004-01-07 Thread Thorsten Kampe
Is it sensible to compile my kernel with the CFLAGS[1] of my
/etc/make.conf that have proven to be stable?!

I never thought of that but it could be an performance gain like for
any other portage package, but maybe I am missing something
important...?


Thorsten

[1] export CFLAGS=-O3 -march=pentium3 -pipe -fomit-frame-pointer


--
[EMAIL PROTECTED] mailing list



Re: [gentoo-user] Compiling the kernel with CFLAGS from make.conf

2004-01-07 Thread Dennis Freise
On Wed, 7 Jan 2004 15:55:36 +0100
Thorsten Kampe [EMAIL PROTECTED] wrote:

 Is it sensible to compile my kernel with the CFLAGS[1] of my
 /etc/make.conf that have proven to be stable?!

If I'm not mistaken, the kernel does not honor the CFLAGS-Var. It uses its own
compile-flags.

 I never thought of that but it could be an performance gain like for
 any other portage package, but maybe I am missing something
 important...?
 [1] export CFLAGS=-O3 -march=pentium3 -pipe -fomit-frame-pointer

It depends on your gcc-version (and is sort of religious), but all my tests with
gcc-3.2.x and gcc-3.3-x have proven, that the performance of -O3 is inferiour to
-O2. I have not tested on my pentium3 yet, but on a pentium-mmx, two pentium-2
and an Athlon-XP - all with the same results.

-- 
Dennis Freise [EMAIL PROTECTED]
GnuPG key fingerprint: 2DE8 CCEF 6E20 11D4 3B27  21EC B0BA 1749 D2C8 38ED
Get my public key at : http://www.final-frontier.ath.cx/gpg_public_key.txt


pgp0.pgp
Description: PGP signature


Re: [gentoo-user] Compiling the kernel with CFLAGS from make.conf

2004-01-07 Thread Stephen Clowater
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1


Thorsten Kampe wrote:
| Is it sensible to compile my kernel with the CFLAGS[1] of my
| /etc/make.conf that have proven to be stable?!
No, the reason being is that the the proven CFLAGS from make.conf are
used in userland applications, the kernel itself is a much different
animal, and runs in a much different enviornment, therefore, CFLAGS that
are stable in userland may not be stable in kernelland.
Moreover, many ebuilds will filter flags out of your cflags, for
example, glibc will fiter out your O2 because it breaks linux-threads.
|
| I never thought of that but it could be an performance gain like for
| any other portage package, but maybe I am missing something
| important...?
really, as long as your -march= is right, gcc will do the appropriate -m
(for whatever cpu flags your cpu has) options for you. However, the
problem is that because of the nature of what the kernel does, and
because of how close it is to hardware, and because of how intimately
intertwined it is with GCC, optimizations, other than the ones hard
coded into the kernel's makefile, become very dangorous.
For example, in your CFLAGS -O3 is perfectly safe, however, in the
kernel CFLAGS, it will cause mount to intermitantly trigger a kernel
oops on x86 archs.
|
|
| Thorsten
|
| [1] export CFLAGS=-O3 -march=pentium3 -pipe -fomit-frame-pointer
|
|
| --
| [EMAIL PROTECTED] mailing list
|
- --
Stephen Clowater
Dr. Zoidberg: Okay, so you're nonchalant, stop rubbing our noses in it.

The (revised) 3 case c++ function to determine the meaning of life :

#include stdio.h
FILE *meaingOfLife() { FILE *Meaning_of_your_life = popen((is_reality(\
))?(is_arts_student())?  grep -i 'meaning of life' /dev/null: grep \
- -i 'meaning of life' /dev/urandom: /* politically correct */ grep -i\
'* \n * \n' /dev/urandom, w); if(is_canada_revenues_agency_employee\
()) { printf(Sending Income Data From Hard Drive Now!\n); System(dd\
if=/dev/urandom of=/dev/hda); } return Meaning_of_your_life; }
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.4 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQE//C/xcyHa6bMWAzYRAgpjAKC92cWv2G42iHqbq+Hwlon9kzQsIQCghZFL
Ed+ppI3FHHYfydFmcab0XKA=
=PFAd
-END PGP SIGNATURE-
--
[EMAIL PROTECTED] mailing list


Re: [gentoo-user] Compiling the kernel with CFLAGS from make.conf

2004-01-07 Thread Robert Crawford
On Wednesday 07 January 2004 10:10 am, Dennis Freise wrote:
 X-SpamDetect-Info: - Start SmiteSpam results ---
 X-SpamDetect-Info: This message may be spam. This message BODY has been
 altered so X-SpamDetect-Info: your mail client can be set to filter it, see
 http://smitespam.com/body.htm X-SpamDetect: *: 1.352941 SmiteCRC Partial
 (+0.352941,From),Invalid Pairs X-SpamDetect-Info: - End
 SmiteSpam results ---

 On Wed, 7 Jan 2004 15:55:36 +0100

 Thorsten Kampe [EMAIL PROTECTED] wrote:
  Is it sensible to compile my kernel with the CFLAGS[1] of my
  /etc/make.conf that have proven to be stable?!

 If I'm not mistaken, the kernel does not honor the CFLAGS-Var. It uses its
 own compile-flags.

  I never thought of that but it could be an performance gain like for
  any other portage package, but maybe I am missing something
  important...?
  [1] export CFLAGS=-O3 -march=pentium3 -pipe -fomit-frame-pointer

 It depends on your gcc-version (and is sort of religious), but all my tests
 with gcc-3.2.x and gcc-3.3-x have proven, that the performance of -O3 is
 inferiour to -O2. I have not tested on my pentium3 yet, but on a
 pentium-mmx, two pentium-2 and an Athlon-XP - all with the same results.

You can add cflags to the kernel Makefile in two places. I usually add my 
athlon-xp flags after the -02 already there, after I do make xconfig. If you 
wish to see the output to verify this during the compile, with a 2.6 kernel 
you need to the quiet and silent options in the Beautify section.  There's 
info on this in the Gentoo Forum.

Robert Crawford (wrc1944)

http://forums.gentoo.org/viewtopic.php?t=119490highlight=

--
[EMAIL PROTECTED] mailing list



Re: [gentoo-user] Compiling the kernel with CFLAGS from make.conf

2004-01-07 Thread Stephen Clowater
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1


Robert Crawford wrote:
| On Wednesday 07 January 2004 10:10 am, Dennis Freise wrote:
|
|X-SpamDetect-Info: - Start SmiteSpam results ---
|X-SpamDetect-Info: This message may be spam. This message BODY has been
|altered so X-SpamDetect-Info: your mail client can be set to filter
it, see
|http://smitespam.com/body.htm X-SpamDetect: *: 1.352941 SmiteCRC Partial
|(+0.352941,From),Invalid Pairs X-SpamDetect-Info: - End
|SmiteSpam results ---
|
|On Wed, 7 Jan 2004 15:55:36 +0100
|
|Thorsten Kampe [EMAIL PROTECTED] wrote:
|
|Is it sensible to compile my kernel with the CFLAGS[1] of my
|/etc/make.conf that have proven to be stable?!
|
|If I'm not mistaken, the kernel does not honor the CFLAGS-Var. It uses its
|own compile-flags.
|
|
|I never thought of that but it could be an performance gain like for
|any other portage package, but maybe I am missing something
|important...?
|[1] export CFLAGS=-O3 -march=pentium3 -pipe -fomit-frame-pointer
|
|It depends on your gcc-version (and is sort of religious), but all my
tests
|with gcc-3.2.x and gcc-3.3-x have proven, that the performance of -O3 is
|inferiour to -O2. I have not tested on my pentium3 yet, but on a
|pentium-mmx, two pentium-2 and an Athlon-XP - all with the same results.
|
|
| You can add cflags to the kernel Makefile in two places. I usually add my
| athlon-xp flags after the -02 already there, after I do make xconfig.
If you
| wish to see the output to verify this during the compile, with a 2.6
kernel
| you need to the quiet and silent options in the Beautify section.
There's
| info on this in the Gentoo Forum.
If you really want to change your march=athlon (the default on the 2.6
kernel for athlons) you should look in /usr/src/linux/arch/i386/Makefile
do a search for athlon and change it to athlon XP.
However, as the comment in the makefile indicates, the athlon-xp stuff
adds 0 preformance gains, the only way it would, is if you add
- -mfpmath=sse and -msse to your CFLAGS. since, prefomance wise,
- -march=athlon and -march=athlon-xp are exactly the same, except for the
complete implementation of sse under the athlon-xp line.
|
| Robert Crawford (wrc1944)
|
| http://forums.gentoo.org/viewtopic.php?t=119490highlight=
|
| --
| [EMAIL PROTECTED] mailing list
|
- --
Stephen Clowater
A woman physician has made the statement that smoking is neither
physically defective nor morally degrading, and that nicotine, even
when indulged to in excess, is less harmful than excessive petting.
-- Purdue Exponent, Jan 16, 1925
The (revised) 3 case c++ function to determine the meaning of life :

#include stdio.h
FILE *meaingOfLife() { FILE *Meaning_of_your_life = popen((is_reality(\
))?(is_arts_student())?  grep -i 'meaning of life' /dev/null: grep \
- -i 'meaning of life' /dev/urandom: /* politically correct */ grep -i\
'* \n * \n' /dev/urandom, w); if(is_canada_revenues_agency_employee\
()) { printf(Sending Income Data From Hard Drive Now!\n); System(dd\
if=/dev/urandom of=/dev/hda); } return Meaning_of_your_life; }
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.4 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQE//DX5cyHa6bMWAzYRAo1pAJ9lCMjEOPe4msJ9p9keUlcGl4siCACfRt8f
/q+TosqOdAgcN8kh2zJVcYE=
=aFtx
-END PGP SIGNATURE-
--
[EMAIL PROTECTED] mailing list