C++ conversion status update

John Baldwin jhb@freebsd.org
Tue Jan 19 19:00:00 GMT 2016

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.

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

John Baldwin

More information about the Gdb mailing list