Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
-maltivec -mabi=altivec...I am lost with the flags!
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo on PPC
View previous topic :: View next topic  
Author Message
SyntheticDNA
n00b
n00b


Joined: 07 Nov 2002
Posts: 29
Location: Alaska

PostPosted: Wed Nov 20, 2002 1:46 am    Post subject: -maltivec -mabi=altivec...I am lost with the flags! Reply with quote

After searching around for a while, I found this information posted in another topic that is relevant to me:

“If it is going to be more than a couple of days, I'd boot from the 1.2 iso then use the 1.4_rc1 ppc stage 1 tarball from the server. Then emerge rsysnc, emerge -u portage, and make sure the working flags are in make.conf, make.global, and make.defaults in /etc/profile (just to be sure). Here are the flags so you don't have to hunt them down:

CFLAGS=" -O2 -pipe -mcpu=7400 -maltivec -mabi=altivec -fsigned-char "

Then bootstrap and emerge system following the rest of the instructions.”

My machine is a G4 867 (desktop) and I want to get Gentoo installed on it. I can manage getting the correct ppc tarball, yet I am still befuddled with the flags. Obviously, I want to allow Gentoo to take advantage of altivec so I need to enable these flags.

I have yet to find any information that I can successfully use on these. So, according to the above, CFLAGS=" -O2 -pipe -mcpu=7400 -maltivec -mabi=altivec -fsigned-char "
Or something similar is what I am after. Where should I put this so that everything will compile correctly? make.conf, make.global, and make.defaults?

I am just quite lost in this process.
Thank You so much!:D
_________________
If life gives you lined paper, write the other way...
Back to top
View user's profile Send private message
EzInKy
Veteran
Veteran


Joined: 11 Oct 2002
Posts: 1734
Location: Kentucky

PostPosted: Wed Nov 20, 2002 2:36 am    Post subject: Reply with quote

Putting it in your make.conf should do. Please note the following from make.globals:

Quote:
# *****************************
# ** DO NOT EDIT THIS FILE **
# ***************************************************
# **** CHANGES TO make.conf *OVERRIDE* THIS FILE ****
# ***************************************************
# ** Incremental Variables Accumulate Across Files **
# ** USE, CONFIG_*, and FEATURES are incremental **
# ***************************************************
Back to top
View user's profile Send private message
SyntheticDNA
n00b
n00b


Joined: 07 Nov 2002
Posts: 29
Location: Alaska

PostPosted: Wed Nov 20, 2002 6:15 am    Post subject: Reply with quote

Looking around, my proc would be a 7450, therfore:

CFLAGS=" -O2 -pipe -mcpu=7450 -maltivec -mabi=altivec -fsigned-char "

Thank you for your help!
:D
Back to top
View user's profile Send private message
azote
Guru
Guru


Joined: 17 Sep 2002
Posts: 414

PostPosted: Wed Nov 20, 2002 7:45 pm    Post subject: Reply with quote

did it work?
_________________
SLINUX

What do you want to emerge today?

if you think that a person is normal, it is because you do not know them well
Back to top
View user's profile Send private message
azote
Guru
Guru


Joined: 17 Sep 2002
Posts: 414

PostPosted: Wed Nov 20, 2002 8:27 pm    Post subject: Reply with quote

because im triying to use:
Code:
CFLAGS=" -O2 -pipe -mcpu=7455 -maltivec -mabi=altivec -fsigned-char "
and it won even start...
it says invalid -mcpu= switch
_________________
SLINUX

What do you want to emerge today?

if you think that a person is normal, it is because you do not know them well
Back to top
View user's profile Send private message
Gerk
Retired Dev
Retired Dev


Joined: 07 May 2002
Posts: 434

PostPosted: Wed Nov 20, 2002 9:28 pm    Post subject: Reply with quote

look at latest make.conf example..

for G4 the only options are:

7400, 7450 (whidh afaik are treated exactly the same way anyway). 7455 is not a valid option, a very old make.conf used to list that.

you can set either of the valid ones and you will be fine
Back to top
View user's profile Send private message
azote
Guru
Guru


Joined: 17 Sep 2002
Posts: 414

PostPosted: Wed Nov 20, 2002 11:05 pm    Post subject: Reply with quote

thanks Gerk! :oops:
_________________
SLINUX

What do you want to emerge today?

if you think that a person is normal, it is because you do not know them well
Back to top
View user's profile Send private message
SyntheticDNA
n00b
n00b


Joined: 07 Nov 2002
Posts: 29
Location: Alaska

PostPosted: Thu Nov 21, 2002 12:13 am    Post subject: Reply with quote

Sorry azote if I kept you hanging, I can't do this till the weekend. I need the computer for school and stuff...
Back to top
View user's profile Send private message
axxackall
l33t
l33t


Joined: 06 Nov 2002
Posts: 651
Location: Toronto, Ontario, 3rd Rock From Sun

PostPosted: Thu Nov 21, 2002 7:45 pm    Post subject: Reply with quote

Looking at this page: http://www.freehackers.org/gentoo/gccflags/flag_gcc3.html I see that -O3 is not advised with G4 as unstable.

However, the resent make.conf suggests me to use -O3, which I am trying right now (successfully so far), as I found the link above after I've done my installation.

My first question is: does anyone know how really is -O3 bad? What kind of bad impact I can expect? If I have to reinstall everything from scratch then I'd like to know "why".

Another question is: if i have to go back to -O2 then what kind of performance degradation I can expect comparing to -O3 on G4 from the system and/or applications? 1%? 10%? I doubt about 50%, but anyway, it'd be better to know.

My last question is: why make.conf suggests one choice and the link above sugests another one (see bellow and pay your attention on the difference with CXXFLAGS and CFLAGS)?

Code:
 7400, aka G4 (PowerPC)

CHOST="powerpc-unknown-linux-gnu"
CFLAGS="-mcpu=7400 -O2 -pipe -fsigned-char -maltivec
   -mabi=altivec -mpowerpc-gfxopt"
CXXFLAGS="-mcpu=7400 -O2 -pipe -fsigned-char -maltivec
   -mabi=altivec -mpowerpc-gfxopt"
   -fsigned-char -maltivec -mabi=altivec -mpowerpc-gfxopt"

Note: do not use -march=
Note: -O3 is unstable on G4
Back to top
View user's profile Send private message
Gerk
Retired Dev
Retired Dev


Joined: 07 May 2002
Posts: 434

PostPosted: Thu Nov 21, 2002 9:02 pm    Post subject: Reply with quote

first of all, pay ZERO attention to that site, that info literally got pasted from an irc conversation I had with one of them a long time ago, as did most of their other information. The suggested stuff is the most recent make.conf is reccmended for G4.

recent make.conf most definately does not suggest -O3 and havent for a long while now, you should check to see if you have updated to latest correctly.

using -O3 is bad for several reasons, it does some inline stuff that makes it mostly impossible to debug applications, it makes randomly non-functional code on G4 as well. I also expereinced the odd nasty memory leak.

Very hit and miss.
Back to top
View user's profile Send private message
axxackall
l33t
l33t


Joined: 06 Nov 2002
Posts: 651
Location: Toronto, Ontario, 3rd Rock From Sun

PostPosted: Thu Nov 21, 2002 9:55 pm    Post subject: Reply with quote

Gerk wrote:
recent make.conf most definately does not suggest -O3 and havent for a long while now, you should check to see if you have updated to latest correctly.

Just followed gentoo installation guide and downloaded stage1 from ibiblio... wrong site?...

Gerk wrote:
using -O3 is bad for several reasons, it does some inline stuff that makes it mostly impossible to debug applications, it makes randomly non-functional code on G4 as well. I also expereinced the odd nasty memory leak.

Do you advise to reinstall everything again???
Back to top
View user's profile Send private message
Gerk
Retired Dev
Retired Dev


Joined: 07 May 2002
Posts: 434

PostPosted: Thu Nov 21, 2002 9:58 pm    Post subject: Reply with quote

possibly for reinstallation.. some problems may not come back to bite you for some time :(

for the stage1, it is the correct one, but my hands are tired, I'm not 'allowed' to release an rc2 or 1.4 final until x86 is 'ready'.. which may take forever, its been 3+ months now and still waiting :(

you actually get the updated make.conf after bootstrap is finished. If you only did bootstrap then it should be ok as those optimizations arent' really applied to any of the bootstrap builds.. but for before emerge system I woudl definately change them.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo on PPC All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum