]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Hack canonicalize_file_name (should be fixed in gnulib)
authorPedro Alves <pedro@palves.net>
Fri, 22 Mar 2024 16:27:01 +0000 (16:27 +0000)
committerPedro Alves <pedro@palves.net>
Mon, 9 Jun 2025 17:09:19 +0000 (18:09 +0100)
Needed when cross compiling.

The gnulib canonicalize_file_name override breaks finding cygwin1.dll.

When compiling natively, gnulib doesn't override
canonicalize_file_name, but gnulib has hardcoded defaults for cross
compiling, and the default is wrong for Cygwin.

Change-Id: Ief87ddf798c137fb6dff91fe0fa4c5ada6da1153

gdbsupport/pathstuff.cc

index ce01c95304881caf3cd1c634c87b144264291d49..ed2a3def8b1729ad861b575d4a0d02fb9af1f7a3 100644 (file)
@@ -72,7 +72,8 @@ gdb_realpath (const char *filename)
   }
 #else
   {
-    char *rp = canonicalize_file_name (filename);
+#undef canonicalize_file_name
+  char *rp = canonicalize_file_name (filename);
 
     if (rp != NULL)
       return gdb::unique_xmalloc_ptr<char> (rp);