Re: C++ conversion status update
Pedro Alves <[email protected]>
| Newsgroups | gmane.comp.gdb.devel |
|---|---|
| Message-ID | <[email protected]> |
On 01/19/2016 07:00 PM, John Baldwin wrote: > On Monday, December 14, 2015 07:09:08 PM Pedro Alves wrote: >> On 12/14/2015 02:40 PM, Yao Qi wrote: >> Meanwhile, I tried a few BSD hosts on the compile farm and >> wrote a few patches: >> >> https://github.com/palves/gdb/commits/palves/cxx-conversion-netbsd >> >> but haven't had a moment yet to drive them to completion. I probably should sync >> up with Simon though, as I think I may be duplicating work he's done already. > > I started doing some test builds on FreeBSD with C++ today and ran into one > unexpected thing that I'm not sure how to fix. Thanks! > > I build gdb from git on my own for testing, but the gdb package for FreeBSD > users is built from FreeBSD's ports framework. The framework sets default > CFLAGS / CXXFLAGS values for the ports it builds (and each port can > override or adjust those as needed). However, gdb uses CFLAGS instead of > CXXFLAGS when building with C++. The default flags in FreeBSD's ports > infrastructure include "-std=gnu89" in the default CFLAGS (but not in > CXXFLAGS since it is a C-only flag). The CXXFLAGS set in the environment > when ./configure was run do not appear to be honored in the generated > gdb/Makefile and also don't appear to be used during the build of gdb > itself. Indeed, thanks for noticing this. I've sent a patch now: https://sourceware.org/ml/gdb-patches/2016-01/msg00469.html I've also pushed it to: [email protected]:palves/gdb.git palves/cxx-conversion-attempt-part-2-no-fpermissive (note there are a few more wip/pending C++ patches on that branch) Could you give it a try? Thanks, Pedro Alves