[binutils-gdb] hppa*64*-*-hpux*: Create dummy milli.a archive for binutils and ld tests
John David Anglin
danglin@sourceware.org
Sun May 24 20:06:32 GMT 2026
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=9492ceba602d87acefc0da8ad20f32e4dd176f14
commit 9492ceba602d87acefc0da8ad20f32e4dd176f14
Author: John David Anglin <danglin@gcc.gnu.org>
Date: Sun May 24 16:05:38 2026 -0400
hppa*64*-*-hpux*: Create dummy milli.a archive for binutils and ld tests
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.
Diff:
---
binutils/testsuite/binutils-all/objcopy.exp | 5 +++++
binutils/testsuite/config/default.exp | 15 +++++++++++++++
ld/testsuite/config/default.exp | 16 ++++++++++++++++
3 files changed, 36 insertions(+)
diff --git a/binutils/testsuite/binutils-all/objcopy.exp b/binutils/testsuite/binutils-all/objcopy.exp
index 8d5b1564a3c..c11b911df67 100644
--- a/binutils/testsuite/binutils-all/objcopy.exp
+++ b/binutils/testsuite/binutils-all/objcopy.exp
@@ -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
diff --git a/binutils/testsuite/config/default.exp b/binutils/testsuite/config/default.exp
index 25bd1e64222..3c065e52f56 100644
--- a/binutils/testsuite/config/default.exp
+++ b/binutils/testsuite/config/default.exp
@@ -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 {
diff --git a/ld/testsuite/config/default.exp b/ld/testsuite/config/default.exp
index 2796f719f22..3c16e7b7158 100644
--- a/ld/testsuite/config/default.exp
+++ b/ld/testsuite/config/default.exp
@@ -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 {
More information about the Binutils-cvs
mailing list