-
Notifications
You must be signed in to change notification settings - Fork 128
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
C++14 Support #103
Comments
Oh, just realised that In any case, looks like it passes through to
...compiles fine (and even runs correctly on my Edit: I've noticed that the Edit 2: If the
So I suppose it's actually an issue of conflicting arguments somewhere. Edit 3: Okay now I'm confused - I dug around some more, and none of the switches seem like they could conflict with
...which if my understanding of these docs is correct, should be doing something like "if the |
Okay, I've checked through most of the flags now and I am completely confused. It looks like Manually peeking inside Using {rumprun path}/rumprun/libexec/rumprun-x86_64-hw/x86_64--netbsd-c++ -mno-red-zone -no-integrated-cpp --sysroot {rumprun path}/rumprun/rumprun-x86_64 -specs={rumprun path}/rumprun/rumprun-x86_64/lib/specs-compile_or_ferment -Wl,-r -Wl,-u,main -v -std=c++14 test.cpp {rumprun path}/rumprun/rumprun-x86_64/share/x86_64-rumprun-netbsd-recipe.s -lc++ -lunwind Using built-in specs. Reading specs from {rumprun path}/rumprun/rumprun-x86_64/lib/specs-compile_or_ferment rename spec cpp_options to old_cpp_options rename spec cc1_options to old_cc1_options rename spec link_libgcc to old_link_libgcc rename spec libgcc to old_libgcc COLLECT_GCC={gcc5 path}/bin/g++ COLLECT_LTO_WRAPPER={gcc5 path}libexec/gcc/x86_64-unknown-linux-gnu/5.4.0/lto-wrapper Target: x86_64-unknown-linux-gnu Configured with: ../configure --prefix={gcc path} --enable-languages=c,c++ --disable-multilib Thread model: posix gcc version 5.4.0 (GCC) COLLECT_GCC_OPTIONS='-mno-red-zone' '-no-integrated-cpp' '-specs={rumprun path}/rumprun/rumprun-x86_64/lib/specs-compile_or_ferment' '-v' '-std=c++14' '-shared-libgcc' '-mtune=generic' '-march=x86-64' {gcc5 path}libexec/gcc/x86_64-unknown-linux-gnu/5.4.0/cc1plus -E -nostdinc -isystem {rumprun path}/rumprun/rumprun-x86_64/include -isystem {rumprun path}/rumprun/rumprun-x86_64/include/c++ -quiet -v -imultiarch x86_64-linux-gnu -isysroot {rumprun path}/rumprun/rumprun-x86_64 -D_GNU_SOURCE test.cpp -mno-red-zone -mtune=generic -march=x86-64 -std=c++14 -D__NetBSD__ -Ulinux -U__linux -U__linux__ -U__gnu_linux__ -D__RUMPRUN__ -o /tmp/ccoaKcYx.ii #include "..." search starts here: #include <...> search starts here: {rumprun path}/rumprun/rumprun-x86_64/include {rumprun path}/rumprun/rumprun-x86_64/include/c++ End of search list. COLLECT_GCC_OPTIONS='-mno-red-zone' '-no-integrated-cpp' '-specs={rumprun path}/rumprun/rumprun-x86_64/lib/specs-compile_or_ferment' '-v' '-std=c++14' '-shared-libgcc' '-mtune=generic' '-march=x86-64' {gcc5 path}libexec/gcc/x86_64-unknown-linux-gnu/5.4.0/cc1plus -fpreprocessed /tmp/ccoaKcYx.ii -quiet -dumpbase test.cpp -mno-red-zone -mtune=generic -march=x86-64 -auxbase test -std=c++14 -version -mno-red-zone -fno-stack-protector -fno-builtin-sin -fno-builtin-sinf -fno-builtin-cos -fno-builtin-cosf -o /tmp/ccwEyqmR.s GNU C++14 (GCC) version 5.4.0 (x86_64-unknown-linux-gnu) compiled by GNU C version 5.4.0, GMP version 4.3.2, MPFR version 2.4.2, MPC version 0.8.1 GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072 GNU C++14 (GCC) version 5.4.0 (x86_64-unknown-linux-gnu) compiled by GNU C version 5.4.0, GMP version 4.3.2, MPFR version 2.4.2, MPC version 0.8.1 GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072 Compiler executable checksum: ad108975c825c71463335b0918a936e6 test.cpp: In function ‘int main(int, char**)’: test.cpp:10:42: error: ‘cbegin’ is not a member of ‘std’ std::vector::const_iterator i = std::cbegin(a); ^ COLLECT_GCC_OPTIONS='-mno-red-zone' '-no-integrated-cpp' '-specs={rumprun path}/rumprun/rumprun-x86_64/lib/specs-compile_or_ferment' '-v' '-std=c++14' '-shared-libgcc' '-mtune=generic' '-march=x86-64' as -v --64 -o /tmp/cc3BXHYb.o {rumprun path}/rumprun/rumprun-x86_64/share/x86_64-rumprun-netbsd-recipe.s GNU assembler version 2.28 (x86_64-linux-gnu) using BFD version (GNU Binutils for Debian) 2.28 |
I am also interested in gcc with c++ 14 (or at least 11) .. actually I need Boost/ASIO and https://github.com/crossbario/autobahn-cpp, which is pretty heavy on templates, |
I'm trying to use a library which requires C++14 compiler support, and I've been unable to get
x86_64-rumprun-netbsd-g++
to cooperate.As I couldn't find any references on how to do this, my approach has been to compile rumprun using
g++
5.4.0, which does support C++14. The resultingx86_64-rumprun-netbsd-g++
reports the right version:But compiling a simple program using a C++14 feature like
std::cbegin
:...fails with
x86_64-rumprun-netbsd-g++
:...but works with
g++
5.4.0:Is what I'm trying to achieve possible? If so, any advice on what mistake I'm making?
If relevant, the
g++
I'm using has been built from source, so isn't the system default. I built rumprun using:The text was updated successfully, but these errors were encountered: