arm-none-eabi-gcc.exe depends on libgcc_s_sjlj-1.dll

Bug #1941899 reported by Volodymyr Medvid
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
GNU Arm Embedded Toolchain
New
Undecided
Unassigned

Bug Description

Custom build of GNU Arm Embedded Toolchain 10.3-2021.07 on Ubuntu 18.04 host with MinGW 7.3-win32 toolchain produces GCC windows binaries that cannot be executed on Windows due to missing libgcc_s_sjlj-1.dll dependency. For example, executing arm-none-eabi-gcc.exe emits an error:

The code execution cannot proceed because libgcc_s_sjlj-1.dll was not found. Reinstalling the program may fix this problem.

Build environment (configured according to How-to-build-toolchain.pdf):
Ubuntu 18.04 with i686-w64-mingw32-gcc (GCC) 7.3-win32 20180312.

Run environment:
Windows 10 x64

I was able to address the issue by adding "--disable-sjlj-exceptions" to the mingw GCC configure options in build-toolchain.sh

Revision history for this message
Volodymyr Medvid (vmm) wrote :
Revision history for this message
Volodymyr Medvid (vmm) wrote :

I analyzed this issue in depth and discovered that the root cause of arm-none-eabi-gcc.exe being linked dynamically against libgcc_s_sjlj-1.dll and libstdc++6.dll was not related to GCC configure flags like "--disable-sjlj-exceptions". In my local build (driven by build-toolchain.sh), "make all-gcc" was followed by "make install-gcc" - the install target triggered rebuild of all toolchain binaries due to incorrect timestamp of one of the prerequisite libraries (the issue is visible in the build log as make warning "file has modification time in the future"). The binaries produced by "make all-gcc" were linked statically against the mingw runtime libraries, while the binaries produced by "make install-gcc" - linked dynamically for unidentified reason. Once I fixed my build scripts to avoid the make timestamp issue, "install-gcc" no longer replaced static binaries with dynamic binaries, and the resulting toolchain was correct.

Please close this ticket as there is no issue in GCC configure scripts and build scripts in Arm source package.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.