From owner-freebsd-arm@FreeBSD.ORG Tue Apr 16 04:16:46 2013 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 820ABE42 for ; Tue, 16 Apr 2013 04:16:46 +0000 (UTC) (envelope-from tim@kientzle.com) Received: from monday.kientzle.com (99-115-135-74.uvs.sntcca.sbcglobal.net [99.115.135.74]) by mx1.freebsd.org (Postfix) with ESMTP id 463BAB40 for ; Tue, 16 Apr 2013 04:16:45 +0000 (UTC) Received: (from root@localhost) by monday.kientzle.com (8.14.4/8.14.4) id r3G4FxIE058820; Tue, 16 Apr 2013 04:15:59 GMT (envelope-from tim@kientzle.com) Received: from [192.168.2.123] (CiscoE3000 [192.168.1.65]) by kientzle.com with SMTP id sw5dm2cnqraee2be9rmed2q8fa; Tue, 16 Apr 2013 04:15:59 +0000 (UTC) (envelope-from tim@kientzle.com) Subject: Re: Unable to compile vcuserland Mime-Version: 1.0 (Apple Message framework v1283) Content-Type: text/plain; charset=iso-8859-1 From: Tim Kientzle In-Reply-To: Date: Mon, 15 Apr 2013 21:15:58 -0700 Content-Transfer-Encoding: quoted-printable Message-Id: References: <51438529.4080604@bluezbox.com> <4FD89AF1-AF9D-4950-8AA4-9CC95FE66D46@kientzle.com> <456661659-1363845801-cardhu_decombobulator_blackberry.rim.net-733146442-@b26.c6.bise3.blackberry> <51687F65.4020703@bluezbox.com> To: Alie Tan X-Mailer: Apple Mail (2.1283) Cc: "freebsd-arm@freebsd.org" X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Apr 2013 04:16:46 -0000 On Apr 15, 2013, at 3:09 AM, Alie Tan wrote: > Tim also submitted additional patches via pull requests. Took me some = time > to get around to merge them but now vchiq-freebsd code should be = compilable > with clang >=20 >=20 > Thanks, but now I am getting another error >=20 > CMake Error at = /usr/local/share/cmake/Modules/CMakeTestCCompiler.cmake:52 (MESSAGE): > The C compiler "/usr/bin/gcc" is not able to compile a simple test = program. >=20 > It fails with the following output: >=20 > Change Dir: = /usr/src/vc/userland/build/arm-freebsd/release/CMakeFiles/CMakeTmp That's because it tries to build with gcc and ends up with the wrong compiler. The following patch changes it to use 'cc' so it will work with either gcc or clang: --- a/makefiles/cmake/toolchains/arm-freebsd.cmake +++ b/makefiles/cmake/toolchains/arm-freebsd.cmake @@ -4,8 +4,8 @@ # =20 SET(CMAKE_SYSTEM_NAME FreeBSD) -SET(CMAKE_C_COMPILER gcc) -SET(CMAKE_CXX_COMPILER g++) +SET(CMAKE_C_COMPILER cc) +SET(CMAKE_CXX_COMPILER c++) SET(CMAKE_ASM_COMPILER as) SET(CMAKE_SYSTEM_PROCESSOR arm) =20 You'll hit some more errors after this (most seem to be real errors in vcuserland that clang detects and gcc does not). Getting vcuserland to build with clang will take a little more work. Note: You don't need vcuserland or vchiq to use FreeBSD on RaspberryPi; you just need those if you want to work with graphics. If you're using Crochet, you might want to edit = board/RaspberryPi/setup.sh and comment out the vcuserland references. Tim