From owner-freebsd-hackers@freebsd.org Tue Jun 5 00:06:22 2018 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 85B04FEA060 for ; Tue, 5 Jun 2018 00:06:22 +0000 (UTC) (envelope-from bsd-lists@BSDforge.com) Received: from udns.ultimatedns.net (static-24-113-41-81.wavecable.com [24.113.41.81]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0DF046F5C0; Tue, 5 Jun 2018 00:06:21 +0000 (UTC) (envelope-from bsd-lists@BSDforge.com) Received: from udns.ultimatedns.net (localhost [127.0.0.1]) by udns.ultimatedns.net (8.14.9/8.14.9) with ESMTP id w54NngTE018862; Mon, 4 Jun 2018 16:49:48 -0700 (PDT) (envelope-from bsd-lists@BSDforge.com) X-Mailer: UDNSMS MIME-Version: 1.0 Cc: In-Reply-To: From: "Chris H" Reply-To: bsd-lists@BSDforge.com To: "Don Lewis" Subject: Re: defining CPUTYPE when building a custom release Date: Mon, 04 Jun 2018 16:49:48 -0700 Message-Id: <8c9b9690f1080c72ac644bbfbb6c61de@udns.ultimatedns.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Jun 2018 00:06:22 -0000 On Mon, 4 Jun 2018 15:36:02 -0700 (PDT) "Don Lewis" = said > I'm trying to build a custom 11-STABLE release for a machine that is too > wimpy to self-host using the /usr/src/release/release=2Esh script=2E The > build host is an amd64 machine and the target machine is is in the i386 > family=2E I've set: > TARGET=3Di386 > TARGET_ARCH=3Di386 > in the release=2Econf file=2E >=20 > If I don't try to specify a CPUTYPE, I have no problems=2E But if I add > CPUTYPE?=3Dpentium3 > to the make=2Econf file, the release build fails like this: >=20 > -------------------------------------------------------------- > >>> stage 4=2E2: building libraries > -------------------------------------------------------------- > =3D=3D=3D> gnu/lib/libssp/libssp_nonshared (obj,all,install) > =3D=3D=3D> lib/libcompiler_rt (obj,all,install) > =3D=3D=3D> gnu/lib/libgcc (obj,all,install) > error: unknown target CPU 'pentium3' > --- ssp-local=2Eo --- > *** [ssp-local=2Eo] Error code 1 >=20 >=20 > This is the same message that I get if I try to compile something on > amd64 if I specify -march: > %cc -c blah=2Ec -march=3Dpentium3 > error: unknown target CPU 'pentium3' > but I don't see this when I do the same on an actual i386 machine=2E I'm > assuming it is because pentium3 is not valid amd64 family member=2E It > seems like I should be able to avoid this by telling clang that I want > to cross-compile, but clang doesn't seem to like the -arch > command line flag: >=20 > %cc -c blah=2Ec -arch x86 -march=3Dpentium3 > cc: warning: argument unused during compilation: '-arch x86' > [-Wunused-command-line-argument] > error: unknown target CPU 'pentium3' > %cc -c blah=2Ec -arch i386 -march=3Dpentium3 > cc: warning: argument unused during compilation: '-arch i386' > [-Wunused-command-line-argument] > error: unknown target CPU 'pentium3' Apologies in advance for even *suggesting*; But the KERNCONF you're working with, originates from, and is within i386/ , not amd64/ =2E Right? --Chris >