From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id B23D9138334 for ; Sun, 5 May 2019 08:16:02 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 3EAD2E07E0; Sun, 5 May 2019 08:16:01 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 20A9CE07E0 for ; Sun, 5 May 2019 08:16:00 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 80E6934362D for ; Sun, 5 May 2019 08:15:59 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 78883326 for ; Sun, 5 May 2019 08:15:57 +0000 (UTC) From: "Fabian Groffen" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Fabian Groffen" Message-ID: <1557044145.66f46063dd050dce3335db6b9200dcaf64826ff2.grobian@gentoo> Subject: [gentoo-commits] repo/proj/prefix:master commit in: scripts/ X-VCS-Repository: repo/proj/prefix X-VCS-Files: scripts/bootstrap-prefix.sh X-VCS-Directories: scripts/ X-VCS-Committer: grobian X-VCS-Committer-Name: Fabian Groffen X-VCS-Revision: 66f46063dd050dce3335db6b9200dcaf64826ff2 X-VCS-Branch: master Date: Sun, 5 May 2019 08:15:57 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 02a37c25-b778-4fed-a9c2-38f55c4716bf X-Archives-Hash: 4093f85f4a9687f5ae0510626afc20e7 commit: 66f46063dd050dce3335db6b9200dcaf64826ff2 Author: Fabian Groffen gentoo org> AuthorDate: Tue Apr 2 11:18:25 2019 +0000 Commit: Fabian Groffen gentoo org> CommitDate: Sun May 5 08:15:45 2019 +0000 URL: https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=66f46063 scripts/bootstrap-prefix: add initial FreeBSD support This is mostly non-functional, since FreeBSD/Prefix profiles are missing. Signed-off-by: Fabian Groffen gentoo.org> scripts/bootstrap-prefix.sh | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/scripts/bootstrap-prefix.sh b/scripts/bootstrap-prefix.sh index 4149f661f1..3c4f7dbde7 100755 --- a/scripts/bootstrap-prefix.sh +++ b/scripts/bootstrap-prefix.sh @@ -181,6 +181,9 @@ configure_toolchain() { *-darwin*) # handled below ;; + *-freebsd*) + # comes with clang, handled below + ;; *) # The host may not have a functioning c++ toolchain, so use a # stage1 compiler that can build with C only. @@ -318,6 +321,11 @@ configure_toolchain() { sys-devel/llvm sys-devel/clang" ;; + *-freebsd*) + CC=clang + CXX=clang++ + # TODO: target clang toolchain someday? + ;; *-solaris*) local ccvers="$( (unset CHOST; gcc --version 2>/dev/null) )" case "${ccvers}" in @@ -2290,7 +2298,7 @@ EOF esac # TODO: should we better use cc here? or check both? - if ! type -P gcc > /dev/null ; then + if ! type -P gcc > /dev/null && ! type -P clang > /dev/null ; then case "${CHOST}" in *-darwin*) cat << EOF @@ -2420,6 +2428,7 @@ EOF case "${CHOST}" in *-cygwin*) ncpu=$(cmd /D /Q /C 'echo %NUMBER_OF_PROCESSORS%' | tr -d "\\r") ;; *-darwin*) ncpu=$(/usr/sbin/sysctl -n hw.ncpu) ;; + *-freebsd*) ncpu=$(/sbin/sysctl -n hw.ncpu) ;; *-solaris*) ncpu=$(/usr/sbin/psrinfo | wc -l) ;; *-linux-gnu*) ncpu=$(cat /proc/cpuinfo | grep processor | wc -l) ;; *-aix*) ncpu=$(/usr/sbin/bindprocessor -q | cut -d: -f2 | wc -w) ;; @@ -2925,6 +2934,13 @@ if [[ -z ${CHOST} ]]; then CYGWIN*) CHOST="`uname -m`-pc-cygwin" ;; + FreeBSD) + case `uname -m` in + amd64) + CHOST="x86_64-pc-freebsd`uname -r | sed 's|-.*$||'`" + ;; + esac + ;; *) eerror "Nothing known about platform `uname -s`." eerror "Please set CHOST appropriately for your system"