Tested on hppa64-hp-hpux11.11.  Committed to trunk.

Dave
---

hppa64: Don't define MD_EXEC_PREFIX to "/usr/ccs/bin" on hpux

In testing with GNU ld, I found defining MD_EXEC_PREFIX to "/usr/ccs/bin"
sometimes causes HP ld to be selected when we want GNU ld.

2026-05-12  John David Anglin  <[email protected]>

gcc/ChangeLog:

        * config/pa/pa64-hpux.h (MD_EXEC_PREFIX): Define to empty
        string.

diff --git a/gcc/config/pa/pa64-hpux.h b/gcc/config/pa/pa64-hpux.h
index 917df520a42..4673a639f44 100644
--- a/gcc/config/pa/pa64-hpux.h
+++ b/gcc/config/pa/pa64-hpux.h
@@ -104,11 +104,13 @@ along with GCC; see the file COPYING3.  If not see
 #endif
 
 /* Under hpux11, the normal location of the `ld' and `as' programs is the
-   /usr/ccs/bin directory.  */
+   /usr/ccs/bin directory.  However, we support both HP and GNU ld.
+   Adding this prefix to COMPILER_PATH can cause the wrong linker to be
+   selected.  */
 
 #ifndef CROSS_DIRECTORY_STRUCTURE
 #undef MD_EXEC_PREFIX
-#define MD_EXEC_PREFIX "/usr/ccs/bin"
+#define MD_EXEC_PREFIX ""
 #endif
 
 /* Default prefixes.  */

Attachment: signature.asc
Description: PGP signature

Reply via email to