noux_build.patch

From: Christian Prochaska <christian.prochaska@genode-labs.com>


---
 gdb/configure             |   10 +++++-----
 gdb/dwarf2/index-write.c  |    2 +-
 gnulib/config.in          |    2 ++
 sim/common/Make-common.in |    2 +-
 4 files changed, 9 insertions(+), 7 deletions(-)

diff --git a/gdb/configure b/gdb/configure
index 03464ae5..6f705fc7 100755
--- a/gdb/configure
+++ b/gdb/configure
@@ -6699,11 +6699,11 @@ fi
 # configuration.
 gdb_host_obs=posix-hdep.o
 
-if test "${target}" = "${host}"; then
-  gdb_native=yes
-else
+#if test "${target}" = "${host}"; then
+#  gdb_native=yes
+#else
   gdb_native=no
-fi
+#fi
 
 . $srcdir/configure.host
 
@@ -14353,7 +14353,7 @@ sigjmp_buf env; while (! sigsetjmp (env, 1)) siglongjmp (env, 1);
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"; then :
   gdb_cv_func_sigsetjmp=yes
 else
   gdb_cv_func_sigsetjmp=no
diff --git a/gdb/dwarf2/index-write.c b/gdb/dwarf2/index-write.c
index 0079c0fe..376a9151 100644
--- a/gdb/dwarf2/index-write.c
+++ b/gdb/dwarf2/index-write.c
@@ -777,7 +777,7 @@ class debug_names
     gdb_assert (m_abbrev_table.empty ());
     const size_t name_count = m_name_to_value_set.size ();
     m_bucket_table.resize
-      (std::pow (2, std::ceil (std::log2 (name_count * 4 / 3))));
+      (std::pow (2, std::ceil (log2 (name_count * 4 / 3))));
     m_hash_table.reserve (name_count);
     m_name_table_string_offs.reserve (name_count);
     m_name_table_entry_offs.reserve (name_count);
diff --git a/gnulib/config.in b/gnulib/config.in
index d8a5e8be..cc1cc9fc 100644
--- a/gnulib/config.in
+++ b/gnulib/config.in
@@ -1192,6 +1192,7 @@
 /* Define to 1 to make NetBSD features available. MINIX 3 needs this. */
 #undef _NETBSD_SOURCE
 
+#if 0
 /* The _Noreturn keyword of C11.  */
 #ifndef _Noreturn
 # if (defined __cplusplus \
@@ -1220,6 +1221,7 @@
 #  define _Noreturn
 # endif
 #endif
+#endif
 
 
 /* Define to 2 if the system does not provide POSIX.1 features except with
diff --git a/sim/common/Make-common.in b/sim/common/Make-common.in
index 21e1d991..2ea1ab60 100644
--- a/sim/common/Make-common.in
+++ b/sim/common/Make-common.in
@@ -236,7 +236,7 @@ CSEARCH = -I. -I$(srcdir) -I../common -I$(srccom) \
   -I../../bfd -I$(srcroot)/bfd \
   -I../../opcodes -I$(srcroot)/opcodes \
   @INCINTL@
-ALL_CFLAGS = $(CONFIG_CFLAGS) $(CSEARCH) $(CFLAGS)
+ALL_CFLAGS = $(CONFIG_CFLAGS) $(CSEARCH) $(CPPFLAGS) $(CFLAGS)
 BUILD_CFLAGS = -g -O $(CSEARCH)
 
 COMMON_DEP_CFLAGS = $(CONFIG_CFLAGS) $(CSEARCH)
