This is the mail archive of the gdb-prs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug corefiles/21206] gdb-7.12.1 for arm-rtems4.12 fails to build on FreeBSD 11.0


https://sourceware.org/bugzilla/show_bug.cgi?id=21206

--- Comment #2 from Chris Johns <chrisj at rtems dot org> ---
(In reply to Yao Qi from comment #1)
> Is your compiler clang?  I have no problem building gdb with clang++-3.6 on
> Linux.

Yes, this is the default compiler for FreeBSD 11.0:

$ /usr/bin/c++ --version
FreeBSD clang version 3.8.0 (tags/RELEASE_380/final 262564) (based on LLVM
3.8.0)
Target: x86_64-unknown-freebsd11.0
Thread model: posix
InstalledDir: /usr/bin

I was just looking into this on gdb's git HEAD branch and it seems gnulib's
configure is using the default CPP which is a C compiler however GDB is not C++
and so the generated header file 'stddef.h' is not really suitable. The top of
config.log for gnulib has 'CPP=' I suspect this needs to be the C++ compiler.

I hacked gnulib/configure adding to the top something like:

 CPP="/usr/bin/c++ -E"

and 'stddef.h' was correctly created. I could not figure out how to specify
'CPP=$CXX' to gnulib's configure. I did try setting CPP to CXX when calling the
top level configure however building the binutils parts fails which is to be
expected.

The build did fail on further on with:

In file included from ../../binutils-gdb/gdb/dwarf2read.c:72:
../../binutils-gdb/gdb/common/gdb_unlinker.h:35:35: error: '__nonnull__'
attribute is invalid for the implicit this argument
  unlinker (const char *filename) ATTRIBUTE_NONNULL (1)
                                  ^                  ~
../../binutils-gdb/gdb/../include/ansidecl.h:169:48: note: expanded from macro
'ATTRIBUTE_NONNULL'
#  define ATTRIBUTE_NONNULL(m) __attribute__ ((__nonnull__ (m)))

So it looks like there are other issues.

FYI this issue is currently a blocker for RTEMS's 4.12 release.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]