DaemonForums  

Go Back   DaemonForums > FreeBSD > FreeBSD General

FreeBSD General Other questions regarding FreeBSD which do not fit in any of the categories below.

Reply
 
Thread Tools Display Modes
Old 26th May 2008
Grogan's Avatar
Grogan Grogan is offline
Port Guard
 
Join Date: May 2008
Location: Ontario, Canada
Posts: 23
Default

I would use CPUTYPE=athlon in make.conf for that CPU. For gcc 4.2.x, these are your choices for x86/x86_64

http://gcc.gnu.org/onlinedocs/gcc-4....002d64-Options

If building kernel, you haven't got a lot of choice for the i386 arch. For that one, in the kernel config you'd have to use:

cpu I686_CPU

I don't mean to go against the rules here (I agree with that in general), but I don't mind people asking related questions in my threads. (In fact I don't consider it "my thread", I only started it). I spend a lot of time in forums, and sometimes in a thread something will inspire a question and it is practical to ask it there. It isn't necessarily thread hijacking. I believe this to be one of them. The topic did change since my original question... we got into CPUTYPE in make.conf and other make options.
Reply With Quote
Old 26th May 2008
Calderon's Avatar
Calderon Calderon is offline
Real Name: Patrick Lindholm
Fdisk Soldier
 
Join Date: May 2008
Location: Finland
Posts: 60
Default

Oh, im very sorry. I have been notified on other forums about making new topics (after searching etc. think the line is a bit fuzzy anyway) so im a bit afraid. But glad to know that here it isn´t so. ill leave this one alone for now.

EDIT: Thanks Grogan

Last edited by Calderon; 26th May 2008 at 08:39 AM. Reason: added thanks
Reply With Quote
Old 9th June 2008
Alspector Alspector is offline
New User
 
Join Date: Jun 2008
Posts: 1
Default

Just wanted to say thanks for all of the helpful information that has been posted in this thread. It really helped me tie together a bunch of the research I was doing before compiling my custom kernel and kept me from having to make posts to ask questions.
Reply With Quote
Old 9th June 2008
vermaden's Avatar
vermaden vermaden is offline
Administrator
 
Join Date: Apr 2008
Location: pl_PL.lodz
Posts: 1,056
Default

This is best source if you are looking for basic CPUTYPE / CFLAGS:
http://gentoo-wiki.com/Safe_Cflags
__________________
religions, worst damnation of mankind
"If 386BSD had been available when I started on Linux, Linux would probably never had happened." Linus Torvalds

Linux is not UNIX! Face it! It is not an insult. It is fact: GNU is a recursive acronym for “GNU's Not UNIX”.
vermaden's: links resources deviantart spreadbsd
Reply With Quote
Old 10th June 2008
Weaseal's Avatar
Weaseal Weaseal is offline
Package Pilot
 
Join Date: May 2008
Location: East Coast, US
Posts: 177
Default

Quote:
Originally Posted by vermaden View Post
This is best source if you are looking for basic CPUTYPE / CFLAGS:
http://gentoo-wiki.com/Safe_Cflags
I was looking at my proc on there... AMD Turion 64... Why do you think they don't recommend -fomit-frame-pointer for 64bit but do for 32bit? Curious...
__________________
FreeBSD addict since 4.2-RELEASE.
My FreeBSD wiki.
Reply With Quote
Old 10th June 2008
vermaden's Avatar
vermaden vermaden is offline
Administrator
 
Join Date: Apr 2008
Location: pl_PL.lodz
Posts: 1,056
Default

from gcc.gnu.org manual:
Quote:
-O also turns on -fomit-frame-pointer on machines where doing so does not interfere with debugging.
Quote:
-fomit-frame-pointer
Don't keep the frame pointer in a register for functions that don't need one. This avoids the instructions to save, set up and restore frame pointers; it also makes an extra register available in many functions. It also makes debugging impossible on some machines.

On some machines, such as the VAX, this flag has no effect, because the standard calling sequence automatically handles the frame pointer and nothing is saved by pretending it doesn't exist. The machine-description macro FRAME_POINTER_REQUIRED controls whether a target machine supports this flag. See Register Usage.

Enabled at levels -O, -O2, -O3, -Os.
rest: http://gcc.gnu.org/onlinedocs/gcc-4....timize-Options

Also -fomit-frame-pointer does good things on C code, but it may break C++ code, so use only for C.
__________________
religions, worst damnation of mankind
"If 386BSD had been available when I started on Linux, Linux would probably never had happened." Linus Torvalds

Linux is not UNIX! Face it! It is not an insult. It is fact: GNU is a recursive acronym for “GNU's Not UNIX”.
vermaden's: links resources deviantart spreadbsd
Reply With Quote
Old 10th June 2008
Grogan's Avatar
Grogan Grogan is offline
Port Guard
 
Join Date: May 2008
Location: Ontario, Canada
Posts: 23
Default

It's not that they don't recommend -fomit-frame-pointer for x86_64, it's just that you don't need to specify it because -Oanything enables it. (and apparently doesn't for x86, so they show that you can explicitly do so). Also, just because they are showing something as "safe" for gentoo, doesn't mean there is much point in doing it.
Reply With Quote
Old 10th June 2008
vermaden's Avatar
vermaden vermaden is offline
Administrator
 
Join Date: Apr 2008
Location: pl_PL.lodz
Posts: 1,056
Default

Quote:
Originally Posted by Grogan View Post
Also, just because they are showing something as "safe" for gentoo, doesn't mean there is much point in doing it.
GCC and Linux kernel is the same in all Linux distribution so Gentoo is no point here, GCC is also on FreeBSD and other UNIX systems, so this flag also works there.
__________________
religions, worst damnation of mankind
"If 386BSD had been available when I started on Linux, Linux would probably never had happened." Linus Torvalds

Linux is not UNIX! Face it! It is not an insult. It is fact: GNU is a recursive acronym for “GNU's Not UNIX”.
vermaden's: links resources deviantart spreadbsd
Reply With Quote
Old 10th June 2008
robbak's Avatar
robbak robbak is offline
Real Name: Robert Backhaus
VPN Cryptographer
 
Join Date: May 2008
Location: North Queensland, Australia
Posts: 366
Default

I wouldn't go too far with that point. Yes, it is the same GCC, but some of gcc's optimizations have on occasion assume some linuxisims.

Optimizations that work on the linux kernel or gnu code may still produce broken code on the BSD tree.
That is still a useful list, but don't take it as gospel.
__________________
The only dumb question is a question not asked.
The only dumb answer is an answer not given.
Reply With Quote
Old 10th June 2008
vermaden's Avatar
vermaden vermaden is offline
Administrator
 
Join Date: Apr 2008
Location: pl_PL.lodz
Posts: 1,056
Default

Quote:
Originally Posted by robbak View Post
Optimizations that work on the linux kernel or gnu code may still produce broken code on the BSD tree.
I would not said that if I would not test them first.

I always used -fomit-frame-pointer for all Ports and they NEVER been broken, it just disables debuging and you get one register more for other things.
__________________
religions, worst damnation of mankind
"If 386BSD had been available when I started on Linux, Linux would probably never had happened." Linus Torvalds

Linux is not UNIX! Face it! It is not an insult. It is fact: GNU is a recursive acronym for “GNU's Not UNIX”.
vermaden's: links resources deviantart spreadbsd
Reply With Quote
Old 10th June 2008
BSDfan666 BSDfan666 is offline
Real Name: N/A, this is the interweb.
Banned
 
Join Date: Apr 2008
Location: Ontario, Canada
Posts: 2,223
Default

The frame pointer actually has additional purposes, honesty, you should reconsider using all those optimizations, some levels of optimizations may be dangerous.

In the kernel, inline assembly is often used.. it may even rely on the stack pointer being present.

Unless you have a deep intimate knowledge of compiler mechanics and kernel internals.. stop recommending such things vermaden.
Reply With Quote
Old 10th June 2008
vermaden's Avatar
vermaden vermaden is offline
Administrator
 
Join Date: Apr 2008
Location: pl_PL.lodz
Posts: 1,056
Default

Quote:
Originally Posted by BSDfan666 View Post
In the kernel, inline assembly is often used.. it may even rely on the stack pointer being present.
Tell me where I was saying to use it for kernel ...

I would be GLAD to see that quote.

Quote:
Originally Posted by BSDfan666 View Post
stop recommending such things vermaden.
I know what I am doing.
__________________
religions, worst damnation of mankind
"If 386BSD had been available when I started on Linux, Linux would probably never had happened." Linus Torvalds

Linux is not UNIX! Face it! It is not an insult. It is fact: GNU is a recursive acronym for “GNU's Not UNIX”.
vermaden's: links resources deviantart spreadbsd
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
FreeBSD 7.2 amd64 no sound erim FreeBSD General 5 3rd June 2009 07:54 AM
strange load problem on freebsd 7.0 amd64 skynet_tech FreeBSD General 3 11th September 2008 09:49 PM
Wine on FreeBSD 7.0 amd64 BlueJayofEvil FreeBSD Ports and Packages 13 29th July 2008 12:22 AM
jdk16 plugins on FreeBSD 7 AMD64 ninjatux FreeBSD General 0 26th June 2008 07:55 PM
FreeBSD 7.0 amd64 make installworld fails. KernelPanic FreeBSD Installation and Upgrading 8 11th June 2008 04:34 PM


All times are GMT. The time now is 12:56 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick