nixpkgs/pkgs/development/tools/misc/binutils/2.38/windres-locate-gcc.patch
Sergei Trofimovich 7fe41f922e libbfd_2_38, libopcodes_2_38: create held back release
2.39 has an API breakage that will take users some time to migrate.
Create _2_38 versions to allow them to hand on an old version for a
while.
2022-08-23 19:56:03 +01:00

20 lines
653 B
Diff

diff --git a/binutils/resrc.c b/binutils/resrc.c
index a875c3a4..0411d047 100644
--- a/binutils/resrc.c
+++ b/binutils/resrc.c
@@ -521,7 +521,13 @@ read_rc_file (const char *filename, const char *preprocessor,
cpp_pipe = 0;
- if (dash)
+ /* Nixpkgs specific : look first at the prefixed path
+ ( there should be no gcc in the binutils folder ) */
+ if (slash && dash) {
+ cpp_pipe = look_for_default(cmd, slash + 1, dash - slash, preprocargs, filename);
+ }
+
+ if (dash && ! cpp_pipe)
{
/* First, try looking for a prefixed gcc in the windres
directory, with the same prefix as windres */