Skip to content

Commit 12e3ee3

Browse files
committed
Copy libgcc_s_sjlj-1.dll dependecy for mingw32 build
1 parent 517bcb9 commit 12e3ee3

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

package-avrdude.bash

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ elif [[ $OS == "Msys" || $OS == "Cygwin" ]] ; then
4747
export PATH=$PATH:/c/MinGW/bin/:/c/cygwin/bin/
4848
export CC="mingw32-gcc -m32"
4949
export CXX="mingw32-g++ -m32"
50+
export TARGET_OS="Windows"
5051
OUTPUT_TAG=i686-mingw32
5152

5253
elif [[ $OS == "Darwin" ]] ; then
@@ -70,6 +71,16 @@ rm -rf avrdude-6.3 libusb-1.0.20 libusb-compat-0.1.5 libusb-win32-bin-1.2.6.0 li
7071
./libelf-0.8.13.build.bash
7172
./avrdude-6.3.build.bash
7273

74+
if [[ $CROSS_COMPILE_HOST == "i686-w64-mingw32" ]] ; then
75+
# copy dependency libgcc_s_sjlj-1.dll into bin/ folder
76+
77+
# try to detect the location of libgcc_s_sjlj-1.dll
78+
# (maybe there is better way... feel free to submit a patch!)
79+
LTO_PATH=`i686-w64-mingw32-gcc -v 2>&1 | grep LTO | tr '=' ' ' | awk "{ print \\\$2; }"`
80+
DLL_PATH=`dirname $LTO_PATH`/libgcc_s_sjlj-1.dll
81+
cp $DLL_PATH objdir/bin
82+
fi
83+
7384
rm -f avrdude-${OUTPUT_VERSION}-${OUTPUT_TAG}.tar.bz2
7485
cp -a objdir avrdude
7586
tar -cjvf avrdude-${OUTPUT_VERSION}-${OUTPUT_TAG}.tar.bz2 avrdude

0 commit comments

Comments
 (0)