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
  #1   (View Single Post)  
Old 6th September 2008
lumiwa lumiwa is offline
Package Pilot
 
Join Date: May 2008
Posts: 145
Default make.conf

Hi!

My make.conf looks:
CPUTYPE=pentium4
# added by use.perl 2008-03-01 15:21:02
PERL_VER=5.8.8
PERL_VERSION=5.8.8
.if ${.CURDIR:M*/ports/editors/openoffice.org-3}
WITH_KDE= yes
.endif

I red in the forum that for gcc 4 (FreeBSD 7) it doesn't need CPUTYPE but put
"-march=auto" in.. Is it -march=auto line in make.conf like
...
WITH_KDE= yes
.endif
...
-march=auto

And in Dru Lavigne book BSD Hacks I red about CFLAGS -O2 -pipe -funroll-loops and I tried to build one application and was much faster tha without but I am not sure if I could make a mess with this option.

Thanks in advance.
Reply With Quote
  #2   (View Single Post)  
Old 6th September 2008
graudeejs's Avatar
graudeejs graudeejs is offline
Real Name: Aldis Berjoza
ISO Quartermaster
 
Join Date: Jul 2008
Location: Riga, Latvia
Posts: 589
Default

stick to defaults.... That's my advice....

all you can change safely is CPUTYPE
Reply With Quote
  #3   (View Single Post)  
Old 6th September 2008
Weaseal's Avatar
Weaseal Weaseal is offline
Package Pilot
 
Join Date: May 2008
Location: East Coast, US
Posts: 177
Default

Generally what killasmurf says is true, but I have run with CFLAGS?=-O2 -pipe for years.

Check out http://gentoo-wiki.com/Safe_Cflags
__________________
FreeBSD addict since 4.2-RELEASE.
My FreeBSD wiki.
Reply With Quote
  #4   (View Single Post)  
Old 7th September 2008
graudeejs's Avatar
graudeejs graudeejs is offline
Real Name: Aldis Berjoza
ISO Quartermaster
 
Join Date: Jul 2008
Location: Riga, Latvia
Posts: 589
Default

Quote:
Originally Posted by Weaseal View Post
Generally what killasmurf says is true, but I have run with CFLAGS?=-O2 -pipe for years.

Check out http://gentoo-wiki.com/Safe_Cflags
flags
CFLAGS?=-O2 -pipe
are some (or all) of default flags.... that's why you didn't have problems....
you can remove that line and nothing will change in performance....


however if you want to speed up compilation, you could use ccache.....
Thing works great... when you compile same source for more than once....
Reply With Quote
  #5   (View Single Post)  
Old 7th September 2008
lumiwa lumiwa is offline
Package Pilot
 
Join Date: May 2008
Posts: 145
Default

Quote:
Originally Posted by killasmurf86 View Post
flags
CFLAGS?=-O2 -pipe
are some (or all) of default flags.... that's why you didn't have problems....
you can remove that line and nothing will change in performance....


however if you want to speed up compilation, you could use ccache.....
Thing works great... when you compile same source for more than once....
If I put :
CFLAGS= -march=auto

than I don't need CPUTYPE=pentium4 ? Am I wrigth, please?
Reply With Quote
  #6   (View Single Post)  
Old 7th September 2008
graudeejs's Avatar
graudeejs graudeejs is offline
Real Name: Aldis Berjoza
ISO Quartermaster
 
Join Date: Jul 2008
Location: Riga, Latvia
Posts: 589
Default

maybe, try it and post here... if you fail to compile, then put pentium4 back....
if you doubt if you have pentium4 or prescott (like i did) you can use sysutils/x86info utility to find out.
Reply With Quote
  #7   (View Single Post)  
Old 7th September 2008
vermaden's Avatar
vermaden vermaden is offline
Administrator
 
Join Date: Apr 2008
Location: pl_PL.lodz
Posts: 1,056
Default

Here you will find complete example of make.conf:
http://toya.net.pl/~vermaden/text/make.conf
__________________
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
  #8   (View Single Post)  
Old 7th September 2008
lumiwa lumiwa is offline
Package Pilot
 
Join Date: May 2008
Posts: 145
Default

Quote:
Originally Posted by vermaden View Post
Here you will find complete example of make.conf:
http://toya.net.pl/~vermaden/text/make.conf
Thank you.

BTW: -march=auto doesn't work (wrong switch):
cpu.c:1: error: bad value (auto) for -march= switch
cpu.c:1: error: bad value (auto) for -mtune= switch

and my processor is:

CPU Model: Pentium 4 (Northwood) [D1] Original OEM
Processor name string: Intel(R) Pentium(R) 4 CPU 2.60GHz

Mitja
Reply With Quote
  #9   (View Single Post)  
Old 7th September 2008
Carpetsmoker's Avatar
Carpetsmoker Carpetsmoker is offline
Real Name: Martin Tournoij
Tcpdump Spy
 
Join Date: Apr 2008
Location: Ireland
Posts: 2,245
Default

-march=auto got renamed to -march=native in GCC 4.1 or 4.2.
Reply With Quote
Old 8th September 2008
phoenix's Avatar
phoenix phoenix is offline
Risen from the ashes
 
Join Date: May 2008
Posts: 696
Default

Just stick to the processor family.

Don't try to be all "oooh, I'm super-leet" and try to be awesome with your optimisations. Especially if you don't understand the Mk system in FreeBSD, how it uses CPUTYPE and CFLAGS, what the defaults are (and why they are that way), what the available options are, and how each different value affects the rest.

Read the CPUTYPE section in /usr/share/examples/etc/make.conf, find the one that's closest to your CPU family, and let the Mk system handle the rest. There's a lot of "magic" in /usr/share/mk/bsd.cpu.mk that depends on you getting CPUTYPE at least close to right, and to automatically fill in the rest.

For you, CPUTYPE=p4 is all you need.
__________________
Freddie

Help for FreeBSD: Handbook, FAQ, man pages, mailing lists.
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
pf.conf lumiwa FreeBSD Security 11 20th September 2008 01:01 AM
difference between rc.conf and loader.conf disappearedng FreeBSD General 5 3rd September 2008 05:54 AM
quick question about optimizations in /etc/make.conf thevirtuesofxen FreeBSD Installation and Upgrading 7 15th July 2008 10:29 AM
I need help with make.conf syntax troberts FreeBSD Ports and Packages 4 1st June 2008 03:58 AM
Buildworld make.conf options siffland FreeBSD Installation and Upgrading 4 12th May 2008 12:02 AM


All times are GMT. The time now is 11:33 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