Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Installing Gentoo
  • Search

gentoo on core 2 duo, what CFLAGS?

Having problems with the Gentoo Handbook? If you're still working your way through it, or just need some info before you start your install, this is the place. All other questions go elsewhere.
Post Reply
Advanced search
23 posts • Page 1 of 1
Author
Message
neurolepsia
n00b
n00b
Posts: 42
Joined: Tue Aug 08, 2006 1:57 pm

gentoo on core 2 duo, what CFLAGS?

  • Quote

Post by neurolepsia » Sun Aug 05, 2007 8:55 pm

Hi. I'm going to install gentoo on a core 2 duo intel T5300 @ 1.73Ghz w/ 1 gb ram (notebook)
So, What do you think about my installation, have I to get install amd64 cd or install x86 cd? and, what cflags do you suggest to me for this install?

thanks

P.S. if you need other infos, ask
Top
hoacker
Guru
Guru
User avatar
Posts: 507
Joined: Sat Aug 04, 2007 12:06 pm
Location: Bürstadt, Germany
Contact:
Contact hoacker
Website

Re: gentoo on core 2 duo, what CFLAGS?

  • Quote

Post by hoacker » Sun Aug 05, 2007 9:04 pm

neurolepsia wrote:what cflags do you suggest to me for this install?
for cflags see: http://gentoo-wiki.com/Safe_Cflags#Inte ... 1xx.2F53xx
Top
neurolepsia
n00b
n00b
Posts: 42
Joined: Tue Aug 08, 2006 1:57 pm

  • Quote

Post by neurolepsia » Sun Aug 05, 2007 9:22 pm

Isn't there anythin' that isn't gentoo-wiki? I don't like it and I'm hoping to get some infos from Core 2 duo users ^^
Top
cyrillic
Watchman
Watchman
User avatar
Posts: 7311
Joined: Wed Feb 19, 2003 3:05 am
Location: Groton, Massachusetts USA

Re: gentoo on core 2 duo, what CFLAGS?

  • Quote

Post by cyrillic » Sun Aug 05, 2007 9:33 pm

neurolepsia wrote:have I to get install amd64 cd or install x86 cd?
This part is up to you. It depends if you want to end up with a 64bit system or a 32bit system.
Top
neurolepsia
n00b
n00b
Posts: 42
Joined: Tue Aug 08, 2006 1:57 pm

  • Quote

Post by neurolepsia » Sun Aug 05, 2007 10:25 pm

I guess I'll have a 64bit-system. And about CFLAGS? Any suggestions derived from experience (not gentoo-wiki please:P)
Top
likewhoa
l33t
l33t
Posts: 778
Joined: Wed Oct 04, 2006 12:28 pm
Location: Brooklyn, New York
Contact:
Contact likewhoa
Website

  • Quote

Post by likewhoa » Sun Aug 05, 2007 11:14 pm

neurolepsia wrote:I guess I'll have a 64bit-system. And about CFLAGS? Any suggestions derived from experience (not gentoo-wiki please:P)
CFLAGS="-O2 -march=nocona -pipe -ftracer -ftree-vectorize"
CHOST="x86_64-pc-linux-gnu"
MAKEOPTS="-j3"

should be good enough until -march=core2 can be used :)
Top
neurolepsia
n00b
n00b
Posts: 42
Joined: Tue Aug 08, 2006 1:57 pm

  • Quote

Post by neurolepsia » Mon Aug 06, 2007 12:20 am

when -march=core2 will be able? and... another question. During installation, Will have I some problems if I'll use genkernel, or kernel support for 64 is actived by default?
Top
Ingmarv
Retired Dev
Retired Dev
User avatar
Posts: 188
Joined: Tue Feb 27, 2007 12:45 am
Location: Belgium

  • Quote

Post by Ingmarv » Mon Aug 06, 2007 12:31 am

neurolepsia wrote:when -march=core2 will be able?
-march=nocona is available from >=sys-devel/gcc-4.3, if i remember correctly
Top
likewhoa
l33t
l33t
Posts: 778
Joined: Wed Oct 04, 2006 12:28 pm
Location: Brooklyn, New York
Contact:
Contact likewhoa
Website

  • Quote

Post by likewhoa » Mon Aug 06, 2007 2:21 am

neurolepsia wrote:when -march=core2 will be able? and... another question. During installation, Will have I some problems if I'll use genkernel, or kernel support for 64 is actived by default?
64bit support will be enabled by default, but you might want to make sure you enabled IA32 Emulation if you're planning on running 32bit apps. when gcc-4.3 becomes stable we will be able to benefit from -march=core2.
Top
jfp
Guru
Guru
Posts: 326
Joined: Sun Jul 08, 2007 9:10 pm
Location: Virginia, USA

  • Quote

Post by jfp » Mon Aug 06, 2007 10:34 am

neurolepsia wrote:Isn't there anythin' that isn't gentoo-wiki? I don't like it and I'm hoping to get some infos from Core 2 duo users ^^
Sometimes the Gentoo-wiki's are great - Sometimes they are not so great. The problem for me has always been in determining which class a specific wiki is in.
I don't see this document mentioned. Perhaps it is worth a read. If memory serves, it seems to me that this doc was just recently (couple of months?) updated.
http://www.gentoo.org/doc/en/gcc-optimization.xml
jfp
Top
Ingmarv
Retired Dev
Retired Dev
User avatar
Posts: 188
Joined: Tue Feb 27, 2007 12:45 am
Location: Belgium

  • Quote

Post by Ingmarv » Mon Aug 06, 2007 1:06 pm

Ingmarv wrote:
neurolepsia wrote:when -march=core2 will be able?
-march=core2 is available from >=sys-devel/gcc-4.3, if i remember correctly
EDIT: ehr, core2, not nocona ...
Top
bubbl07
Apprentice
Apprentice
User avatar
Posts: 237
Joined: Sun Feb 06, 2005 8:54 pm
Location: New York City

  • Quote

Post by bubbl07 » Mon Aug 06, 2007 4:08 pm

From http://psykil.livejournal.com/2006/12/03/:

Code: Select all

So, final answer. If you're using GCC 4.1, use -march=prescott for Intel Core Solo/Duo and -march=nocona (and an amd64 profile) for Core 2 Solo/Duo. For GCC 4.2, a Core Solo/Duo should use -march=prescott -mtune=generic, and Core 2 Solo/Duo should be set to -march=nocona -mtune=generic.
gcc-4.3 will add support for the ssse3 instruction set (with the -mssse3 flag, or autoincluded with -march=core2), so this is what I have used, use, and will use:

Code: Select all

gcc-4.1*: "-march=nocona"
gcc-4.2*: "-march=nocona -mtune=generic"
gcc-4.3*: "-march=core2"
I also usually use "-fomit-frame-pointer" (on x86) and "-O2 -pipe" (on x86 and x86_64). It's safe. It works.
Top
neurolepsia
n00b
n00b
Posts: 42
Joined: Tue Aug 08, 2006 1:57 pm

  • Quote

Post by neurolepsia » Wed Aug 08, 2007 1:41 pm

only other two questions:

1) Can I compile without problems also if my pc is a notebook? Aren't there any problems such as cpu too much hot and related?

2) If I'll use genkernel I'll get a working system with all REQUIRED supports and modules enabled, won't I ?

thanks a lot

bye
Top
Elv13
Guru
Guru
User avatar
Posts: 388
Joined: Sun Nov 13, 2005 8:42 pm
Location: Socialist land of North America

  • Quote

Post by Elv13 » Thu Aug 09, 2007 5:24 am

1)
i had a laptop that compiled svn every night during 3 years and, umm, died, but it was not from overheating, it was just, a bad laptop... But dont worry, cpu will shutdown automatically when it become too hot, it will not break. Laptop CPU are also able to change their clock speed on the fly to cool down.
Top
bubbl07
Apprentice
Apprentice
User avatar
Posts: 237
Joined: Sun Feb 06, 2005 8:54 pm
Location: New York City

  • Quote

Post by bubbl07 » Thu Aug 09, 2007 6:22 pm

neurolepsia wrote:only other two questions:

1) Can I compile without problems also if my pc is a notebook? Aren't there any problems such as cpu too much hot and related?

2) If I'll use genkernel I'll get a working system with all REQUIRED supports and modules enabled, won't I ?

thanks a lot

bye
1) Your computer should shut down automatically if your cpu temperature starts getting too high (although that has yet to happen on my C2D MacBook).

2) Never used genkernel, unfortunately =/.
Top
michel7
Guru
Guru
Posts: 461
Joined: Thu May 04, 2006 8:01 pm
Location: localhost

  • Quote

Post by michel7 » Thu Aug 09, 2007 8:09 pm

bubbl07 wrote:From http://psykil.livejournal.com/2006/12/03/:

Code: Select all

So, final answer. If you're using GCC 4.1, use -march=prescott for Intel Core Solo/Duo and -march=nocona (and an amd64 profile) for Core 2 Solo/Duo. For GCC 4.2, a Core Solo/Duo should use -march=prescott -mtune=generic, and Core 2 Solo/Duo should be set to -march=nocona -mtune=generic.
gcc-4.3 will add support for the ssse3 instruction set (with the -mssse3 flag, or autoincluded with -march=core2), so this is what I have used, use, and will use:

Code: Select all

gcc-4.1*: "-march=nocona"
gcc-4.2*: "-march=nocona -mtune=generic"
gcc-4.3*: "-march=core2"
I also usually use "-fomit-frame-pointer" (on x86) and "-O2 -pipe" (on x86 and x86_64). It's safe. It works.

Nocona is for 64 bit only! For x86 you still have to use prescott with gcc4.2
Software is like sex. It's better when it's free
Top
bubbl07
Apprentice
Apprentice
User avatar
Posts: 237
Joined: Sun Feb 06, 2005 8:54 pm
Location: New York City

  • Quote

Post by bubbl07 » Fri Aug 10, 2007 1:41 pm

michel7 wrote:Nocona is for 64 bit only! For x86 you still have to use prescott with gcc4.2
I mean, I guess so, but the only difference between nocona and prescott is EM64T, and (i686-pc-linux-gnu-)gcc is smart enough to figure out not to compile 64-bit code when compiling 32-bit software even with -march=nocona.

I'm using "-march=nocona" on an EM64T capable P4 on my workstation at work in a gentoo x86 environment and there haven't been any problems in the 11 months I've been using it.

But technically, yes you should use -march=prescott in an x86 environment should you choose to go that route because someone at Intel said so.

As of gcc-4.2, though, running

Code: Select all

ash@ryu ~ $ touch test.c && gcc -v -c test.c -o test -O2 -march=native
to determine what you should be using yields "-march=nocona -mtune=generic" for a Core 2 Duo on x86.
Top
mxc
Guru
Guru
User avatar
Posts: 442
Joined: Wed Mar 05, 2003 4:45 am
Location: South Africa
Contact:
Contact mxc
Website

  • Quote

Post by mxc » Fri Aug 10, 2007 6:55 pm

I have been following this thread but can't get my machine to compile 64 bit. I have a machine that was installed with 32 bit. I have donwloaded the amd64 min iso and booted off of that. I then chroot into my current installation and I am attempting to upgrade by doing a emerge -e world.

I have the following in my make.conf
CHOST="x86_64-pc-linux-gnu"
CFLAGS="-march=nocona -O2 -pipe"
CXXFLAGS="${CFLAGS}"
The output from less /proc/cpuinfo says
vendor_id : GenuineIntel
cpu family : 6
model : 15
model name : Intel(R) Core(TM)2 CPU 6300 @ 1.86GHz
stepping : 6
I am using gcc-4.1.2 When I try and compile I get errors like:

"c compiler cannot create executables'
Whats up? How do I upgrade my system?

thanks
http://www.CyberDesigns.co.za
http://www.Jumpingbean.co.za
Top
Paapaa
l33t
l33t
User avatar
Posts: 955
Joined: Sun Aug 14, 2005 8:45 am
Location: Finland

  • Quote

Post by Paapaa » Fri Aug 10, 2007 8:43 pm

I think a complete reinstall is the only sane method to upgrade from 32bit to 64bit.
Paludis, the way packages are meant to be managed.
Top
likewhoa
l33t
l33t
Posts: 778
Joined: Wed Oct 04, 2006 12:28 pm
Location: Brooklyn, New York
Contact:
Contact likewhoa
Website

  • Quote

Post by likewhoa » Fri Aug 10, 2007 9:40 pm

mxc wrote:I have been following this thread but can't get my machine to compile 64 bit. I have a machine that was installed with 32 bit. I have donwloaded the amd64 min iso and booted off of that. I then chroot into my current installation and I am attempting to upgrade by doing a emerge -e world.

"c compiler cannot create executables'
Whats up? How do I upgrade my system?

thanks
do what Paapaa suggested and that's the only way to go 64bits, you can't compile 64bit code in a 32bit environment, but you can compile 32bit code in a 64bit environment. backup your configuration files and boot from the amd64-livecd and start from scratch.
Top
meitnerium
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 77
Joined: Wed Feb 12, 2003 1:42 am

  • Quote

Post by meitnerium » Wed Nov 21, 2007 6:36 pm

Hello :)

I'm very confusing with this post, and information I can found on internet about this computer ...

I have a HP pavilion : dv9330ca : http://h10010.www1.hp.com/wwpc/ca/en/ho ... 55953.html

It's a 64 bit computer, and come with Windows Vista 64 bit. I installed gentoo, using this setting in /etc/make.conf :

Code: Select all

CHOST="i686-pc-linux-gnu"
CFLAGS="-march=prescott -O2 -pipe -fomit-frame-pointer"
CXXFLAGS="${CFLAGS}"
ALSA_CARDS="snd-hda-intel"
LIRC_OPTS="--with-driver=mceusb2"
LIRC_DEVICES="mceusb2"
VIDEO_CARDS="nvidia"
So, at the moment, I use the computer in 32 bit ... But the Processor is a pentium one, not the dual core AMD 64. The setting show in http://gentoo-wiki.com/Safe_Cflags is for AMD in 64 bit version, for exemple, for this computer : http://h10010.www1.hp.com/wwpc/ca/en/ho ... 89141.html

My cat /proc/cpuinfo output :

Code: Select all

processor       : 0
vendor_id       : GenuineIntel
cpu family      : 6
model           : 15
model name      : Intel(R) Core(TM)2 CPU         T5500  @ 1.66GHz
stepping        : 6
cpu MHz         : 1667.000
cache size      : 2048 KB
physical id     : 0
siblings        : 2
core id         : 0
cpu cores       : 2
fdiv_bug        : no
hlt_bug         : no
f00f_bug        : no
coma_bug        : no
fpu             : yes
fpu_exception   : yes
cpuid level     : 10
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe nx lm constant_tsc pni monitor ds_cpl est tm2 ssse3 cx16 xtpr lahf_lm
bogomips        : 3330.00
clflush size    : 64
Someone can show me the correct configuration for 64 bit compilation?
Voici la solution : http://www.perdu.com/
Top
ccastell23
n00b
n00b
Posts: 2
Joined: Wed Nov 21, 2007 11:00 pm
Location: Santiago
Contact:
Contact ccastell23
Website

  • Quote

Post by ccastell23 » Wed Nov 21, 2007 11:02 pm

64bit support will be enabled by default, but you might want to make sure you enabled IA32 Emulation if you're planning on running 32bit apps. when gcc-4.3 becomes stable we will be able to benefit from -march=core2
Please visit my Blog: http://theentiremoneyforyou.blogspot.com/
Top
neiljw
Apprentice
Apprentice
User avatar
Posts: 166
Joined: Mon Nov 12, 2007 9:57 am
Location: Telford, UK

  • Quote

Post by neiljw » Wed Nov 21, 2007 11:21 pm

meitnerium wrote:Someone can show me the correct configuration for 64 bit compilation?
To achieve a 64 bit environment, you absolutely HAVE to boot from a 64 bit livecd/install cd AND install a 64 bit stage. (OK, it is possible to convert from 32 bits to 64, I've done it, but it's fraught with problems and you really need to know your Gentoo stuff). Once you have that 64 bit stage file installed, everything should be plain sailing for a full 64 bit install.

I have a laptop with exactly the same processor as you and it's happily running 64 bit Gentoo at this very moment. ;)
Be lucky,

Neil
Top
Post Reply

23 posts • Page 1 of 1

Return to “Installing Gentoo”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic