diff --git a/darwin/Dockerfile b/darwin/Dockerfile index e49404c..2e12134 100644 --- a/darwin/Dockerfile +++ b/darwin/Dockerfile @@ -26,6 +26,8 @@ RUN relink.sh /toolchain/mac-x86_64-output-root RUN relink.sh /toolchain/mac-arm64-output-root FROM flipperzero-toolchain-binutils AS flipperzero-toolchain-gdb +ADD https://ftp.gnu.org/gnu/gdb/gdb-13.2.tar.gz /toolchain/src/src/archives +RUN tar -xvf /toolchain/src/src/archives/gdb-13.2.tar.gz -C /toolchain/src/src/ COPY --from=flipperzero-toolchain-python /toolchain/mac-x86_64-output-root /toolchain/mac-x86_64-output-root COPY --from=flipperzero-toolchain-python /toolchain/mac-arm64-output-root /toolchain/mac-arm64-output-root ADD scripts/build-mac-gdb.sh /toolchain/src/ diff --git a/darwin/scripts/build-mac-gdb.sh b/darwin/scripts/build-mac-gdb.sh index b1a2e47..6587187 100755 --- a/darwin/scripts/build-mac-gdb.sh +++ b/darwin/scripts/build-mac-gdb.sh @@ -21,7 +21,7 @@ function build_gdb_x86_64() { CFLAGS="$MAC_X86_64_FLAGS" \ LDFLAGS="$MAC_X86_64_FLAGS" \ DYLD_LIBRARY_PATH="$MAC_X86_64_OUTPUT_ROOT/lib" \ - /toolchain/src/src/binutils-gdb/configure \ + "/toolchain/src/src/gdb-13.2/configure" \ --enable-initfini-array \ --disable-werror \ --enable-tui \ @@ -80,7 +80,7 @@ function build_gdb_arm64() { CFLAGS="$MAC_ARM64_FLAGS" \ LDFLAGS="$MAC_ARM64_FLAGS" \ DYLD_LIBRARY_PATH="$MAC_ARM64_OUTPUT_ROOT/lib" \ - /toolchain/src/src/binutils-gdb/configure \ + "/toolchain/src/src/gdb-13.2/configure" \ --enable-initfini-array \ --disable-werror \ --enable-tui \ @@ -138,7 +138,7 @@ function build_gdb_py_x86_64() { CFLAGS="$MAC_X86_64_FLAGS" \ LDFLAGS="$MAC_X86_64_FLAGS" \ DYLD_LIBRARY_PATH="$MAC_X86_64_OUTPUT_ROOT/lib" \ - /toolchain/src/src/binutils-gdb/configure \ + "/toolchain/src/src/gdb-13.2/configure" \ --enable-initfini-array \ --disable-werror \ --enable-tui \ @@ -199,7 +199,7 @@ function build_gdb_py_arm64() { CFLAGS="$MAC_ARM64_FLAGS" \ LDFLAGS="$MAC_ARM64_FLAGS" \ DYLD_LIBRARY_PATH="$MAC_ARM64_OUTPUT_ROOT/lib" \ - /toolchain/src/src/binutils-gdb/configure \ + "/toolchain/src/src/gdb-13.2/configure" \ --enable-initfini-array \ --disable-werror \ --enable-tui \ diff --git a/linux/Dockerfile-aarch64 b/linux/Dockerfile-aarch64 index 4c1bf65..d86bec0 100644 --- a/linux/Dockerfile-aarch64 +++ b/linux/Dockerfile-aarch64 @@ -41,9 +41,11 @@ ADD scripts/build-linux-binutils.sh /toolchain/src/ RUN bash /toolchain/src/build-linux-binutils.sh FROM flipperzero-toolchain-linux-build-deps AS flipperzero-toolchain-linux-gdb +ADD https://ftp.gnu.org/gnu/gdb/gdb-13.2.tar.gz /toolchain/src/src/archives +RUN tar -xvf /toolchain/src/src/archives/gdb-13.2.tar.gz -C /toolchain/src/src/ COPY --from=flipperzero-toolchain-linux-python /toolchain/linux-output-root /toolchain/linux-output-root ADD scripts/relink.sh /usr/bin/ -ADD patch/gdb_curses.h /toolchain/src/src/binutils-gdb/gdb/ +ADD patch/gdb_curses.h /toolchain/src/src/gdb-13.2/gdb/ ADD scripts/build-linux-gdb.sh /toolchain/src/ RUN bash /toolchain/src/build-linux-gdb.sh diff --git a/linux/Dockerfile-x86_64 b/linux/Dockerfile-x86_64 index 19cfc3d..094347b 100644 --- a/linux/Dockerfile-x86_64 +++ b/linux/Dockerfile-x86_64 @@ -41,9 +41,11 @@ ADD scripts/build-linux-binutils.sh /toolchain/src/ RUN bash /toolchain/src/build-linux-binutils.sh FROM flipperzero-toolchain-linux-build-deps AS flipperzero-toolchain-linux-gdb +ADD https://ftp.gnu.org/gnu/gdb/gdb-13.2.tar.gz /toolchain/src/src/archives +RUN tar -xvf /toolchain/src/src/archives/gdb-13.2.tar.gz -C /toolchain/src/src/ COPY --from=flipperzero-toolchain-linux-python /toolchain/linux-output-root /toolchain/linux-output-root ADD scripts/relink.sh /usr/bin/ -ADD patch/gdb_curses.h /toolchain/src/src/binutils-gdb/gdb/ +ADD patch/gdb_curses.h /toolchain/src/src/gdb-13.2/gdb/ ADD scripts/build-linux-gdb.sh /toolchain/src/ RUN bash /toolchain/src/build-linux-gdb.sh diff --git a/linux/scripts/build-linux-gdb.sh b/linux/scripts/build-linux-gdb.sh index af5eea6..ca3fcae 100644 --- a/linux/scripts/build-linux-gdb.sh +++ b/linux/scripts/build-linux-gdb.sh @@ -23,7 +23,7 @@ function build_linux_gdb() { rm -rf "$LINUX_CONFIGURE_ROOT/gdb"; mkdir -p "$LINUX_CONFIGURE_ROOT/gdb"; pushd "$LINUX_CONFIGURE_ROOT/gdb"; - LDFLAGS="-L$LINUX_BUILD_ROOT/lib -L$LINUX_OUTPUT_ROOT/lib" CPPFLAGS="-I$LINUX_BUILD_ROOT/include -I$LINUX_OUTPUT_ROOT/include -I$LINUX_OUTPUT_ROOT/include/readline" LD_LIBRARY_PATH="LINUX_OUTPUT_ROOT/lib" /toolchain/src/src/binutils-gdb/configure \ + LDFLAGS="-L$LINUX_BUILD_ROOT/lib -L$LINUX_OUTPUT_ROOT/lib" CPPFLAGS="-I$LINUX_BUILD_ROOT/include -I$LINUX_OUTPUT_ROOT/include -I$LINUX_OUTPUT_ROOT/include/readline" LD_LIBRARY_PATH="LINUX_OUTPUT_ROOT/lib" "/toolchain/src/src/gdb-13.2/configure" \ --enable-initfini-array \ --enable-tui \ --disable-nls \ @@ -69,7 +69,7 @@ function build_linux_gdb_py() { rm -rf "$LINUX_CONFIGURE_ROOT/gdb-py"; mkdir -p "$LINUX_CONFIGURE_ROOT/gdb-py"; pushd "$LINUX_CONFIGURE_ROOT/gdb-py"; - LDFLAGS="-L$LINUX_BUILD_ROOT/lib -L$LINUX_OUTPUT_ROOT/lib" CPPFLAGS="-I$LINUX_BUILD_ROOT/include -I$LINUX_OUTPUT_ROOT/include -I$LINUX_OUTPUT_ROOT/include/readline" LD_LIBRARY_PATH="LINUX_OUTPUT_ROOT/lib" /toolchain/src/src/binutils-gdb/configure \ + LDFLAGS="-L$LINUX_BUILD_ROOT/lib -L$LINUX_OUTPUT_ROOT/lib" CPPFLAGS="-I$LINUX_BUILD_ROOT/include -I$LINUX_OUTPUT_ROOT/include -I$LINUX_OUTPUT_ROOT/include/readline" LD_LIBRARY_PATH="LINUX_OUTPUT_ROOT/lib" "/toolchain/src/src/gdb-13.2/configure" \ --enable-initfini-array \ --enable-tui \ --disable-nls \ diff --git a/windows/Dockerfile b/windows/Dockerfile index c16b43e..e27da04 100644 --- a/windows/Dockerfile +++ b/windows/Dockerfile @@ -36,6 +36,8 @@ ADD scripts/unpack-windows-python-wine.sh /toolchain/src/ RUN bash /toolchain/src/unpack-windows-python-wine.sh FROM flipperzero-toolchain-windows-binutils AS flipperzero-toolchain-windows-gdb +ADD https://ftp.gnu.org/gnu/gdb/gdb-13.2.tar.gz /toolchain/src/src/archives +RUN tar -xvf /toolchain/src/src/archives/gdb-13.2.tar.gz -C /toolchain/src/src/ COPY --from=flipperzero-toolchain-windows-python /toolchain/windows-output-root/python /toolchain/windows-output-root/python ADD scripts/python3-config-windows-x86_64.sh /toolchain/src/ ADD scripts/build-windows-gdb.sh /toolchain/src/ diff --git a/windows/scripts/build-windows-gdb.sh b/windows/scripts/build-windows-gdb.sh index 8ce68c1..fd39640 100755 --- a/windows/scripts/build-windows-gdb.sh +++ b/windows/scripts/build-windows-gdb.sh @@ -12,7 +12,7 @@ build_windows_gdb() { rm -rf "$WINDOWS_CONFIGURE_ROOT/gdb"; mkdir -p "$WINDOWS_CONFIGURE_ROOT/gdb"; pushd "$WINDOWS_CONFIGURE_ROOT/gdb"; - LDFLAGS="-L$WINDOWS_BUILD_ROOT/lib -L$WINDOWS_OUTPUT_ROOT/lib" CPPFLAGS="-I$WINDOWS_BUILD_ROOT/include -I$WINDOWS_OUTPUT_ROOT/include -I$WINDOWS_OUTPUT_ROOT/include/readline" "/toolchain/src/src/binutils-gdb/configure" \ + LDFLAGS="-L$WINDOWS_BUILD_ROOT/lib -L$WINDOWS_OUTPUT_ROOT/lib" CPPFLAGS="-I$WINDOWS_BUILD_ROOT/include -I$WINDOWS_OUTPUT_ROOT/include -I$WINDOWS_OUTPUT_ROOT/include/readline" "/toolchain/src/src/gdb-13.2/configure" \ --host=x86_64-w64-mingw32 \ --target=arm-none-eabi \ --enable-initfini-array \ @@ -60,7 +60,7 @@ build_windows_gdb_py() { rm -rf "$WINDOWS_CONFIGURE_ROOT/gdb-py"; mkdir -p "$WINDOWS_CONFIGURE_ROOT/gdb-py"; pushd "$WINDOWS_CONFIGURE_ROOT/gdb-py"; - LDFLAGS="-L$WINDOWS_BUILD_ROOT/lib -L$WINDOWS_OUTPUT_ROOT/lib" CPPFLAGS="-I$WINDOWS_BUILD_ROOT/include -I$WINDOWS_OUTPUT_ROOT/include -I$WINDOWS_OUTPUT_ROOT/include/readline" "/toolchain/src/src/binutils-gdb/configure" \ + LDFLAGS="-L$WINDOWS_BUILD_ROOT/lib -L$WINDOWS_OUTPUT_ROOT/lib" CPPFLAGS="-I$WINDOWS_BUILD_ROOT/include -I$WINDOWS_OUTPUT_ROOT/include -I$WINDOWS_OUTPUT_ROOT/include/readline" "/toolchain/src/src/gdb-13.2/configure" \ --host=x86_64-w64-mingw32 \ --target=arm-none-eabi \ --enable-initfini-array \