# Should i reinstall system with new CFLAGS/CHOST

## jcpowers21

I have an Acer Aspire 4810tz with an Intel Pentium SU2700 CPU, I've heard it called a Pentium 4, Pentium Mobile, etc etc. I just found a webside http://en.gentoo-wiki.com/wiki/MSI_Wind_U200 that shows which CFLAGS and CHOST variables to set. In the website it says:

CHOST="x86_64-pc-linux-gnu"

CFLAGS="-O2 -pipe -march=nocona -mssse3"

CXXFLAGS=${CFLAGS}

USE="...acpi mmx sse sse2..." 

and in my make.conf it has

CHOST="i686-pc-linux-gnu"

CFLAGS="-O2 -march=i686 -pipe"

CXXFLAGS=${CFLAGS}

USE="..acpi mmx sse sse2..."

My kernel processor is set at Core/Core Duo or whatnot because that was the best flag I found but I'm wondering if i can either change my CHOST and CFLAGS to what the article has and then emerge recompile my entire system or if its better to start from scratch. Also I was wondering if changing my flags would really be that benificial to my system (ie it would increase speed much). I'd really rather not start from scratch as OpenOffice and Firefox and others take quite a while to compile plus finally getting XFCE working with Compiz and the such. Anyways any help would be greatly appreciated. Thank you!

----------

## EzInKy

Changing your CHOST is not recommended, so a complete reinstall is the best way to go if you found that you have chosen to base your whole tool chain on the wrong hardware configuration. Modifying your CFLAGS, however, is less problematic as processors of a given family generally support a common instruction set.

----------

## jcpowers21

Thats what I was afraid. I have a 32bit processor but I guess it emulates 64 bit processing so I'm not sure if I will get much out of it or not. I'm going to change my CFLAGS and I'm assuming that will re-emerge most packages installed but I will re-install gentoo completely if it will give me even a 5-10% speed boost. Its not performing poorly by any means but I really do feel it could have a bit more pep to it.

----------

## EzInKy

 *jcpowers21 wrote:*   

> Thats what I was afraid. I have a 32bit processor but I guess it emulates 64 bit processing so I'm not sure if I will get much out of it or not. I'm going to change my CFLAGS and I'm assuming that will re-emerge most packages installed but I will re-install gentoo completely if it will give me even a 5-10% speed boost. Its not performing poorly by any means but I really do feel it could have a bit more pep to it.

 

Now my interest is piqued. What processor do you have that is 32bit native yet supports 64bit emulation?

----------

## jcpowers21

Intel Pentium SU2700...i'm not sure if it supports 64bit emulation I BRIEFLY read that it does something special with 64bit something. The link should be able to say more...if not let me know I will google up some more info.

----------

## monsm

I did change CHOST variable ones.  Don't know if I notice that much difference, but it did work.

I followed this howto: http://www.gentoo.org/doc/en/change-chost.xml

Mons

ALSO: When checking some websites I find SU4100 against this laptop.  On which wikipedia says: "Penryn-3M" (ultra-low voltage, 45 nm) Based on the 64-bit Intel Core microarchitecture, using Penryn-3M core with 1 MB of L2 cache disabled.

----------

## cyrillic

The easiest way to check if your CPU is 32bit or 64bit is to boot with a 64bit LiveCD (or USB stick, or whatever).

The 64bit kernel will stop right away if your CPU only supports 32bit operation.

ps.  You will need to do a fresh install to upgrade from 32bit to 64bit.

----------

## salmonix

Yours is x86_64 Dual Core i believe.

Use the amd64 arch - historically it is named as is, but it supports this platform too.

Regarding march - if it is passed to gcc perhaps you may try using -native flag as described in man gcc.

Could someone confirm it?

anyway, cat /proc/cpuinfo tells you the 64bit , indicating it at the end.

PS:

Anyway, curious with the results, having the same box and tempted to try Gentoo on it but having some plague coming with its support   - eg. Fn+brightness, touchpad on/off  and some powersaving basically.

----------

## cach0rr0

 *cyrillic wrote:*   

> The easiest way to check if your CPU is 32bit or 64bit is to boot with a 64bit LiveCD (or USB stick, or whatever).
> 
> The 64bit kernel will stop right away if your CPU only supports 32bit operation.
> 
> ps.  You will need to do a fresh install to upgrade from 32bit to 64bit.

 

or just check for the "lm" flag in /proc/cpuinfo

 *# grep flags.*\ lm /proc/cpuinfo |uniq wrote:*   

> 
> 
> flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm 3dnowext 3dnow constant_tsc rep_good pni monitor cx16 lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw ibs
> 
> 

 

----------

## jcpowers21

I do have the LM flag. So I guess this means time to follow the CFLAG update guide after a backup and hope for the best.

----------

## sera

Actually, you will have to do a fresh install using an amd64 stage3 or just leave it as it is.

----------

## jcpowers21

Damn, didn't know that I thought I could just follow the article on changing everything. Oh well I suppose, my laptop is running decently without so I guess now I just need to figure out if it will really be worth it or not. Am I able to back up the majority of my files in /etc (mainly config files) so that I can reinstall fresh copy, copy config files back and emerge everything back? I can think of a few of the files (xorg, wpa_supplicant, my home users .everything's pretty much) is there a way to export all the packages i have merged though and are there any major files in /etc or elsewhere i won't want to copy over to a fresh install? Sorry if this is a "noob" question but I've never done this. Thank you all for everything so far!

----------

## cach0rr0

basically...since youll be effectively rebuilding every package on the system, with no real guarantee things will go smoothly, it would actually take *less* time to blow things away and do a complete reinstallation 

backup /home and /etc, but dont do a blind copy of everything in /etc over after you reinstall. 

An 'equery list' will show the packages on your system

beyond that jot down everything in make.conf except for CHOST, CFLAGS, and CXXFLAGS, as youll likely want to reuse it. 

Note that the performance benefit is negligible at best for many operations under 64bit as opposed to 32bit. It may well be just this itch you want to scratch knowing you could churn out a fractional bit more with a 64bit system, BUT if you're already happy with your system, unless you a)are in the mood to spend some time and elbow grease getting the system functioning, or, b)intend to keep your current machine past 2038, may not be a huge return on investment if you switch to amd64

and in terms of changing CHOST and following that whole guide, unless you just really value pain...errr, I mean 'educational experience', that's pointless as well. 

If you had a top tier Phenom or i7 or some such I'd say sure, go amd64 instead of i686 and it'll be worth it - but you don't, and will see nominal benefit.

----------

## jcpowers21

Heheh, thank you for the advice. Sounds like I better wait to reinstall when I have a little booze money, nothing goes better than 'educational experiences' and alcohol.

----------

## cach0rr0

indeed, I can confirm this - I've done my only decent dev work when I get home from the pub at 3AM with double vision

I...I'm not even a coder, and the next day I haven't a clue what I wrote nor how I knew how to do it that way, but sure as shit it works. My drunk code works.

----------

