mirror of
https://git.savannah.gnu.org/git/guix.git
synced 2026-04-07 05:30:38 +02:00
* gnu/packages/cross-base.scm (cross-binutils*): Add patch for mingw targets. * gnu/packages/patches/binutils-cross-windres.patch: New patch. * gnu/local.mk (dis_patch_DATA): Register patch. Change-Id: I5e7a53a02dccc9eadef539b0e4566c05791872cd Signed-off-by: Ludovic Courtès <ludo@gnu.org> Merges: #6642
32 lines
960 B
Diff
32 lines
960 B
Diff
windres currently looks for gcc in this order:
|
|
|
|
* target-prefixed gcc in same directory as windres
|
|
* gcc in same directory as windres
|
|
* gcc in PATH
|
|
|
|
In case of cross compiling the unprefixed gcc is a native compiler
|
|
and probably the wrong choice.
|
|
|
|
This adds another option to look for a target-prefixed gcc in PATH
|
|
in case binutils and gcc are installed in different prefixes.
|
|
|
|
Index: binutils-2.44/binutils/resrc.c
|
|
===================================================================
|
|
--- binutils-2.44.orig/binutils/resrc.c
|
|
+++ binutils-2.44/binutils/resrc.c
|
|
@@ -535,6 +535,14 @@ read_rc_file (const char *filename, cons
|
|
preprocargs, filename);
|
|
}
|
|
|
|
+ if (slash && dash && (dash > slash) && ! cpp_pipe)
|
|
+ {
|
|
+ /* Try prefixed gcc with the same prefix as windres */
|
|
+
|
|
+ cpp_pipe = look_for_default (cmd, slash + 1, dash - (slash + 1) + 1,
|
|
+ preprocargs, filename);
|
|
+ }
|
|
+
|
|
if (! cpp_pipe)
|
|
{
|
|
/* Sigh, try the default */
|