]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
hppa*64*-*-hpux*: Create dummy milli.a archive for binutils and ld tests
authorJohn David Anglin <danglin@gcc.gnu.org>
Sun, 24 May 2026 20:05:38 +0000 (16:05 -0400)
committerJohn David Anglin <danglin@gcc.gnu.org>
Sun, 24 May 2026 20:05:38 +0000 (16:05 -0400)
On cross builds, this fixes numerous test fails due to the milli.a
archive not being found.  On hppa*64*-*-hpux*, this fixes four fails
due to undefined symbols in the HP milli.a archive.

The change to objcopy.exp causes the "objcopy executable (pr25662)"
test to fail.  Previously, it didn't run because milli.a wasn't
found.

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

binutils/ChangeLog:

* testsuite/binutils-all/objcopy.exp: Append LDFLAGS to
ldflags for milli.a archive.
* testsuite/config/default.exp: Create dummy milli.a archive
in tmpdir/hppa.  Append " -Ltmpdir/hppa" to LDFLAGS.

ld/ChangeLog:

* testsuite/config/default.exp: Likewise.

binutils/testsuite/binutils-all/objcopy.exp
binutils/testsuite/config/default.exp
ld/testsuite/config/default.exp

index 8d5b1564a3c7e56b148f4f63f64d8ff2397867c4..c11b911df677a11b6883b7ccaf4cf3e6566315a6 100644 (file)
@@ -1570,6 +1570,11 @@ if { [istarget *-*-cygwin] || [istarget *-*-mingw*] } {
    append ldflags " --disable-reloc-section"
 }
 
+# Append LDFLAGS for milli.a archive
+if { [istarget hppa*64*-*-hpux*] } {
+   append ldflags " $LDFLAGS"
+}
+
 #xcoff doesn't support arbitrary sections
 if { ![is_xcoff_format] } {
     objcopy_test "pr25662" $src executable "" $ldflags
index 25bd1e64222883d217596b3d412ffb2ae3a8b275..3c065e52f56ccf708ad5d97b54e34cc58b287517 100644 (file)
@@ -120,6 +120,21 @@ proc link_or_copy { src dst } {
     catch "exec cp -fpu ../$src tmpdir/gas/$dst" status
 }
 
+if { [istarget hppa*64-*-hpux*] } {
+    verbose -log "creating dummy milli.a archive"
+    remote_exec host "mkdir -p tmpdir/hppa"
+    set src tmpdir/hppa/empty.s
+    set f [open $src "w"]
+    close $f
+    if [is_remote host] {
+       set src [remote_download host $src]
+    }
+    remote_exec host "$AS -o tmpdir/hppa/empty.o $src"
+    remote_exec host "$AR rc tmpdir/hppa/milli.a tmpdir/hppa/empty.o"
+    append LDFLAGS " -Ltmpdir/hppa"
+    unset f src
+}
+
 if {[file isfile gas/as-new[exe_ext]]} then {
     link_or_copy gas/as-new[exe_ext] as[exe_ext]
 } else {
index 2796f719f225cc9dd2e6aa2fd823bfb46ff6698c..3c16e7b71584d13acb2b42dca2e3b878c57fd20b 100644 (file)
@@ -552,6 +552,22 @@ if { [istarget alpha*-*-*vms*] } {
     unset f src
 }
 
+# Provide dummy milli.a that hppa64-hpux-ld always loads
+if { [istarget hppa*64-*-hpux*] } {
+    verbose -log "creating dummy milli.a archive"
+    remote_exec host "mkdir -p tmpdir/hppa"
+    set src tmpdir/hppa/empty.s
+    set f [open $src "w"]
+    close $f
+    if [is_remote host] {
+       set src [remote_download host $src]
+    }
+    ld_assemble $as $src tmpdir/hppa/empty.o
+    ar_simple_create $ar {} tmpdir/hppa/milli.a tmpdir/hppa/empty.o
+    append LDFLAGS " -Ltmpdir/hppa"
+    unset f src
+}
+
 set plug_opt ""
 if { [check_compiler_available] } {
     set plugin_names {