projects/guix·blob javascript-team · refs

31 lines · 960 B

1windres currently looks for gcc in this order:
2
3* target-prefixed gcc in same directory as windres
4* gcc in same directory as windres
5* gcc in PATH
6
7In case of cross compiling the unprefixed gcc is a native compiler
8and probably the wrong choice.
9
10This adds another option to look for a target-prefixed gcc in PATH
11in case binutils and gcc are installed in different prefixes.
12
13Index: binutils-2.44/binutils/resrc.c
14===================================================================
15--- binutils-2.44.orig/binutils/resrc.c
16+++ binutils-2.44/binutils/resrc.c
17@@ -535,6 +535,14 @@ read_rc_file (const char *filename, cons
18 preprocargs, filename);
19 }
20
21+ if (slash && dash && (dash > slash) && ! cpp_pipe)
22+ {
23+ /* Try prefixed gcc with the same prefix as windres */
24+
25+ cpp_pipe = look_for_default (cmd, slash + 1, dash - (slash + 1) + 1,
26+ preprocargs, filename);
27+ }
28+
29 if (! cpp_pipe)
30 {
31 /* Sigh, try the default */