View previous topic :: View next topic |
Author |
Message |
jerann n00b
Joined: 26 Jan 2005 Posts: 67
|
Posted: Mon Jul 16, 2007 12:39 am Post subject: Can I run binaries compiled with a different -march flag? |
|
|
I probably know the answer to this already, but I thought I'd ask on the off chance that I'm wrong. I've got a laptop has a tendency to overheat when compiling stuff, so I've been using the instructions at http://gentoo-wiki.com/HOWTO_Emerge_on_very_slow_systems to emerge stuff on my laptop using my desktop. The basic idea is to export the root directory on the laptop with NFS and chroot to it on the desktop. It works great - I recompiled the whole system that way and have not encountered any problems at all. Well, I've also got a home server that I'd like to be able to use for the same purpose, but I hit a snag - the make.conf on the laptop specifies CFLAGS="-O2 march=prescott -pipe -fomitframepointer". It uses an Intel Pentium 4 2.80 GHz Mobile processor, and my desktop uses an AMD Athlon X2 3800+ (overclocked to 2.4 GHz). Apparently, the Athlon X2 runs binaries compiled with -march=prescott just fine, but my server has an Athlon XP 3200+ 2.2 GHz, which will not run binaries like that - it keeps saying "Illegal instruction" when I chroot to the laptop and try to execute pretty much anything (apparently bash runs, but env-update will not). So, my question is - can I somehow run the binaries from my laptop on my server (without recompiling with less strict cflags on the laptop)? I doubt it matters, but the server is running Debian - not Gentoo. It'd be nice to do this on my server, but obviously I could still just use the desktop if I didn't have another choice. |
|
Back to top |
|
|
vaxbrat l33t
Joined: 05 Oct 2005 Posts: 731 Location: DC Burbs
|
Posted: Mon Jul 16, 2007 2:48 am Post subject: Athlon-XP too old |
|
|
That XP is too old to handle some of the Prescott instructions. It could probably handle just plain ole Pentium 4 if you throttle back the march. I'm trying to remember off the top of my head what might have changed (SSE2?) |
|
Back to top |
|
|
Genone Retired Dev
Joined: 14 Mar 2003 Posts: 9611 Location: beyond the rim
|
Posted: Mon Jul 16, 2007 11:15 am Post subject: Re: Athlon-XP too old |
|
|
vaxbrat wrote: | I'm trying to remember off the top of my head what might have changed (SSE2?) |
PNI aka SSE3 |
|
Back to top |
|
|
Cyker Veteran
Joined: 15 Jun 2006 Posts: 1746
|
Posted: Mon Jul 16, 2007 2:31 pm Post subject: |
|
|
Yeah... you'll either have to use -mtune instead of -march, or just use the lowest common instruction set they both can do...
Alternatively, you could use -mno-sse2 and/or -mno-sse3 if that's all that is wrong. |
|
Back to top |
|
|
MotivatedTea Apprentice
Joined: 06 Nov 2006 Posts: 269 Location: Toronto, Canada
|
Posted: Tue Jul 17, 2007 3:11 pm Post subject: |
|
|
As a totally different alternative to your overheating problem: I've got a laptop that also tends to overheat, so I just use cpufrequtils to reduce the maximum CPU speed while I'm running emerges. Takes a little longer, but I normally let large upgrades go overnight anyways. (It's a Pentium M 2.0GHz, but it gets very hot running at 2.0GHz for an extended period of time, so I generally throttle it to 1.6GHz.) |
|
Back to top |
|
|
jerann n00b
Joined: 26 Jan 2005 Posts: 67
|
Posted: Tue Jul 17, 2007 4:00 pm Post subject: Cool - that's what I thought |
|
|
OK - that was pretty much the response I'd anticipated.
MotivatedTea wrote: | As a totally different alternative to your overheating problem: I've got a laptop that also tends to overheat, so I just use cpufrequtils to reduce the maximum CPU speed while I'm running emerges. |
Yeah, actually I'm already doing that for normal usage - the CPU is 2.8 GHz, and I keep it scaled to 1.8 all the time. 1.8 is as low as it goes, and it will still overheat at that frequency (but only on an extremely long emerge such as gcc and IIRC Firefox). I suppose I should probably clean the fans and heatsinks, but the prospect of taking the laptop apart again frightens me (the last time I almost couldn't get it back together again). I'll probably just stick with emerging from my desktop - thanks! |
|
Back to top |
|
|
|