From owner-freebsd-stable@freebsd.org Sun Mar 4 17:58:10 2018 Return-Path: Delivered-To: freebsd-stable@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 AE1EBF4855D for ; Sun, 4 Mar 2018 17:58:10 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-it0-x229.google.com (mail-it0-x229.google.com [IPv6:2607:f8b0:4001:c0b::229]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4D977865C8 for ; Sun, 4 Mar 2018 17:58:10 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-it0-x229.google.com with SMTP id l187so7331142ith.4 for ; Sun, 04 Mar 2018 09:58:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=uNLGR+rf31udwNZr0dByrmdUN72s2eHi5VDTdeUJ5kc=; b=ncGpnMoP10qtVVjA8jW+KYuNRkuwKfncBe5tgPj91mdEG1Vx4UMeXHQS6URMb7JilZ DRylyOLfTLtgq7cStKMUbZawkH8agzglRP21NjYMmZ+wM89MnXJaKNlyoljA4K/PhgMV qqgzi6Bi5jucvKViS8jLC5FAh3JbNnz2N3IusjE6xxlIU7nZdJJ9U9pqLOa5FYaWbMzO +N31I0+vsJMs4ZmCmUQW9YbXudbLzED+Frl9RfXBbr8uZUdrtGU9FziLGGQPP71YvLxG RcIdJv4QwtZd+ohHuvGO3UE3eKFUkzp7Bu8B1dXPquQcTUBO4MS/sxqZXdNYc3bXYyks QOcg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=uNLGR+rf31udwNZr0dByrmdUN72s2eHi5VDTdeUJ5kc=; b=Jc1zAcLUxI+e1kLnj4tAaAMJMFjBMqB9D4iM2jCE3tEeQr2odGraEKkSlVkPztVw7D a5qsTNPqG3UL6VhE6zoueic0O+ofDT4Xvtx3CZF+H0VMChk4838kmSTo9Fq/zivT3ELn ocfipFIp8ggRkF8GcrZhFRQ8ZKrRLVNIGNFvEwqoZC+HaEEm3cIi4nvDnsfXOcKpLUbF 8VhS97sSNz4CE5H8tEo3TELeUspzlF3xH8lY1FVxPT2Jar+L5hM12Ax/b/Cb1iFb69eW srD9C8SY0Tu2De8FPE4EuDUKMt4uLjOl8pIv/KP7zF/NGoGuy38l96ux/fKodz0VaIIy l9mw== X-Gm-Message-State: AElRT7EwnP+48GTJlp2vU32mbO4Z2Fg6VemsJZwvOLN3+vtLYJvh2BD4 gXitm4pl1AFTXDWOQxX6EXH4b0vIJmskhCAMtgMFXQ== X-Google-Smtp-Source: AG47ELu6K+LY6ZEf69e6bZQP5KoI0nRBMtgbHFhQBYo/02ej0SHF7Sw7tK433lmyTbOGIMLreusHB99C3yPahO7Nhq0= X-Received: by 10.36.148.204 with SMTP id j195mr10567213ite.1.1520186289427; Sun, 04 Mar 2018 09:58:09 -0800 (PST) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 10.79.203.196 with HTTP; Sun, 4 Mar 2018 09:58:08 -0800 (PST) X-Originating-IP: [2603:300b:6:5100:1052:acc7:f9de:2b6d] In-Reply-To: References: <2126f358-c827-ecf0-109b-0488c5b155b6@chrullrich.net> From: Warner Losh Date: Sun, 4 Mar 2018 10:58:08 -0700 X-Google-Sender-Auth: 13WkpMwlXj0aPCVwwNMxU6SK-2I Message-ID: Subject: Re: "Cross" building for same architecture, different CPUTYPE To: Dimitry Andric Cc: Christian Ullrich , FreeBSD-STABLE Mailing List Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.25 X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Mar 2018 17:58:11 -0000 On Sun, Mar 4, 2018 at 10:43 AM, Dimitry Andric wrote: > Again, this depends on how exactly you are overriding CPUTYPE. I'd suggest *NOT* setting CPUTYPE and instead using TARGET_CPUTYPE to do these sorts of things. CPUTYPE is known to only work on native builds and is tricky to do in this scenario just so. It might work for 'near cross' builds, or it might not. TARGET_CPUTYPE overrides CPUTYPE that might be set in weird places and generally works a lot better. You don't need to set TARGET or TARGET_ARCH to do this, but it would work if you did that also. Warner