Skip to content

Commit b94d90d

Browse files
committed
Introduce libiconv for GDB 12+
As of GDB 12.1, libiconv is a mandatory dependency on Windows. As with Expat, this fact is undocumented. GDB builds successfully without but that build is broken and practically useless. This dependency introduces no new features nor makes GDB work better (i.e. GDB still cannot display non-ASCII strings). It is necessary only to retain the capabilities already present in GDB 11 an earlier.
1 parent 1c7435d commit b94d90d

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

Dockerfile

+15
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ ARG EXPAT_VERSION=2.5.0
99
ARG GCC_VERSION=12.2.0
1010
ARG GDB_VERSION=11.2
1111
ARG GMP_VERSION=6.2.1
12+
ARG LIBICONV_VERSION=1.17
1213
ARG MAKE_VERSION=4.4
1314
ARG MINGW_VERSION=10.0.0
1415
ARG MPC_VERSION=1.2.1
@@ -32,6 +33,7 @@ RUN curl --insecure --location --remote-name-all --remote-header-name \
3233
https://ftp.gnu.org/gnu/mpc/mpc-$MPC_VERSION.tar.gz \
3334
https://ftp.gnu.org/gnu/mpfr/mpfr-$MPFR_VERSION.tar.xz \
3435
https://ftp.gnu.org/gnu/make/make-$MAKE_VERSION.tar.gz \
36+
https://ftp.gnu.org/gnu/libiconv/libiconv-$LIBICONV_VERSION.tar.gz \
3537
https://frippery.org/files/busybox/busybox-w32-$BUSYBOX_VERSION.tgz \
3638
http://ftp.vim.org/pub/vim/unix/vim-$VIM_VERSION.tar.bz2 \
3739
https://www.nasm.us/pub/nasm/releasebuilds/$NASM_VERSION/nasm-$NASM_VERSION.tar.xz \
@@ -47,6 +49,7 @@ RUN sha256sum -c $PREFIX/src/SHA256SUMS \
4749
&& tar xJf gcc-$GCC_VERSION.tar.xz \
4850
&& tar xJf gdb-$GDB_VERSION.tar.xz \
4951
&& tar xJf expat-$EXPAT_VERSION.tar.xz \
52+
&& tar xzf libiconv-$LIBICONV_VERSION.tar.gz \
5053
&& tar xJf gmp-$GMP_VERSION.tar.xz \
5154
&& tar xzf mpc-$MPC_VERSION.tar.gz \
5255
&& tar xJf mpfr-$MPFR_VERSION.tar.xz \
@@ -325,12 +328,24 @@ RUN make -j$(nproc) -C wincon \
325328
&& cp wincon/pdcurses.a /deps/lib/libcurses.a \
326329
&& cp curses.h /deps/include
327330

331+
WORKDIR /libiconv
332+
RUN /libiconv-$LIBICONV_VERSION/configure \
333+
--prefix=/deps \
334+
--host=$ARCH \
335+
--disable-nls \
336+
--disable-shared \
337+
CFLAGS="-Os" \
338+
LDFLAGS="-s" \
339+
&& make -j$(nproc) \
340+
&& make install
341+
328342
WORKDIR /gdb
329343
RUN sed -i 's/quiet = 0/quiet = 1/' /gdb-$GDB_VERSION/gdb/main.c \
330344
&& /gdb-$GDB_VERSION/configure \
331345
--host=$ARCH \
332346
--with-libexpat-prefix=/deps \
333347
--with-libgmp-prefix=/deps \
348+
--with-libiconv-prefix=/deps \
334349
--enable-tui \
335350
CFLAGS="-Os -D_WIN32_WINNT=0x502 -DPDC_WIDE" \
336351
CXXFLAGS="-Os -DPDC_WIDE" \

src/SHA256SUMS

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ ef2420f0232c087801abf705e89ae65f6257df6b7931d37846a193ef2e8cdcbe expat-2.5.0.ta
55
e549cf9cf3594a00e27b6589d4322d70e0720cdd213f39beb4181e06926230ff gcc-12.2.0.tar.xz
66
1497c36a71881b8671a9a84a0ee40faab788ca30d7ba19d8463c3cc787152e32 gdb-11.2.tar.xz
77
fd4829912cddd12f84181c3451cc752be224643e87fac497b69edddadc49b4f2 gmp-6.2.1.tar.xz
8+
8f74213b56238c85a50a5329f77e06198771e70dd9a739779f4c02f65d971313 libiconv-1.17.tar.gz
89
581f4d4e872da74b3941c874215898a7d35802f03732bdccee1d4a7979105d18 make-4.4.tar.gz
910
ba6b430aed72c63a3768531f6a3ffc2b0fde2c57a3b251450dcf489a894f0894 mingw-w64-v10.0.0.tar.bz2
1011
17503d2c395dfcf106b622dc142683c1199431d095367c6aacba6eec30340459 mpc-1.2.1.tar.gz

0 commit comments

Comments
 (0)