Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 15 Apr 2013 21:15:58 -0700
From:      Tim Kientzle <tim@kientzle.com>
To:        Alie Tan <alie@affle.com>
Cc:        "freebsd-arm@freebsd.org" <freebsd-arm@freebsd.org>
Subject:   Re: Unable to compile vcuserland
Message-ID:  <AED03B71-2DB1-4DD0-B1BC-F78155513E4E@kientzle.com>
In-Reply-To: <CANuCnH_9gz%2BDi%2Bm_F-csNS-9ByuDVBDV%2BkhvgD4tNatE0U31xQ@mail.gmail.com>
References:  <CANuCnH9p%2BaY89wy%2BT6BDdo--URGXP5BZK8KBp6-UQRfdHLgUyg@mail.gmail.com> <51438529.4080604@bluezbox.com> <4FD89AF1-AF9D-4950-8AA4-9CC95FE66D46@kientzle.com> <456661659-1363845801-cardhu_decombobulator_blackberry.rim.net-733146442-@b26.c6.bise3.blackberry> <C2DF8350-459B-4B30-9F41-2DE1EF855170@kientzle.com> <CANuCnH9fe5aZJ2fHXA3qMKDd9b=dMngMHexjhfWDbxxhmzaAyQ@mail.gmail.com> <51687F65.4020703@bluezbox.com> <CANuCnH_9gz%2BDi%2Bm_F-csNS-9ByuDVBDV%2BkhvgD4tNatE0U31xQ@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help

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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?AED03B71-2DB1-4DD0-B1BC-F78155513E4E>