From 0e8d15fc379f8bf2913cfa88d354f800dff863ed Mon Sep 17 00:00:00 2001 From: haarer Date: Wed, 8 May 2024 01:33:13 +0200 Subject: [PATCH] add expat to gdb build --- .github/workflows/buildtoolchain.yml | 4 +-- buildtoolchain.sh | 45 +++++++++++++++++----------- install_req_pkg_ubuntu-latest.sh | 2 +- install_req_pkg_windows-latest.sh | 4 ++- 4 files changed, 34 insertions(+), 21 deletions(-) diff --git a/.github/workflows/buildtoolchain.yml b/.github/workflows/buildtoolchain.yml index 03e8e79..37353f7 100644 --- a/.github/workflows/buildtoolchain.yml +++ b/.github/workflows/buildtoolchain.yml @@ -15,7 +15,7 @@ jobs: submodules: "recursive" - name: Install dependencies run: | - sudo apt-get install wget bzip2 xz-utils unzip git make tar flex bison diffutils texinfo gcc g++ + sudo apt-get install wget bzip2 xz-utils unzip git make tar flex bison diffutils texinfo gcc g++ libexpat-dev shell: bash - name: Build toolchain run: | @@ -50,7 +50,7 @@ jobs: uses: msys2/setup-msys2@v2.22.0 with: msystem: MINGW64 - install: git mingw-w64-x86_64-toolchain make wget bzip2 tar flex bison unzip diffutils texinfo autoconf patch + install: git mingw-w64-x86_64-toolchain make wget bzip2 tar flex bison unzip diffutils texinfo autoconf patch libexpat-devel update: true - name: Build toolchain run: | diff --git a/buildtoolchain.sh b/buildtoolchain.sh index c79571b..92743ff 100755 --- a/buildtoolchain.sh +++ b/buildtoolchain.sh @@ -269,7 +269,7 @@ function make_pio_package () { if [[ $OS = windows* ]]; then EXECUTEABLESUFFIX=".exe" echo "on windows, copy msys2 dlls" - for DLLFILE in msys-gcc_s-seh-1.dll msys-2.0.dll + for DLLFILE in msys-gcc_s-seh-1.dll msys-2.0.dll msys-stdc++-6.dll do cp /usr/bin/$DLLFILE $HOSTINSTALLPATH/bin done @@ -325,6 +325,26 @@ EOFLINUXVARIANT } +function build_gdb () { +#--------------------------------------------------------------------------------- +#build gdb + +log_msg ">>>> build gdb" + + + +GDBFLAGS+=" --target=$TARGETARCHITECTURE \ + --prefix=$HOSTINSTALLPATH/ \ + --with-gmp=$PREREQPATH/$GMPVER \ + --with-mpfr=$PREREQPATH/$MPFRVER \ + --with-expat + " + + +conf_compile_source $GDBVER "$HOSTINSTALLPATH/bin/$TARGETARCHITECTURE-gdb$EXECUTEABLESUFFIX" "$GDBFLAGS" +} + + if [ "$ACTION" = "purge" ]; then rm -rf $HOSTINSTALLPATH rm $ROOTDIR/*.log @@ -345,6 +365,12 @@ if [ "$ACTION" = "download" ]; then exit 0 fi +if [ "$ACTION" = "build_gdb" ]; then + build_gdb + exit 0 +fi + + if [ "$ACTION" = "package" ]; then make_pio_package exit 0 @@ -632,22 +658,7 @@ log_msg "install $SOURCEPACKAGE finished" popd > /dev/null - -#--------------------------------------------------------------------------------- -#build gdb - -log_msg ">>>> build gdb" - - - -GDBFLAGS+=" --target=$TARGETARCHITECTURE \ - --prefix=$HOSTINSTALLPATH/ \ - --with-gmp=$PREREQPATH/$GMPVER \ - --with-mpfr=$PREREQPATH/$MPFRVER \ - " - - -conf_compile_source $GDBVER "$HOSTINSTALLPATH/bin/$TARGETARCHITECTURE-gdb$EXECUTEABLESUFFIX" "$GDBFLAGS" +build_gdb make_pio_package diff --git a/install_req_pkg_ubuntu-latest.sh b/install_req_pkg_ubuntu-latest.sh index 03127a7..ac41c25 100644 --- a/install_req_pkg_ubuntu-latest.sh +++ b/install_req_pkg_ubuntu-latest.sh @@ -3,7 +3,7 @@ # add your user to the sudoers # debian -sudo apt-get install wget bzip2 xz-utils unzip git make tar flex bison diffutils texinfo gcc g++ +sudo apt-get install wget bzip2 xz-utils unzip git make tar flex bison diffutils texinfo gcc g++ libexpat-dev # ubuntu same ? - replace this by docker configurations ! diff --git a/install_req_pkg_windows-latest.sh b/install_req_pkg_windows-latest.sh index a46f087..1d901c9 100644 --- a/install_req_pkg_windows-latest.sh +++ b/install_req_pkg_windows-latest.sh @@ -3,13 +3,15 @@ # please use the MSYS2 shell, not the UCRT shell. # # install MSYS2 package requirement for building the tool chain -pacman -S --needed --noconfirm git msys2-runtime unzip make tar flex bison diffutils texinfo patch mingw-w64-x86_64-gcc mingw-w64-x86_64-libmangle-git mingw-w64-x86_64-make mingw-w64-x86_64-pkg-config mingw-w64-x86_64-tools-git mingw-w64-x86_64-winstorecompat-git +pacman -S --needed --noconfirm git msys2-runtime unzip make tar flex bison diffutils texinfo patch mingw-w64-x86_64-gcc mingw-w64-x86_64-libmangle-git mingw-w64-x86_64-make mingw-w64-x86_64-pkg-config mingw-w64-x86_64-tools-git mingw-w64-x86_64-winstorecompat-git libexpat-devel ## all after this is only needed if avrdude shall use usb devices # pull additonal libraries (avrdude) #pacman -S --needed mingw-w64-x86_64-libusb mingw-w64-x86_64-libusb-compat-git mingw-w64-x86_64-libftdi cmake +#mingw-w64-x86_64-libusb + # nomally the avrdude should be updated to use the new libusb-1.0 but ... # # quick and dirty hack: patch up msys - there is an usb.h in the include path that shadows the usb.h