This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Fix PA function pointer canonicalization patch
- From: "John David Anglin" <dave at hiauly1 dot hia dot nrc dot ca>
- To: gcc-patches at gcc dot gnu dot org
- Date: Thu, 5 Dec 2002 21:59:44 -0500 (EST)
- Subject: Fix PA function pointer canonicalization patch
This fixes a bootstrap failure on hppa2.0w-hp-hpux11.00 resulting from
yesterdays function pointer conicalization patch.
Tested on hppa-unknown-linux-gnu and hppa2.0w-hp-hpux11.00.
Dave
--
J. David Anglin dave.anglin@nrc.ca
National Research Council of Canada (613) 990-0752 (FAX: 952-6605)
2002-12-05 John David Anglin <dave@hiauly1.hia.nrc.ca>
* pa32-linux.h (CANONICALIZE_FUNCPTR_FOR_COMPARE_LIBCALL): Move define.
* pa.h (CANONICALIZE_FUNCPTR_FOR_COMPARE_LIBCALL): To here.
Index: config/pa/pa.h
===================================================================
RCS file: /cvsroot/gcc/gcc/gcc/config/pa/pa.h,v
retrieving revision 1.176
diff -u -3 -p -r1.176 pa.h
--- config/pa/pa.h 27 Nov 2002 02:34:15 -0000 1.176
+++ config/pa/pa.h 5 Dec 2002 20:13:21 -0000
@@ -1960,3 +1978,7 @@ do { \
{"cmpib_comparison_operator", {EQ, NE, LT, LE, LEU, \
GT, GTU, GE}}, \
{"movb_comparison_operator", {EQ, NE, LT, GE}},
+
+/* We need a libcall to canonicalize function pointers on TARGET_ELF32. */
+#define CANONICALIZE_FUNCPTR_FOR_COMPARE_LIBCALL \
+ "__canonicalize_funcptr_for_compare"
Index: config/pa/pa32-linux.h
===================================================================
RCS file: /cvsroot/gcc/gcc/gcc/config/pa/pa32-linux.h,v
retrieving revision 1.9
diff -u -3 -p -r1.9 pa32-linux.h
--- config/pa/pa32-linux.h 5 Dec 2002 01:57:27 -0000 1.9
+++ config/pa/pa32-linux.h 5 Dec 2002 20:13:21 -0000
@@ -30,11 +30,6 @@ Boston, MA 02111-1307, USA. */
#undef FUNCTION_OK_FOR_SIBCALL
#define FUNCTION_OK_FOR_SIBCALL(DECL) 1
-/* We need a libcall to canonicalize function pointers because of
- the way function pointers are handled when doing lazy linking. */
-#define CANONICALIZE_FUNCPTR_FOR_COMPARE_LIBCALL \
- "__canonicalize_funcptr_for_compare"
-
/* The libcall __canonicalize_funcptr_for_compare is referenced in
crtend.o and the reference isn't resolved in objects that don't
compare function pointers. Thus, we need to play games to provide