From c0d48c0b487a3d7f926a2fef24e9b2fd401b3bc4 Mon Sep 17 00:00:00 2001 From: Dave Anglin Date: Tue, 7 Oct 2003 17:30:02 +0000 Subject: [PATCH] * configure.host (HOSTING_LIBS): Define for hppa*-*-linux*. * ld-elfvsb/elfvsb.exp: xfail non-pic shared library tests for non 64-bit hppa*-*-linux* targets. * 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 for non 64-bit hppa*-*-linux* targets. --- ld/ChangeLog | 4 ++++ ld/configure.host | 8 ++++++++ ld/testsuite/ChangeLog | 10 ++++++++++ ld/testsuite/ld-elfvsb/elfvsb.exp | 11 +++++++++++ ld/testsuite/ld-elfvsb/main.c | 4 ++-- ld/testsuite/ld-shared/shared.exp | 9 +++++++++ 6 files changed, 44 insertions(+), 2 deletions(-) diff --git a/ld/ChangeLog b/ld/ChangeLog index 6ee3b334935..d69c89e87bd 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,7 @@ +2003-10-07 John David Anglin + + * configure.host (HOSTING_LIBS): Define for hppa*-*-linux*. + 2003-10-07 Nathan Sidwell * ldwrite.c (unsplittable_name): New. diff --git a/ld/configure.host b/ld/configure.host index c1e99698938..544114e0825 100644 --- a/ld/configure.host +++ b/ld/configure.host @@ -95,6 +95,14 @@ 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*64*-*-linux*) + ;; + +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 ;; diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog index 4035f39a5b0..ab46874b40d 100644 --- a/ld/testsuite/ChangeLog +++ b/ld/testsuite/ChangeLog @@ -1,3 +1,13 @@ +2003-10-07 John David Anglin + + * ld-elfvsb/elfvsb.exp: xfail non-pic shared library tests for + non 64-bit hppa*-*-linux* targets. + * 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 for non 64-bit + hppa*-*-linux* targets. + 2003-09-30 H.J. Lu * ld-checks/checks.exp (section_check): Remove ia64-*-elf*. diff --git a/ld/testsuite/ld-elfvsb/elfvsb.exp b/ld/testsuite/ld-elfvsb/elfvsb.exp index 9f0073a77c0..f1f3f1fdf39 100644 --- a/ld/testsuite/ld-elfvsb/elfvsb.exp +++ b/ld/testsuite/ld-elfvsb/elfvsb.exp @@ -263,6 +263,9 @@ proc visibility_run {visibility} { setup_xfail "s390x-*-linux*" } setup_xfail "x86_64-*-linux*" + if { ![istarget hppa*64*-*-linux*] } { + setup_xfail "hppa*-*-linux*" + } visibility_test $visibility vnp "visibility ($visibility) (non PIC)" mainnp.o sh1np.o sh2np.o elfvsb @@ -294,6 +297,10 @@ proc visibility_run {visibility} { setup_xfail "mips*-*-linux*" } setup_xfail "x86_64-*-linux*" + if { ![istarget hppa*64*-*-linux*] } { + setup_xfail "hppa*-*-linux*" + } + visibility_test $visibility vnp "visibility ($visibility) (non PIC, load offset)" \ mainnp.o sh1np.o sh2np.o elfvsb \ "-T $srcdir/$subdir/elf-offset.ld" @@ -353,6 +360,10 @@ proc visibility_run {visibility} { setup_xfail "s390x-*-linux*" } setup_xfail "x86_64-*-linux*" + if { ![istarget hppa*64*-*-linux*] } { + setup_xfail "hppa*-*-linux*" + } + visibility_test $visibility vmpnp "visibility ($visibility) (PIC main, non PIC so)" mainp.o sh1np.o sh2np.o elfvsb } } else { diff --git a/ld/testsuite/ld-elfvsb/main.c b/ld/testsuite/ld-elfvsb/main.c index 1ce2e3eb375..f071260d47a 100644 --- a/ld/testsuite/ld-elfvsb/main.c +++ b/ld/testsuite/ld-elfvsb/main.c @@ -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 } diff --git a/ld/testsuite/ld-shared/shared.exp b/ld/testsuite/ld-shared/shared.exp index 251f25df64b..339d3a3abe9 100644 --- a/ld/testsuite/ld-shared/shared.exp +++ b/ld/testsuite/ld-shared/shared.exp @@ -200,6 +200,9 @@ if ![ld_compile "$CC $CFLAGS $SHCFLAG" $srcdir/$subdir/main.c $tmpdir/mainnp.o] setup_xfail "*-*-sunos4*" setup_xfail "ia64-*-linux*" setup_xfail "alpha*-*-linux*" + if { ![istarget hppa*64*-*-linux*] } { + 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 +217,9 @@ if ![ld_compile "$CC $CFLAGS $SHCFLAG" $srcdir/$subdir/main.c $tmpdir/mainnp.o] setup_xfail "ia64-*-linux*" setup_xfail "alpha*-*-linux*" setup_xfail "mips*-*-linux*" + if { ![istarget hppa*64*-*-linux*] } { + 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 +262,9 @@ if ![ld_compile "$CC $CFLAGS $SHCFLAG $picflag" $srcdir/$subdir/main.c $tmpdir/m setup_xfail "*-*-sunos4*" setup_xfail "ia64-*-linux*" setup_xfail "alpha*-*-linux*" + if { ![istarget hppa*64*-*-linux*] } { + 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 -- 2.30.2