This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
[PATCH] ld testsuite cleanup for hppa*-*-linux* and hppa64-*-hpux*
- From: "John David Anglin" <dave at hiauly1 dot hia dot nrc dot ca>
- To: binutils at sources dot redhat dot com
- Date: Thu, 11 Sep 2003 17:34:12 -0400 (EDT)
- Subject: [PATCH] ld testsuite cleanup for hppa*-*-linux* and hppa64-*-hpux*
The enclosed patch fixes a number of ld testsuite problems on hppa*-*-linux*
and hppa64-*-hpux*. As the change to ld-elfvsb/main.c affects all ports,
it needs review. Any other comments are welcome.
Dave
--
J. David Anglin dave.anglin@nrc-cnrc.gc.ca
National Research Council of Canada (613) 990-0752 (FAX: 952-6602)
2003-09-11 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
* configure.host (HOSTING_LIBS): Define for hppa*-*-linux*.
* ld-elfvsb/elfvsb.exp: xfail non-pic shared library tests on
hppa*-*-linux* and hppa*64*-*-hpux*.
* ld-elfvsb/main.c (main_visibility_check): Cast value returned by
visibility_funptr () to a function pointer.
* ld-shared/shared.exp: xfail shared (non PIC), shared (non PIC, load
offset), and shared (PIC main, non PIC so) tests on hppa*64*-*-hpux*
and hppa*-*-linux*.
Index: configure.host
===================================================================
RCS file: /cvs/src/src/ld/configure.host,v
retrieving revision 1.32
diff -u -3 -p -r1.32 configure.host
--- configure.host 3 Sep 2003 09:32:21 -0000 1.32
+++ configure.host 11 Sep 2003 16:43:26 -0000
@@ -95,6 +95,11 @@ hppa*64*-*-hpux11*)
HOSTING_LIBS='`if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else if test "$GCC" = yes; then ${CC} --print-libgcc-file-name; else gcc --print-libgcc-file-name; fi fi` -lc /usr/lib/pa20_64/milli.a'
;;
+hppa*-*-linux*)
+ # Need libgcc for $$dyncall.
+ HOSTING_LIBS='-L`dirname \`${CC} --print-file-name=libc.so\`` '"$HOSTING_LIBS"' `if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else ${CC} --print-libgcc-file-name; fi` `if [ -f ../gcc/crtend.o ]; then echo ../gcc/crtend.o; else ${CC} --print-file-name=crtend.o; fi` `${CC} --print-file-name=crtn.o`'
+ ;;
+
i[3-7]86-*-bsd* | i[3-7]86-*-freebsd[12] | i[3-7]86-*-freebsd[12]\.* | i[3-7]86-*-freebsd*aout*)
HOSTING_CRT0=/usr/lib/crt0.o
;;
Index: testsuite/ld-elfvsb/elfvsb.exp
===================================================================
RCS file: /cvs/src/src/ld/testsuite/ld-elfvsb/elfvsb.exp,v
retrieving revision 1.22
diff -u -3 -p -r1.22 elfvsb.exp
--- testsuite/ld-elfvsb/elfvsb.exp 10 Jun 2003 04:36:01 -0000 1.22
+++ testsuite/ld-elfvsb/elfvsb.exp 11 Sep 2003 16:43:26 -0000
@@ -264,6 +264,11 @@ proc visibility_run {visibility} {
}
setup_xfail "x86_64-*-linux*"
+ # Non-pic uses relocations that are not compatible with
+ # hppa shared objects.
+ setup_xfail "hppa*-*-linux*"
+ setup_xfail "hppa*64*-*-hpux*"
+
visibility_test $visibility vnp "visibility ($visibility) (non PIC)" mainnp.o sh1np.o sh2np.o elfvsb
# Test ELF shared library relocations with a non-zero load
@@ -293,6 +298,10 @@ proc visibility_run {visibility} {
setup_xfail "alpha*-*-linux*"
setup_xfail "mips*-*-linux*"
}
+ # Non-pic uses relocations that are not compatible with
+ # hppa shared objects.
+ setup_xfail "hppa*-*-linux*"
+ setup_xfail "hppa*64*-*-hpux*"
setup_xfail "x86_64-*-linux*"
visibility_test $visibility vnp "visibility ($visibility) (non PIC, load offset)" \
mainnp.o sh1np.o sh2np.o elfvsb \
@@ -353,6 +362,8 @@ proc visibility_run {visibility} {
setup_xfail "s390x-*-linux*"
}
setup_xfail "x86_64-*-linux*"
+ setup_xfail "hppa*-*-linux*"
+ setup_xfail "hppa*64*-*-hpux*"
visibility_test $visibility vmpnp "visibility ($visibility) (PIC main, non PIC so)" mainp.o sh1np.o sh2np.o elfvsb
}
} else {
Index: testsuite/ld-elfvsb/main.c
===================================================================
RCS file: /cvs/src/src/ld/testsuite/ld-elfvsb/main.c,v
retrieving revision 1.8
diff -u -3 -p -r1.8 main.c
--- testsuite/ld-elfvsb/main.c 5 May 2003 05:46:53 -0000 1.8
+++ testsuite/ld-elfvsb/main.c 11 Sep 2003 16:43:26 -0000
@@ -82,7 +82,7 @@ visibility ()
static int
main_visibility_check ()
{
- return visibility_funptr () != visibility;
+ return (int (*) (void)) visibility_funptr () != visibility;
}
int visibility_var = 1;
@@ -117,7 +117,7 @@ main_visibility_check ()
#ifdef WEAK_TEST
return visibility_funptr () == NULL;
#else
- return visibility_funptr () == visibility;
+ return (int (*) (void)) visibility_funptr () == visibility;
#endif
}
Index: testsuite/ld-shared/shared.exp
===================================================================
RCS file: /cvs/src/src/ld/testsuite/ld-shared/shared.exp,v
retrieving revision 1.16
diff -u -3 -p -r1.16 shared.exp
--- testsuite/ld-shared/shared.exp 16 May 2003 05:04:34 -0000 1.16
+++ testsuite/ld-shared/shared.exp 11 Sep 2003 16:43:26 -0000
@@ -200,6 +200,8 @@ if ![ld_compile "$CC $CFLAGS $SHCFLAG" $
setup_xfail "*-*-sunos4*"
setup_xfail "ia64-*-linux*"
setup_xfail "alpha*-*-linux*"
+ setup_xfail "hppa*64*-*-hpux*"
+ setup_xfail "hppa*-*-linux*"
setup_xfail "x86_64-*-linux*"
setup_xfail "s390x-*-linux*"
shared_test shnp "shared (non PIC)" mainnp.o sh1np.o sh2np.o shared
@@ -214,6 +216,8 @@ if ![ld_compile "$CC $CFLAGS $SHCFLAG" $
setup_xfail "ia64-*-linux*"
setup_xfail "alpha*-*-linux*"
setup_xfail "mips*-*-linux*"
+ setup_xfail "hppa*64*-*-hpux*"
+ setup_xfail "hppa*-*-linux*"
setup_xfail "x86_64-*-linux*"
shared_test shnp "shared (non PIC, load offset)" \
mainnp.o sh1np.o sh2np.o shared \
@@ -256,6 +260,8 @@ if ![ld_compile "$CC $CFLAGS $SHCFLAG $p
setup_xfail "*-*-sunos4*"
setup_xfail "ia64-*-linux*"
setup_xfail "alpha*-*-linux*"
+ setup_xfail "hppa*64*-*-hpux*"
+ setup_xfail "hppa*-*-linux*"
setup_xfail "x86_64-*-linux*"
setup_xfail "s390x-*-linux*"
shared_test shmpnp "shared (PIC main, non PIC so)" mainp.o sh1np.o sh2np.o shared