]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commit
binutils: File name too long causing failure to open temporary head file in dlltool
authorJiaying Song <jiaying.song.cn@windriver.com>
Wed, 5 Feb 2025 08:06:35 +0000 (16:06 +0800)
committerSteve Sakoman <steve@sakoman.com>
Wed, 5 Feb 2025 17:05:28 +0000 (09:05 -0800)
commit617df4ee1d6523ded43f156af8206dfca2c0c8ee
treecc9d6b1d3f13878cb0bd9f609d5c9e63fdc15c21
parente00920c55a44058e8d2b063bf865df11e59a6185
binutils: File name too long causing failure to open temporary head file in dlltool

During the execution of the command: i686-w64-mingw32-dlltool
--input-def $def_filepath --output-delaylib $filepath --dllname qemu.exe
An error occurred:
i686-w64-mingw32-dlltool: failed to open temporary head file: ..._w64_mingw32_nativesdk_qemu_8_2_2_build_plugins_libqemu_plugin_api_a_h.s

Due to the path length exceeding the Linux system's file name length
limit (NAME_MAX=255), the temporary file name generated by the
i686-w64-mingw32-dlltool command becomes too long to open. To address
this, a new temporary file name prefix is generated using tmp_prefix =
prefix_encode ("d", getpid()), ensuring that the file name does not
exceed the system's length limit.

Allow for "snnnnn.o" suffix when testing against NAME_MAX, and tidy
TMP_STUB handling by overwriting a prior nnnnn.o string rather than
copying the entire name.

Signed-off-by: Jiaying Song <jiaying.song.cn@windriver.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
meta/recipes-devtools/binutils/binutils-2.42.inc
meta/recipes-devtools/binutils/binutils/0017-dlltool-file-name-too-long.patch [new file with mode: 0644]