View previous topic :: View next topic |
Author |
Message |
Birtz Apprentice
Joined: 09 Feb 2005 Posts: 272 Location: Osijek / Croatia
|
Posted: Fri Mar 11, 2005 9:12 pm Post subject: |
|
|
Quote: | Hey Birtz, do you agree with Kugelfang that
<snip> |
Yes I do, at least on the gcc version I am using (3.4.3) ... the assembler output of both of them are the same, judging from few test cases I wrote.
I use "-march=athlon64" for it looks nicer basically
On the other hand, since instruction schedulers and pipelines are not the same for athlon-xp and athlon64, I suppose that "-march=athlon64" line is more future proof once gcc implements proper scheduling for the athlon64 line.
To causual reader, we are talking about 32-bit version
Cheers _________________ It is not enough to have a good mind. The main thing is to use it well.
-- Rene Descartes
Don't have a childhood hero? How about Rob Hubbard http://www.freenetpages.co.uk/hp/tcworh/profile.htm |
|
Back to top |
|
|
timmfin Guru
Joined: 04 Sep 2002 Posts: 336 Location: Maryland, USA
|
Posted: Sat Mar 12, 2005 5:31 am Post subject: |
|
|
So if you set march=athlon64, how do you know if you are compiling apps in 32bit? I'd rather not have a separate chroot partition for firefox, OO, etc so I'll like to keep a 32 bit system. I was trying to install (stage one amd64 snapshot) today with march=athlon-xp but I kept on getting the error "C compiler can't produce executables" until I changed the flag to march=athlon64.
I'm just going to try and get the base install going first and then sort the 32 vs 64 situation out, but any help would be gladly appreciated.
Thanks,
Tim |
|
Back to top |
|
|
Birtz Apprentice
Joined: 09 Feb 2005 Posts: 272 Location: Osijek / Croatia
|
Posted: Sat Mar 12, 2005 12:32 pm Post subject: |
|
|
Tim,
Please take note that we are discussing plain x86 install here (Gentoo x86).
That said, your question regarding "-march" is not valid in this thread, but I'll answer it anyway
<regards to Gentoo-amd64>
You are getting "C compiler can't produce executables" because "-march=athlon-xp" can't create 64-bit code and Gentoo-amd64 toolchain defaults to 64-bit. If you have emerged glibc and gcc with USE="multilib" flags, or you are using 2005.0 profile, your compiler and c library is capable of producing 32-bit code. So you would basically prepend "-m32" to your CFLAGS and get 32-bit binary.
This is how it looks technically. Practically, you already have 32-bit stuff precompiled in 2004.3 profile, and most of them are just mirrored in 2005.0 profile, with future conversion to native compilation of all needed 32-bit packages (look for emul-linux-x86-* stuff).
To cut it short, either you'd use Gentoo-x86, set your flags like we discussed here (you would be 32-bit pure)
*or*
you'd use Gentoo-amd64, use 2004.3 profile and emerge emul-linux-x86-* stuff (you would have 64-bit system and some 32-bit binary compatibility)
*or*
you'd also use Gentoo-amd64, but 2005.0 profile and emerge emul-linux-x86-* stuff (you would have 64-bit system and conglomerate of native compiled 32-bit (glibc) and 32-bit binary compatibility).
</regards to Gentoo-amd64>
Gentoo: "Choice is yours"
Cheers _________________ It is not enough to have a good mind. The main thing is to use it well.
-- Rene Descartes
Don't have a childhood hero? How about Rob Hubbard http://www.freenetpages.co.uk/hp/tcworh/profile.htm |
|
Back to top |
|
|
timmfin Guru
Joined: 04 Sep 2002 Posts: 336 Location: Maryland, USA
|
Posted: Sun Mar 13, 2005 6:15 am Post subject: |
|
|
Thanks Birtz, I appreciate it.
Tim |
|
Back to top |
|
|
nomaam n00b
Joined: 21 Mar 2005 Posts: 15 Location: Long Island, NY
|
Posted: Sun Mar 27, 2005 5:20 pm Post subject: Compile crash with openSSL |
|
|
I have tried to do a i686 stage 2 build and keep crashing in the openSSL 0.9.7 crypto. I'm a newbie, but I believe I have set up all flags and keywords as recommended in the thread. It looks like it's trying to compile 64 bit (linux-x86_64). error is:
cc1: sorry, unimplemented:64 bit code not compiled in
Any thoughts?
John |
|
Back to top |
|
|
nomaam n00b
Joined: 21 Mar 2005 Posts: 15 Location: Long Island, NY
|
Posted: Sun Mar 27, 2005 8:43 pm Post subject: Compile crash with openssl (continued) |
|
|
Sorry, previous post was a little too brief.
I used birtz's recommendation:
In 32-bit only environment (no multilib capable gcc/glibc), which is default for x86 Gentoo this
Code:
CHOST="i686-pc-linux-gnu"
CFLAGS="-pipe -O2 -march=athlon64 -fomit-frame-pointer"
would produce 32-bit code optimized for athlon64/opteron *including* flags -msse -msse2 -m3dnow -mmmx
Take note also that >=GCC-3.4.3 is not default compiler for stable branch of x86, so this flags are unusable with GCC-3.3.5 which is default compiler.
To make use of the flags I gave make sure you have ~x86 in you package.keywords file for gcc;
Code:
# cat /etc/portage/package.keywords
sys-devel/gcc ~x86
I will go back and try the previous suggestions: use -march=athlon-xp + sse2 when I get a chance.
Thanks, John |
|
Back to top |
|
|
Birtz Apprentice
Joined: 09 Feb 2005 Posts: 272 Location: Osijek / Croatia
|
Posted: Mon Mar 28, 2005 1:12 pm Post subject: |
|
|
Did you actually used x86 boot cd, and did a stage1 install from it?
Cheers _________________ It is not enough to have a good mind. The main thing is to use it well.
-- Rene Descartes
Don't have a childhood hero? How about Rob Hubbard http://www.freenetpages.co.uk/hp/tcworh/profile.htm |
|
Back to top |
|
|
juhah n00b
Joined: 03 Oct 2004 Posts: 46
|
Posted: Mon Mar 28, 2005 3:09 pm Post subject: |
|
|
Should be fairly safe:
Code: | CFLAGS="-march=k8 -O3 -pipe -fomit-frame-pointer" |
|
|
Back to top |
|
|
Birtz Apprentice
Joined: 09 Feb 2005 Posts: 272 Location: Osijek / Croatia
|
Posted: Tue Mar 29, 2005 10:12 am Post subject: |
|
|
Yes, but he was talking about an error from the configure stage, where configure tests tried to create 64-bit executables. This is odd, since x86 wouldn't create 64-bit binary unless explicit told to do so (-m64 to the multilib GCC-3.4.3), and moreover since x86 profile doesn't recognize multilib at all, it is impossible to create multilib enabled GCC anyway. My lucky guess is that he started from amd64 boot-cd
Cheers _________________ It is not enough to have a good mind. The main thing is to use it well.
-- Rene Descartes
Don't have a childhood hero? How about Rob Hubbard http://www.freenetpages.co.uk/hp/tcworh/profile.htm |
|
Back to top |
|
|
mr.ed Tux's lil' helper
Joined: 30 Nov 2004 Posts: 75
|
Posted: Tue Mar 29, 2005 4:17 pm Post subject: |
|
|
Quote: | -O3 -march=nocona -mtune=nocona -fomit-frame-pointer -pipe -ffast-math -ftracer -fweb -fforce-addr -frename-registers -funit-at-a-time -fmove-all-movables -fmerge-all-constants |
This r my flags, which i use both for my x86 and amd64 rig... Don't give me any bull bout -fweb and such being implied, cause if u look it up some progs will set -O2 and then -fweb isn't implied (just to make sure it is added)...
It works great on both rigs, both r set ~x86, ~amd64 and i have never had any compile errors due to the fact these flags were 2 aggressive...
As for the fact which flags r spefically for amd64 and x86, look it up on the gcc-site (google for the url). It says there the are for both arches exactly the same!!! No specific flags, except for the -march _________________ (Ex-Pornstar) |
|
Back to top |
|
|
nomaam n00b
Joined: 21 Mar 2005 Posts: 15 Location: Long Island, NY
|
Posted: Tue Mar 29, 2005 5:12 pm Post subject: Compile crash with openssl (continued) |
|
|
Birtz,
yes, you were correct. I did the dumbest thing..made a x86 and AMD 64 Live CD and swapped the label on them. Being a real newbie, I did not realized that the x86 has a different visual style on the console, but now I know better.
That being said, when I did try it on the correct x86 Live CD, I got another error, which I did not record. I tried a stage 2 install, and, your previous post seems to imply I have to start on stage 1 to make it work.
As of Monday, I have a working system, finally (boo ya). I used a stage 3 athlon-XP build, with some flags earlier in this thread. which is kind of a cop out. I plan to get things working well, save the configs, and try again with a stage 1 in a few weeks.
Thanks for your help, John |
|
Back to top |
|
|
mccubbin n00b
Joined: 27 Oct 2003 Posts: 32
|
Posted: Thu Apr 21, 2005 3:14 am Post subject: Am I correct? |
|
|
Okay, after reading this thread, tell me if I am correct.
I want to install a x86 system on an AMD64 laptop. I want this because I need several of the applications that are masked in the AMD64 tree. One of them being Quanta. It worked on my desktop amd64, but has become masked. I use it daily and need it on the road.
If I use these:
install CD for *STAGE 3* install: athlon-xp minimal install disc
CFLAGS=-march=athlon-xp -msse2 -02 -pipe -ftracer"
CHOST="i686-pc-linux-gnu"
Will everything work? The one thing I was wasn't sure of, but the last post hinted at, was in using the athlon-xp install disc. _________________ John McCubbin |
|
Back to top |
|
|
Birtz Apprentice
Joined: 09 Feb 2005 Posts: 272 Location: Osijek / Croatia
|
Posted: Thu Apr 21, 2005 5:01 am Post subject: |
|
|
Yes, using the x86 install disc (though I am not sure if minimal has needed packages for stage3 install, you could be better off with universal x86 disc), CFLAGS and CHOST as you have said should bring you x86-gentoo on your AMD64 laptop.
Cheers _________________ It is not enough to have a good mind. The main thing is to use it well.
-- Rene Descartes
Don't have a childhood hero? How about Rob Hubbard http://www.freenetpages.co.uk/hp/tcworh/profile.htm |
|
Back to top |
|
|
mccubbin n00b
Joined: 27 Oct 2003 Posts: 32
|
Posted: Thu Apr 21, 2005 5:28 pm Post subject: Thanks |
|
|
What I usually do, is use the x86 minimal install disk, then I will download the current 2005.0 athlon-xp stage3 tarball off the internet. I've already done a successful amd64 install on that laptop and it really worked well, wireless, touchpad, mouse and all. But I really need all the current apps more than the speed. I have that at home.
Thanks to all on the thread for the info. _________________ John McCubbin |
|
Back to top |
|
|
localghost Apprentice
Joined: 28 Oct 2004 Posts: 185 Location: Sint-Niklaas, Belgium
|
Posted: Sat Apr 30, 2005 5:04 pm Post subject: |
|
|
I now have a more or less functional AMD64 (64 bit) installation. But I'm not happy about all the applications that are masked, and I really don't care much about getting the last juice out of my system - my choice is stability, and Gentoo is all about choice, right?
Anyway, if I put this in /etc/make.conf
Code: | ACCEPT_KEYWORDS="x86"
CHOST="i686-pc-linux-gnu"
CFLAGS="-march=athlon64 -O2 -pipe -fomit-frame-pointer"
CXXFLAGS="${CFLAGS}"
|
and then do an
what will be the result?
A b0rked system or a happy x86 32-bit installation? _________________ 411 /0µr 84$3 4r3 8310n9 70 µ$. |
|
Back to top |
|
|
mccubbin n00b
Joined: 27 Oct 2003 Posts: 32
|
Posted: Sat Apr 30, 2005 8:49 pm Post subject: I'd start over |
|
|
If I were you, I'd start over. 32 bit binaries obviously do work, and I'm not sure why stuff compiled in 32 bit won't run under a 64 bit environment, but I chose to start all over. I did a stage 3 install and it went fairly fast. I just needed to get it working. Speed was a secondary concern.
I installed this on an AMD64 laptop and did a x86 install with the CFLAGS and the CHOST I posted above. One note, when I compiled the kernel, I selected the AMD64 for the processor, which is apparently the right thing to do. My system is really stable and hums right along.
I can't tell all that much difference from when I did the AMD64 install, but Quanta is STILL masked It's not an AMD64 thing. There seem to be a lot of masked packages right now for some reason, even in the x86 tree. _________________ John McCubbin |
|
Back to top |
|
|
localghost Apprentice
Joined: 28 Oct 2004 Posts: 185 Location: Sint-Niklaas, Belgium
|
Posted: Mon May 02, 2005 10:36 am Post subject: Re: I'd start over |
|
|
mccubbin wrote: | If I were you, I'd start over. 32 bit binaries obviously do work, and I'm not sure why stuff compiled in 32 bit won't run under a 64 bit environment, but I chose to start all over. I did a stage 3 install and it went fairly fast. I just needed to get it working. Speed was a secondary concern.
I installed this on an AMD64 laptop and did a x86 install with the CFLAGS and the CHOST I posted above. One note, when I compiled the kernel, I selected the AMD64 for the processor, which is apparently the right thing to do. My system is really stable and hums right along.
I can't tell all that much difference from when I did the AMD64 install, but Quanta is STILL masked It's not an AMD64 thing. There seem to be a lot of masked packages right now for some reason, even in the x86 tree. |
I'm doing that right now. I rm'd everything except /boot, /etc, /home, /root and /var, and I'm starting a stage 3 this evening. Thank $DEITY that the backup of my whole system still fitted on one DVD, after compression. _________________ 411 /0µr 84$3 4r3 8310n9 70 µ$. |
|
Back to top |
|
|
plut0 Apprentice
Joined: 21 Dec 2004 Posts: 272
|
Posted: Wed May 25, 2005 1:19 pm Post subject: |
|
|
I had a few system dependencies not want to compile with -march = athlon64. I had to change it to athlon-xp. My gcc version is 3.4.3-r1. |
|
Back to top |
|
|
Maedhros Bodhisattva
Joined: 14 Apr 2004 Posts: 5511 Location: Durham, UK
|
Posted: Wed May 25, 2005 3:06 pm Post subject: |
|
|
plut0 wrote: | I had a few system dependencies not want to compile with -march = athlon64. I had to change it to athlon-xp. My gcc version is 3.4.3-r1. | Which ones were they? I've never had problems using -march=athlon64 with any packages...
Edit: Gah! That's because I'm not running in 32-bit. My mind was somewhere else -- sorry! _________________ No-one's more important than the earthworm.
Last edited by Maedhros on Wed May 25, 2005 8:20 pm; edited 1 time in total |
|
Back to top |
|
|
plut0 Apprentice
Joined: 21 Dec 2004 Posts: 272
|
Posted: Wed May 25, 2005 8:09 pm Post subject: |
|
|
I was about to look at my portage logs but its empty, oops, fixed permissions now. I can't remember unfortunately. I did a stage3 x86 install then later on `emerge -e system` and it compiled most of the packages, but a few wouldn't finish.
I could've gotten different results because of my USE flags. What version of gcc are you using? |
|
Back to top |
|
|
_kal_ l33t
Joined: 04 Mar 2005 Posts: 602 Location: Paris
|
Posted: Sun Apr 16, 2006 10:45 am Post subject: |
|
|
Hi all,
I'm wondering why -march=athlon64 doesn't imply 64bit compilation ? is it CHOST variable which imply 32/64 bit compilation ?
If i want to make a 32bit install on my AMD64 system, is that is ok :
Code: | CFLAGS="-march=athlon64 -pipe -O2 -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
CXXFLAGS="${CFLAGS}"
|
I don't know if fomit-frame-pointer is ok on AMD64, so correct me if i'm wrong or if its unrecommended. By the way, i will launch the installation from a 32bit live CD of course |
|
Back to top |
|
|
_kal_ l33t
Joined: 04 Mar 2005 Posts: 602 Location: Paris
|
Posted: Mon Apr 17, 2006 9:21 pm Post subject: |
|
|
nobody ? |
|
Back to top |
|
|
Isaiah Guru
Joined: 25 Feb 2003 Posts: 359
|
Posted: Tue Apr 18, 2006 2:55 am Post subject: |
|
|
_kal_ wrote: | Hi all,
I'm wondering why -march=athlon64 doesn't imply 64bit compilation ? is it CHOST variable which imply 32/64 bit compilation ?
If i want to make a 32bit install on my AMD64 system, is that is ok :
Code: | CFLAGS="-march=athlon64 -pipe -O2 -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
CXXFLAGS="${CFLAGS}"
|
I don't know if fomit-frame-pointer is ok on AMD64, so correct me if i'm wrong or if its unrecommended. By the way, i will launch the installation from a 32bit live CD of course |
This is working for me - can't say how I arrived at it however
Code: | CFLAGS="-march=athlon64 -O2 -fomit-frame-pointer -pipe -fno-ident"
CHOST="i686-pc-linux-gnu"
CXXFLAGS="${CFLAGS}"
|
Good luck |
|
Back to top |
|
|
nxsty Veteran
Joined: 23 Jun 2004 Posts: 1556 Location: .se
|
Posted: Tue Apr 18, 2006 10:48 am Post subject: |
|
|
_kal_ wrote: | Hi all,
I'm wondering why -march=athlon64 doesn't imply 64bit compilation ? is it CHOST variable which imply 32/64 bit compilation ? |
Sort of, an i*86-pc-linux-gnu compiler defaults to 32 bit and an x86_64-pc-linux-gnu compiler defaults to 64 bit.
_kal_ wrote: | If i want to make a 32bit install on my AMD64 system, is that is ok :
Code: | CFLAGS="-march=athlon64 -pipe -O2 -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
CXXFLAGS="${CFLAGS}"
|
I don't know if fomit-frame-pointer is ok on AMD64, so correct me if i'm wrong or if its unrecommended. By the way, i will launch the installation from a 32bit live CD of course |
Sounds good, -fomit-frame-pointer is on by default in 64 bit but not in 32 so it's correct to inlcude it. |
|
Back to top |
|
|
_kal_ l33t
Joined: 04 Mar 2005 Posts: 602 Location: Paris
|
Posted: Tue Apr 18, 2006 2:08 pm Post subject: |
|
|
Ok thank you nxsty and Isaiah.
And what about the cflags -fno-ident ?
Should i set Athlon64 in my kernel config or Athlon/Duron/K7 ? |
|
Back to top |
|
|
|