Skip to content

Commit

Permalink
add expat to gdb build
Browse files Browse the repository at this point in the history
  • Loading branch information
haarer committed May 7, 2024
1 parent 1e28ee6 commit 0e8d15f
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 21 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/buildtoolchain.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand Down Expand Up @@ -50,7 +50,7 @@ jobs:
uses: msys2/[email protected]
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: |
Expand Down
45 changes: 28 additions & 17 deletions buildtoolchain.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion install_req_pkg_ubuntu-latest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 !

Expand Down
4 changes: 3 additions & 1 deletion install_req_pkg_windows-latest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 0e8d15f

Please sign in to comment.