From owner-freebsd-questions@FreeBSD.ORG Wed Apr 9 19:11:10 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B1EF2106566C for ; Wed, 9 Apr 2008 19:11:10 +0000 (UTC) (envelope-from rsmith@xs4all.nl) Received: from smtp-vbr2.xs4all.nl (smtp-vbr2.xs4all.nl [194.109.24.22]) by mx1.freebsd.org (Postfix) with ESMTP id 2855C8FC1A for ; Wed, 9 Apr 2008 19:11:09 +0000 (UTC) (envelope-from rsmith@xs4all.nl) Received: from slackbox.xs4all.nl (slackbox.xs4all.nl [213.84.242.160]) by smtp-vbr2.xs4all.nl (8.13.8/8.13.8) with ESMTP id m39JB8ZQ076614; Wed, 9 Apr 2008 21:11:08 +0200 (CEST) (envelope-from rsmith@xs4all.nl) Received: by slackbox.xs4all.nl (Postfix, from userid 1001) id B9D04B905; Wed, 9 Apr 2008 21:11:07 +0200 (CEST) Date: Wed, 9 Apr 2008 21:11:07 +0200 From: Roland Smith To: David Allen Message-ID: <20080409191107.GA2998@slackbox.xs4all.nl> Mail-Followup-To: David Allen , freebsd-questions@freebsd.org References: <2daa8b4e0804081314o25b9773bn844734b674856e8c@mail.gmail.com> <20080409184435.3bb4b91c@gumby.homeunix.com.> <2daa8b4e0804091135w4b31ea67vf6334fa83845a4e1@mail.gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="FCuugMFkClbJLl1L" Content-Disposition: inline In-Reply-To: <2daa8b4e0804091135w4b31ea67vf6334fa83845a4e1@mail.gmail.com> X-GPG-Fingerprint: 1A2B 477F 9970 BA3C 2914 B7CE 1277 EFB0 C321 A725 X-GPG-Key: http://www.xs4all.nl/~rsmith/pubkey.txt X-GPG-Notice: If this message is not signed, don't assume I sent it! User-Agent: Mutt/1.5.17 (2007-11-01) X-Virus-Scanned: by XS4ALL Virus Scanner Cc: freebsd-questions@freebsd.org Subject: Re: Setting CPUTYPE and CFLAGS in make.conf X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Apr 2008 19:11:10 -0000 --FCuugMFkClbJLl1L Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Apr 09, 2008 at 11:35:51AM -0700, David Allen wrote: > > Avoid setting CFLAGS unless you have a good reason - Gentoo > > documentation has a lot to answer for. CPUTYPE causes "-march" to be > > applied, so it can affect compatibility. AFAIK both setting do affect > > world and kernel because CFLAGS can cause a build to fail, and I've > > seen matching march settings in kernel builds. > > > > > Or are those settings relevant to the > > > compilation process only? Or to both the compilation process and the > > > actual performance of the binary? > > > > It can be either, -O2 is related to execution, -pipe speeds-up > > compilation. >=20 > Thank you for your reply. It's starting to make a lot more sense. > Just to confirm, then, if there's no CPUTYPE set, I can then set up > a build server on an Opteron box, for example, to build world, kernel > and ports binaries that can then be installed on my Thinkpad or > a PIII box? Only if they use the same architecture! If your opteron is running amd64, i= ts binaries won't run on a pIII, which can only run the i386 architecture. If you read through /usr/src/share/mk/bsd.cpu.mk you can see the different CPU types and the effect they have on build parameters. E.g. on the i386 architecture, if no CPUTYPE is set, the CPU type is set to i486, which is the lowest common denominator that gcc suppor= ts. Roland --=20 R.F.Smith http://www.xs4all.nl/~rsmith/ [plain text _non-HTML_ PGP/GnuPG encrypted/signed email much appreciated] pgp: 1A2B 477F 9970 BA3C 2914 B7CE 1277 EFB0 C321 A725 (KeyID: C321A725) --FCuugMFkClbJLl1L Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.8 (FreeBSD) iEYEARECAAYFAkf9FMsACgkQEnfvsMMhpyW/OgCfQZRBbzVwSSBk3T9tQL+NYlfj QJgAnjYzT5m07jh6MdxqMbHN+l9n1Z8P =WSmu -----END PGP SIGNATURE----- --FCuugMFkClbJLl1L--