From 22ae655fb35b5428154b87f8e7ce2f4f39ecd041 Mon Sep 17 00:00:00 2001
From: danglin <danglin@138bc75d-0d04-0410-961f-82ee72b054a4>
Date: Mon, 16 Oct 2006 01:31:22 +0000
Subject: [PATCH] 	* pa64-hpux.h (LINK_SPEC): Force __cxa_finalize to be
 an undefined 	symbol in the output file for non-shared links when -nostdlib
 or 	-nodefaultlibs isn't specified.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@117769 138bc75d-0d04-0410-961f-82ee72b054a4
---
 gcc/ChangeLog             | 4 ++++
 gcc/config/pa/pa64-hpux.h | 6 ++++--
 2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index abca225253a2..1073867183d8 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,9 @@
 2006-10-15  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
 
+	* pa64-hpux.h (LINK_SPEC): Force __cxa_finalize to be an undefined
+	symbol in the output file for non-shared links when -nostdlib or
+	-nodefaultlibs isn't specified.
+
 	* config.gcc (hppa*64*-*-hpux11*, hppa[12]*-*-hpux11*): Default to
 	posix thread support.
 
diff --git a/gcc/config/pa/pa64-hpux.h b/gcc/config/pa/pa64-hpux.h
index 4caef744bad8..c5c6802ca612 100644
--- a/gcc/config/pa/pa64-hpux.h
+++ b/gcc/config/pa/pa64-hpux.h
@@ -33,7 +33,8 @@ Boston, MA 02110-1301, USA.  */
    %{!shared:%{pg:-L/lib/pa20_64/libp -L/usr/lib/pa20_64/libp %{!static:\
      %nWarning: consider linking with `-static' as system libraries with\n\
      %n  profiling support are only provided in archive format}}}\
-   %{mhp-ld:+Accept TypeMismatch -z} -E %{mlinker-opt:-O} %{!shared:-u main}\
+   %{mhp-ld:+Accept TypeMismatch -z} -E %{mlinker-opt:-O}\
+   %{!shared:-u main %{!nostdlib:%{!nodefaultlibs:-u __cxa_finalize}}}\
    %{static:-a archive} %{shared:%{mhp-ld:-b}%{!mhp-ld:-shared}}"
 #else
 #define LINK_SPEC \
@@ -43,7 +44,8 @@ Boston, MA 02110-1301, USA.  */
    %{!shared:%{pg:-L/lib/pa20_64/libp -L/usr/lib/pa20_64/libp %{!static:\
      %nWarning: consider linking with `-static' as system libraries with\n\
      %n  profiling support are only provided in archive format}}}\
-   %{!mgnu-ld:+Accept TypeMismatch -z} -E %{mlinker-opt:-O} %{!shared:-u main}\
+   %{!mgnu-ld:+Accept TypeMismatch -z} -E %{mlinker-opt:-O}\
+   %{!shared:-u main %{!nostdlib:%{!nodefaultlibs:-u __cxa_finalize}}}\
    %{static:-a archive} %{shared:%{mgnu-ld:-shared}%{!mgnu-ld:-b}}"
 #endif
 
-- 
GitLab