octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: C++11 now default?


From: Mike Miller
Subject: Re: C++11 now default?
Date: Tue, 23 Feb 2016 12:23:26 -0800
User-agent: Mutt/1.5.24 (2015-08-30)

On Tue, Feb 23, 2016 at 12:42:38 -0500, Ben Abbott wrote:
> Both CC and CXX point to Appleā€™s clang
> 
> Apple LLVM version 7.0.2 (clang-700.1.81)
> Target: x86_64-apple-darwin14.5.0
> Thread model: posix
> 
> My configure script is below.
> 
> PREFIX="/sw"
> FLIBDIR="/sw/lib/gcc5/lib"
> qt_type="mac"
> MESALIBS="/sw/lib/mesa"
> MESAINC="/sw/include/mesa"
> 
> export PATH="/sw/lib/qt4-$qt_type/bin:$PATH"
> 
> export build_alias="x86_64-apple-darwin"
> export host_alias="x86_64-apple-darwin"
> export CC="/sw/var/lib/fink/path-prefix-clang/cc"
> export CFLAGS="-v -O3 -MD -D_THREAD_SAFE"
> export CPPFLAGS="-I/sw/include"
> export CXX="/sw/var/lib/fink/path-prefix-libcxx/c++"
> export CXXFLAGS="$CFLAGS -std=gnu11 -std=gnu++14"
> export LDFLAGS="-v -Wl,-dead_strip_dylibs"
> export LIBS="-lm -lgl2ps"
> export F77="/sw/bin/gfortran-fsf-5"
> export FFLAGS="-O3"
> export FLIBS="-L${FLIBDIR} -lgfortran"
> export PKG_CONFIG="/sw/bin/pykg-config"
> export PKG_CONFIG_PATH="/sw/lib/qt4-${qt_type}/lib/pkgconfig:$PKG_CONFIG_PATH"
> export PATH="/sw/lib/qt4-${qt_type}/bin:$PATH"
> export LDFLAGS=`pkg-config QtNetwork --libs`" "`pkg-config QtGui --libs`" 
> -L/sw/lib/qt4-${qt_type}/lib $LDFLAGS"
> export LDFLAGS="$LDFLAGS -L/sw/lib -framework JavaVM"
> export 
> "JAVA_HOME=/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home"
> 
> export CPPFLAGS="-I/sw/include/mesa $CPPFLAGS"
> export LDFLAGS="-L/sw/lib/mesa -lOSMesa $LDFLAGS"
> 
> # Configure for Fink
> ./configure --prefix=$PREFIX \
>             --libexecdir=$PREFIX/lib \
>             --with-lapack=-ltatlas \
>             --with-blas=-ltatlas \
>             --with-magick=GraphicsMagick \
>             --with-qhull-includedir=$PREFIX/include/libqhull \
>             --host=$HOSTTYPE-apple-darwin \
>             --build=$HOSTTYPE-apple-darwin \
>             --infodir=$PREFIX/share/info \
>             --mandir=$PREFIX/share/man \
>             --libexecdir=${PREFIX}/lib \
>             --enable-shared \
>             --enable-dl \
>             --enable-docs \
>             --disable-static \
>             --enable-gui \
>             --with-opengl \
>             --with-framework-carbon \
>             --without-x \
>             --enable-dependency-tracking \
>             --enable-link-all-dependencies \
>             --without-OSMesa 

Please try CXX="$CFLAGS -std=gnu++11" only.

Clang is a little different from gcc in that it can build against its
own libc++ or against gcc's libstdc++. I can't tell from the above which
one is being used. Does fink build its own clang or is it linking to the
clang provided by Apple's Xcode environment? Is that what "version 7"
corresponds to? Because it's surely not a real clang version number (the
latest release of the llvm project is 3.7).

I had thought that clang was a little more proactive in moving to the
latest C++ standards than gcc, but I may have misunderstood if you need
to specify the -std option for it to find std::unique_ptr.

I will try a clang 3.7 (Debian) build today to make sure that still
works for me.

-- 
mike



reply via email to

[Prev in Thread] Current Thread [Next in Thread]