Skip to content

Use musl finally #52

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 14 commits into from
Apr 25, 2025
Merged
Show file tree
Hide file tree
Changes from 13 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/workflows/pr-pipeline.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ on:

jobs:
build:
env:
TTY_ARG: "" # Disable interactive build mode in cicd since it does not contain a tty device.

strategy:
matrix:
build_type: ["build", "build-with-python"]
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/release-pipeline.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ on:
# simply build the files in the same job they are released.
jobs:
build_and_publish:
env:
TTY_ARG: "" # Disable interactive build mode in cicd since it does not contain a tty device.

runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand All @@ -27,4 +30,4 @@ jobs:
- name: Publish release
uses: softprops/action-gh-release@v2
with:
files: build/artifacts/gdb-static*.tar.gz
files: build/artifacts/gdb-static*.tar.gz
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,6 @@
[submodule "src/submodule_packages/libexpat"]
path = src/submodule_packages/libexpat
url = git@github.com:guyush1/libexpat.git
[submodule "xz"]
path = src/submodule_packages/xz
url = https://github.com/tukaani-project/xz.git
11 changes: 9 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
FROM ubuntu:24.04

# Install dependencies
RUN apt update && apt install -y \
autopoint \
binutils-multiarch \
bison \
file \
flex \
Expand All @@ -18,16 +19,22 @@ RUN apt update && apt install -y \
gcc-mipsel-linux-gnu \
gcc-powerpc-linux-gnu \
git \
libncurses-dev \
libtool \
m4 \
make \
patch \
pkg-config \
python3.12 \
python3-requests \
libpython3-dev \
texinfo \
wget \
xz-utils

COPY src/docker_utils/download_musl_toolchains.py .
RUN python3.12 -u download_musl_toolchains.py

WORKDIR /app/gdb

ENTRYPOINT ["/entrypoint.sh"]
CMD ["bash"]
10 changes: 7 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ ALL_PACK_TARGETS := $(PACK_TARGETS) $(PYTHON_PACK_TARGETS)
SUBMODULE_PACKAGES := $(wildcard src/submodule_packages/*)
BUILD_PACKAGES_DIR := "build/packages"

# We would like to run in interactive mode when avaliable (non-ci usually).
# This is disabled by the ci automation manually.
TTY_ARG ?= -it

.PHONY: clean help download_packages build build-docker-image $(ALL_TARGETS) $(ALL_PACK_TARGETS)

.NOTPARALLEL: build pack
Expand All @@ -27,7 +31,7 @@ help:
@echo ""
@echo " make clean"

build/build-docker-image.stamp: Dockerfile
build/build-docker-image.stamp: Dockerfile src/docker_utils/download_musl_toolchains.py
mkdir -p build
docker buildx build --tag gdb-static .
touch build/build-docker-image.stamp
Expand All @@ -36,7 +40,7 @@ build-docker-image: build/build-docker-image.stamp

build/download-packages.stamp: build/build-docker-image.stamp src/compilation/download_packages.sh
mkdir -p $(BUILD_PACKAGES_DIR)
docker run --user $(shell id -u):$(shell id -g) \
docker run $(TTY_ARG) --user $(shell id -u):$(shell id -g) \
--rm --volume .:/app/gdb gdb-static env TERM=xterm-256color \
/app/gdb/src/compilation/download_packages.sh /app/gdb/$(BUILD_PACKAGES_DIR)/
touch build/download-packages.stamp
Expand All @@ -59,7 +63,7 @@ $(PYTHON_TARGETS): build-with-python-%:

_build-%: symlink-git-packages download-packages build-docker-image
mkdir -p build
docker run --user $(shell id -u):$(shell id -g) \
docker run $(TTY_ARG) --user $(shell id -u):$(shell id -g) \
--rm --volume .:/app/gdb gdb-static env TERM=xterm-256color \
/app/gdb/src/compilation/build.sh $* /app/gdb/build/ /app/gdb/src $(WITH_PYTHON)

Expand Down
Loading