| 1 | windres 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 |
|
| 7 | In case of cross compiling the unprefixed gcc is a native compiler
|
| 8 | and probably the wrong choice.
|
| 9 |
|
| 10 | This adds another option to look for a target-prefixed gcc in PATH
|
| 11 | in case binutils and gcc are installed in different prefixes.
|
| 12 |
|
| 13 | Index: binutils-2.44/binutils/resrc.c
|
| 14 | ===================================================================
|
| 15 | |
| 16 | |
| 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 */
|