Oliver

I am setting the following environment variables before configuring:

export PATH="${HOME}/llvm-3.3/bin:${PATH}"
export PKG_CONFIG_PATH="${HOME}/hwloc-1.5/lib/pkgconfig"
export LD_LIBRARY_PATH="${HOME}/llvm-3.3/lib:${LD_LIBRARY_PATH}"
export DYLD_FALLBACK_LIBRARY_PATH="${HOME}/llvm-3.3/lib"
export CC="${HOME}/llvm-3.3/bin/clang"
export CXX="${HOME}/llvm-3.3/bin/clang++"
export CLANGXX="{$CXX}"
export CPPFLAGS="-I${HOME}/src/libcxx-3.3/include
-I${HOME}/hwloc-1.5/include -I/opt/local/include -nostdinc++"
export CXXFLAGS="-std=c++11 -stdlib=libc++"
export CLANGXX_FLAGS="${CPPFLAGS} ${CXXFLAGS}"
export LDFLAGS="-L${HOME}/src/libcxx-3.3/lib
-Wl,-rpath,${HOME}/src/libcxx-3.3/lib -L${HOME}/hwloc-1.5/lib
-L/opt/local/lib"

If you cannot set environment variables explicitly, then we would need to
augment configure.ac to set CXXFLAGS. I do not think that using libc++ is
necessary; setting CXXFLAGS=-std=c++11 or CLANGXX_FLAGS=-std=c++11 alone
may be sufficient.

One should probably distinguish between the flags used for building pocl
itself (which don't need C++11), and the flags used to build the kernel
library (which do). The kernel library will always be built by clang, and
we can/should probably assume that this will be clang 3.3, or at least
clang 3.2 (don't know whether the latter actually works). I don't know
which flags distinguish between these two cases -- maybe you want to set
CLANGXX_FLAGS but not CXXFLAGS?

If this is so, then this setting could be hardcoded.

-erik



On Fri, May 31, 2013 at 5:00 PM, O. Hartmann <[email protected]>wrote:

> On Fri, 31 May 2013 22:17:25 +0200
> "O. Hartmann" <[email protected]> wrote:
>
> > I just tried to compile pocl-0.8rc1 on FreeBSD 10.0-CURRENT wirth a
> > preliminary ports framework and it fails with a c++ header not found:
> >
> > [...]
> > /usr/bin/clang++ -Xclang -ffake-address-space-map -std=c++11
> > -fno-exceptions -emit-llvm  -c -target amd64-portbld-freebsd10.0 -o
> > acos.cc.bc ./../vecmathlib/pocl/acos.cc
> > -include ../../../include/x86_64/types.h In file included
> > from ./../vecmathlib/pocl/acos.cc:3: In file included
> > from ./../vecmathlib/pocl/pocl-compat.h:8: In file included
> > from ./../vecmathlib/pocl/../vecmathlib.h:45: In file included
> > from ./../vecmathlib/pocl/../vec_pseudo.h:6: In file included
> > from ./../vecmathlib/pocl/../floatprops.h:6:
> ./../vecmathlib/pocl/../floattypes.h:6:10:
> > fatal error: 'cstdint' file not found #include <cstdint> ^ 1 error
> > generated. gmake[4]: *** [acos.cc.bc] Error 1
> > gmake[4]: Leaving directory
> > `/usr/ports/devel/pocl/work/pocl-0.8rc1/lib/kernel/x86_64' gmake[3]:
> > *** [all-recursive] Error 1 gmake[3]: Leaving directory
> > `/usr/ports/devel/pocl/work/pocl-0.8rc1/lib/kernel' gmake[2]: ***
> > [all-recursive] Error 1 gmake[2]: Leaving directory
> > `/usr/ports/devel/pocl/work/pocl-0.8rc1/lib' gmake[1]: ***
> > [all-recursive] Error 1 gmake[1]: Leaving directory
> > `/usr/ports/devel/pocl/work/pocl-0.8rc1' gmake: *** [all] Error 2
> > *** Error code 1
> > [...]
> >
> >
> > Oliver
>
> Obviously I can not pass any variable to the configure-ENV to ensure
> that the above malformed clang++ line (FreeBSD 10.0-CURRENT needs
> -stdlib=c++ set to compile further and not to complain about the
> missing <cstdint> include).
>
> Is this hardcoded?
>
> If not, from what configured variable are the clang++ options derived
> from?
>
>
> ------------------------------------------------------------------------------
> Get 100% visibility into Java/.NET code with AppDynamics Lite
> It's a free troubleshooting tool designed for production
> Get down to code-level detail for bottlenecks, with <2% overhead.
> Download for free and get started troubleshooting in minutes.
> http://p.sf.net/sfu/appdyn_d2d_ap2
> _______________________________________________
> pocl-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/pocl-devel
>
>


-- 
Erik Schnetter <[email protected]>
http://www.perimeterinstitute.ca/personal/eschnetter/
AIM: eschnett247, Skype: eschnett, Google Talk: [email protected]
------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite
It's a free troubleshooting tool designed for production
Get down to code-level detail for bottlenecks, with <2% overhead.
Download for free and get started troubleshooting in minutes.
http://p.sf.net/sfu/appdyn_d2d_ap2
_______________________________________________
pocl-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pocl-devel

Reply via email to