Skip to contentSkip to conversation

package/gdb: fix gnulib issue with musl and uClibc toolchains

PATCH New Romain Naour 2 participants 2 messages Jul 24, 2016

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 package/gdb: fix gnulib issue with musl and uClibc toolchains

Starting with gdb 7.11, the bundled gnulib want to use rpl_gettimeofday (gettimeofday replacement) due bad guessing when cross-compiling with musl and uClibc toolchains. Instead of patching gnulib configure script to fix the test, use gl_cv_func_gettimeofday_clobber=no to not use rpl_gettimeofday.

Thanks to Thomas Petazzoni to suggest this patch.

Reported upstream:
https://sourceware.org/bugzilla/show_bug.cgi?id=19798

Cc Thomas Petazzoni <[email protected]>

---
v2: Use gl_cv_func_gettimeofday_clobber=no instead of patching gnulib.

---
 package/gdb/gdb.mk | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
package/gdb/gdb.mk +6 -1
index 1e23e5a..1386006 100644
@@ -68,6 +68,10 @@ GDB_DISABLE_BINUTILS_CONF_OPTS = \
 	--disable-ld \
 	--disable-gas
 
+# Starting with gdb 7.11, the bundled gnulib want to use rpl_gettimeofday
+# (gettimeofday replacement) due bad guessing when cross-compiling with musl
+# and uClibc toolchains. So use gl_cv_func_gettimeofday_clobber=no to not
+# use rpl_gettimeofday.
 GDB_CONF_ENV = \
 	ac_cv_type_uintptr_t=yes \
 	gt_cv_func_gettext_libintl=yes \
@@ -77,7 +81,8 @@ GDB_CONF_ENV = \
 	bash_cv_must_reinstall_sighandlers=no \
 	bash_cv_func_sigsetjmp=present \
 	bash_cv_have_mbstate_t=yes \
-	gdb_cv_func_sigsetjmp=yes
+	gdb_cv_func_sigsetjmp=yes \
+	gl_cv_func_gettimeofday_clobber=no
 
 # The shared only build is not supported by gdb, so enable static build for
 # build-in libraries with --enable-static.
Signature · 1 line
2.5.5
#1 lore raw

PATCH v2 1/1 package/gdb: fix gnulib issue with musl and uClibc toolchains

Hello,

Quoted 10 lines · Romain Naour

Starting with gdb 7.11, the bundled gnulib want to use rpl_gettimeofday (gettimeofday replacement) due bad guessing when cross-compiling with musl and uClibc toolchains. Instead of patching gnulib configure script to fix the test, use gl_cv_func_gettimeofday_clobber=no to not use rpl_gettimeofday.

Thanks to Thomas Petazzoni to suggest this patch.

Reported upstream:
https://sourceware.org/bugzilla/show_bug.cgi?id=19798

Quoted 7 lines
Cc Thomas Petazzoni <[email protected]>

---
v2: Use gl_cv_func_gettimeofday_clobber=no instead of patching gnulib.

---
 package/gdb/gdb.mk | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

I've slightly improved the comment in the code and applied. Thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com