Skip to content

Commit

Permalink
Add GDB 12.1 build
Browse files Browse the repository at this point in the history
  • Loading branch information
xieyubo committed May 4, 2022
1 parent 998b738 commit 680d6a6
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 0 deletions.
6 changes: 6 additions & 0 deletions amd64/gdb-12-ubuntu/DEBIAN/control.m4
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Package: gdb-12-ubuntu-UBUNTUVERSION
Version: VERSION
Architecture: amd64
Maintainer: xyb <[email protected]>
Description: gdb VERSION build for ubuntu UBUNTUVERSION
Depends: libc6
27 changes: 27 additions & 0 deletions amd64/gdb-12-ubuntu/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
ARG UbuntuVersion=22.04

FROM ubuntu:$UbuntuVersion
ARG UbuntuVersion=22.04
ARG GdbVersion=12.1
ARG BuildVersion=1

RUN apt update && apt install -y \
build-essential \
m4 \
wget \
xz-utils \
libgmp-dev

RUN wget https://ftp.gnu.org/gnu/gdb/gdb-${GdbVersion}.tar.xz && \
xz -d gdb-${GdbVersion}.tar.xz && \
tar xf gdb-${GdbVersion}.tar

RUN cd gdb-${GdbVersion} && \
./configure && \
make -j`nproc` && \
make install-strip DESTDIR=/gdb-$GdbVersion-$BuildVersion-ubuntu-$UbuntuVersion

COPY DEBIAN/control.m4 /
RUN mkdir /gdb-$GdbVersion-$BuildVersion-ubuntu-$UbuntuVersion/DEBIAN
RUN m4 -P -DUBUNTUVERSION=$UbuntuVersion -DVERSION=$GdbVersion-$BuildVersion control.m4 > /gdb-$GdbVersion-$BuildVersion-ubuntu-$UbuntuVersion/DEBIAN/control
RUN dpkg-deb --build --root-owner-group /gdb-$GdbVersion-$BuildVersion-ubuntu-$UbuntuVersion

0 comments on commit 680d6a6

Please sign in to comment.