From owner-freebsd-arch@freebsd.org Sun Sep 2 15:31:53 2018 Return-Path: Delivered-To: freebsd-arch@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 B6A1CFF2241 for ; Sun, 2 Sep 2018 15:31:53 +0000 (UTC) (envelope-from arichardson.kde@gmail.com) Received: from mail-yw1-f47.google.com (mail-yw1-f47.google.com [209.85.161.47]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5BEDF7C97C for ; Sun, 2 Sep 2018 15:31:53 +0000 (UTC) (envelope-from arichardson.kde@gmail.com) Received: by mail-yw1-f47.google.com with SMTP id x67-v6so6639547ywg.0 for ; Sun, 02 Sep 2018 08:31:53 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=NIptNRTKTwi2T6T2DZgw2CKZcUf7diCuLkcryg8gOZM=; b=kbYm96Q+7QKVNBFsEtq+WGv+oHCkerW/UyKbGz4g91FsArFdBRMX95jnFI+jtWKUho sWwS4sOPpuiXgiVJTAi3dMmG5gyOvEgs8Oc3+6CCN7H1BDObKrp0+i48gaqwCFwhpuWG 7dwSFHnIbtSCJrI/ozLdS8OjAtCdIK6v7YTth/D5kdF4fRzX933xVq3O/Zw+AA40pWbZ 6YM0l522XonItlU2RsFaRGSeer9rg4U/p7p3dh6sWLWFm83tVuqyv8YUl/IirnXODD5o 9Y0JDtSRQMuw4n0deAOmSSQP6RwtC06D2ha0vb6c9PUXMYO1KKYAeivF6oGOTMvq2VJ3 ad8w== X-Gm-Message-State: APzg51BibT+PgEcSZDAdJdp59IA2kLGkj2OqW47oBsGaO+WTAJWK2k5s 0uufKp6tm+Jy4Xx4G9TUnQ3DvU5tPd4= X-Google-Smtp-Source: ANB0VdbrXej1nlF492PJajE1zlRis5HMCZ2PflOgcOYPHiICytsCiwx2JmLndaso0EQu24VdUCQ+IA== X-Received: by 2002:a81:af5a:: with SMTP id x26-v6mr13268934ywj.70.1535902307293; Sun, 02 Sep 2018 08:31:47 -0700 (PDT) Received: from mail-yb1-f170.google.com (mail-yb1-f170.google.com. [209.85.219.170]) by smtp.gmail.com with ESMTPSA id z193-v6sm9832394ywd.90.2018.09.02.08.31.46 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 02 Sep 2018 08:31:47 -0700 (PDT) Received: by mail-yb1-f170.google.com with SMTP id j8-v6so202032ybg.9 for ; Sun, 02 Sep 2018 08:31:46 -0700 (PDT) X-Received: by 2002:a25:6a83:: with SMTP id f125-v6mr4848015ybc.187.1535902306719; Sun, 02 Sep 2018 08:31:46 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Alexander Richardson Date: Sun, 2 Sep 2018 16:31:35 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: Compile FreeBSD on linux/MacOS To: Alexandru Elisei Cc: freebsd-arch@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.27 X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 Sep 2018 15:31:53 -0000 Once Fri, 31 Aug 2018, 14:11 Alexandru Elisei, wrote: > Hello, > > I know there is a project about compiling FreeBSD on linux or MacOS. > > Where can I find more information about the project? Has it been submitted > for review? > Hi Alexandru, I have been working on this for the past few months. I have a work-in-progress branch on GitHub < https://github.com/arichardson/freebsd/tree/crossbuild-aug2018> (warning: I rebase this branch whenever I commit one of my changes) but I haven't written up anything about the current state. I have a few pending patches on phabricator and some committed changes but the rest of the changes still needs some clean-up before it can be submitted. Most of the changes are just allowing to build one of the bootstrap tools on non-FreeBSD but there are also two bigger changes (D16815 and D14316) to provide the basic cross-OS building infrastructure. It currently works fine for me on MacOS and Linux when compiling with the CHERI fork of llvm/clang/lld () but in order to compile with upstream clang you will have to delete the builtin std* headers from the clang install since they are incompatible with the FreeBSD stddef.h/stdio.h/etc. headers. If you want to try it out you should to use the script tools/build/make.py instead of make and if you're lucky `make.py buildworld` might succeed. I've tested building for mips64 and amd64 but other architectures might also be fine. Alex Best regards, > Alexandru Elisei > _______________________________________________ > freebsd-arch@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-arch >