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 gdb/19798] New: GDB server 7.11 doesn't build with uClibc-ng or musl based toolchains


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

            Bug ID: 19798
           Summary: GDB server 7.11 doesn't build with uClibc-ng or musl
                    based toolchains
           Product: gdb
           Version: 7.11
            Status: NEW
          Severity: normal
          Priority: P2
         Component: gdb
          Assignee: unassigned at sourceware dot org
          Reporter: romain.naour at gmail dot com
  Target Milestone: ---

Hi,

Since the recent gnulib update in gdb [1], gdbserver fail to build with a musl
or uClibc-ng libc based toolchains with:

x86_64-linux-musl-gcc -shared -fPIC -Wl,--no-undefined -D_LARGEFILE_SOURCE \
-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64  -Os     -I. -I. -I./../common \
-I./../regformats -I./.. -I./../../include -I./../gnulib/import \
-Ibuild-gnulib-gdbserver/import  -Wall -Wpointer-arith -Wno-unused \
-Wunused-value -Wunused-function -Wno-switch -Wno-char-subscripts -Wempty-body
\
-Wpointer-sign -Wmissing-prototypes -Wdeclaration-after-statement \
-Wmissing-parameter-type -Wold-style-declaration -Wold-style-definition \
-Wformat-nonliteral -Wno-missing-prototypes  -DGDBSERVER -static-libstdc++ \
-static-libgcc  -Wl,--dynamic-list=./proc-service.list -o libinproctrace.so \
ax-ipa.o tracepoint-ipa.o format-ipa.o utils-ipa.o regcache-ipa.o \
remote-utils-ipa.o common-utils-ipa.o tdesc-ipa.o print-utils-ipa.o \
rsp-low-ipa.o errors-ipa.o amd64-linux-ipa.o amd64-avx-linux-ipa.o \
amd64-avx512-linux-ipa.o amd64-mpx-linux-ipa.o linux-amd64-ipa.o -ldl -pthread
tracepoint-ipa.o: In function `get_timestamp':
tracepoint.c:(.text+0x147): undefined reference to `rpl_gettimeofday'

This is during libinproctrace.so build.

The issue seems related to gnulib gl_cv_func_gettimeofday_clobber check which
was fixed for glibc toolchain [2]. The default assumption while cross-compiling
seems wrong since it set REPLACE_GETTIMEOFDAY and replace gettimeofday by
rpl_gettimeofday when *-gnu* suffix is missing.

Best regards,
Romain Naour

[1]
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commitdiff;h=4a626d0a0f451c3288a461f64a9f8a49790d422b

[2]
http://git.savannah.gnu.org/cgit/gnulib.git/commit/?id=b2234a55a9065eeb2aba8d26706c63facd34f3ef

-- 
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]