Fix build on MIPS and powerpc.
ClosedPublic

Authored by jhb on Thu, Aug 31, 4:22 PM.

Details

Summary
  • Commit 0335ac6d12 fixes a build breakage on big-endian 64-bit platforms including MIPS and powerpc.
  • Restore a cast in the powerpc kgdb code incorrectly removed in r446852.

Diff Detail

Repository
rP FreeBSD ports repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
jhb created this revision.Thu, Aug 31, 4:22 PM
jhb added a comment.Thu, Aug 31, 4:24 PM

Andreas also has another change to force the use of GCC 6 since GCC 5 apparently isn't sufficient. I'm happy to add that in once I get more details back from Andreas (so this isn't commit-ready yet). Andreas is also still testing 32-bit powerpc (so far he has only built 64-bit powerpc).

Tested on both, 32-bit and 64-bit powerpc. With the below addition to the Makefile.

The error I had was this one:

./common/common-utils.h:101:12: error: 'std::to_string' has not been
declared

using std::to_string;

The snippet I added to the Makefile:

  • devel/gdb/Makefile (revision 449048)

+++ devel/gdb/Makefile (working copy)
@@ -93,6 +93,10 @@
CONFIGURE_TARGET= x86_64-portbld-freebsd${OSREL}
.endif

+.if ${COMPILER_TYPE} == gcc && ${COMPILER_VERSION} < 60
+CFLAGS+= -D_GLIBCXX_USE_C99
+.endif
+
.if ${COMPILER_TYPE} == "clang"
CFLAGS+= -Wno-extended-offsetof
.endif

jhb added a comment.Tue, Sep 12, 7:53 PM

Gerald Pfeifer has recently changed the default for USE_GCC to GCC 6 and will soon fix Uses/compiler.mk to use GCC 6 (instead of 5) for the C++14 case. At that point I think this patch can be committed as is.

olivier accepted this revision.Wed, Sep 13, 9:32 AM
This revision is now accepted and ready to land.Wed, Sep 13, 9:32 AM
pizzamig accepted this revision.Wed, Sep 13, 12:06 PM

I'll commit this patch as soon as possible

This revision was automatically updated to reflect the committed changes.