[committed] hppa64: Search for milli.a archive

Message ID adFUSoNzPhV5SFl7@mx3210.local
State New
Headers
Series [committed] hppa64: Search for milli.a archive |

Checks

Context Check Description
linaro-tcwg-bot/tcwg_binutils_build--master-arm fail Patch failed to apply
linaro-tcwg-bot/tcwg_binutils_build--master-aarch64 fail Patch failed to apply

Commit Message

John David Anglin April 4, 2026, 6:11 p.m. UTC
  Tested on hppa64-hp-hpux11.11 and a x86_64-pc-linux-gnu cross.
Committed to trunk.

Dave
---

hppa64: Search for milli.a archive

Instead of hard coding the path to milli.a, add the input file
as a lang_input_file_is_search_file_enum.  This allows adding
a dummy archive in the testsuite.

2026-04-04  John David Anglin  <danglin@gcc.gnu.org>

ld/ChangeLog:

	* emultempl/hppa64elf.em (hppa64elf_after_parse): Search
	for milli.a.  Add "/lib/pa20_64" and "/usr/lib/pa20_64"
	library search paths.
  

Patch

diff --git a/ld/emultempl/hppa64elf.em b/ld/emultempl/hppa64elf.em
index 1aa00944604..c10eb5f4f9a 100644
--- a/ld/emultempl/hppa64elf.em
+++ b/ld/emultempl/hppa64elf.em
@@ -39,10 +39,14 @@  hppa64elf_after_parse (void)
     lang_add_unique (".text");
 
   /* We always need to link against milli.a on HP-UX.  */
-  lang_add_input_file ("/lib/pa20_64/milli.a",
-		       lang_input_file_is_file_enum,
+  lang_add_input_file ("milli.a",
+		       lang_input_file_is_search_file_enum,
 		       NULL);
 
+  /* Default 64-bit search paths on HP-UX.  */
+  ldfile_add_library_path ("/lib/pa20_64", false);
+  ldfile_add_library_path ("/usr/lib/pa20_64", false);
+
   /* HP-UX shared libraries have some unresolved symbols.  We need to
      ignore unresolved symbols in shared libraries.  */
   link_info.unresolved_syms_in_shared_libs = RM_IGNORE;