aboutsummaryrefslogtreecommitdiff
path: root/gold
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@google.com>2007-10-02 22:45:07 +0000
committerIan Lance Taylor <iant@google.com>2007-10-02 22:45:07 +0000
commit63402fe413c09effa7813a70a5943dddec1456bf (patch)
tree2f442ff95f61ee3a3f8f6be87c052962f0bdef85 /gold
parente84992bbac6f16ec51ed0ad03db26b403c2b05e0 (diff)
downloadgdb-63402fe413c09effa7813a70a5943dddec1456bf.zip
gdb-63402fe413c09effa7813a70a5943dddec1456bf.tar.gz
gdb-63402fe413c09effa7813a70a5943dddec1456bf.tar.bz2
From Craig Silverstein: don't run function pointer non-PIC tests when
they won't work.
Diffstat (limited to 'gold')
-rw-r--r--gold/Makefile.in2
-rwxr-xr-xgold/configure27
-rw-r--r--gold/configure.ac11
-rw-r--r--gold/testsuite/Makefile.am48
-rw-r--r--gold/testsuite/Makefile.in131
5 files changed, 133 insertions, 86 deletions
diff --git a/gold/Makefile.in b/gold/Makefile.in
index 5db510e..168849e 100644
--- a/gold/Makefile.in
+++ b/gold/Makefile.in
@@ -162,6 +162,8 @@ ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
+FN_PTRS_IN_SO_WITHOUT_PIC_FALSE = @FN_PTRS_IN_SO_WITHOUT_PIC_FALSE@
+FN_PTRS_IN_SO_WITHOUT_PIC_TRUE = @FN_PTRS_IN_SO_WITHOUT_PIC_TRUE@
GCC_FALSE = @GCC_FALSE@
GCC_TRUE = @GCC_TRUE@
GENCAT = @GENCAT@
diff --git a/gold/configure b/gold/configure
index d3e4840..7bf0364 100755
--- a/gold/configure
+++ b/gold/configure
@@ -309,7 +309,7 @@ ac_includes_default="\
# include <unistd.h>
#endif"
-ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar TARGETOBJS CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE CXX CXXFLAGS ac_ct_CXX CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE YACC RANLIB ac_ct_RANLIB LN_S USE_NLS LIBINTL LIBINTL_DEP INCINTL XGETTEXT GMSGFMT POSUB CATALOGS DATADIRNAME INSTOBJEXT GENCAT CATOBJEXT MKINSTALLDIRS MSGFMT MSGMERGE NATIVE_LINKER_TRUE NATIVE_LINKER_FALSE GCC_TRUE GCC_FALSE WARN_CFLAGS NO_WERROR WARN_CXXFLAGS LFS_CXXFLAGS LIBOBJS CXXCPP EGREP MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT LTLIBOBJS'
+ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar TARGETOBJS CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE CXX CXXFLAGS ac_ct_CXX CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE YACC RANLIB ac_ct_RANLIB LN_S USE_NLS LIBINTL LIBINTL_DEP INCINTL XGETTEXT GMSGFMT POSUB CATALOGS DATADIRNAME INSTOBJEXT GENCAT CATOBJEXT MKINSTALLDIRS MSGFMT MSGMERGE NATIVE_LINKER_TRUE NATIVE_LINKER_FALSE GCC_TRUE GCC_FALSE FN_PTRS_IN_SO_WITHOUT_PIC_TRUE FN_PTRS_IN_SO_WITHOUT_PIC_FALSE WARN_CFLAGS NO_WERROR WARN_CXXFLAGS LFS_CXXFLAGS LIBOBJS CXXCPP EGREP MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT LTLIBOBJS'
ac_subst_files=''
# Initialize some variables set by options.
@@ -4361,6 +4361,22 @@ fi
+
+if
+ case $target_cpu in
+ i?86) true;;
+ x86_64) false;;
+ *) true;;
+ esac; then
+ FN_PTRS_IN_SO_WITHOUT_PIC_TRUE=
+ FN_PTRS_IN_SO_WITHOUT_PIC_FALSE='#'
+else
+ FN_PTRS_IN_SO_WITHOUT_PIC_TRUE='#'
+ FN_PTRS_IN_SO_WITHOUT_PIC_FALSE=
+fi
+
+
+
GCC_WARN_CFLAGS="-W -Wall -Wstrict-prototypes -Wmissing-prototypes"
# Check whether --enable-werror or --disable-werror was given.
@@ -5527,6 +5543,13 @@ echo "$as_me: error: conditional \"GCC\" was never defined.
Usually this means the macro was only invoked conditionally." >&2;}
{ (exit 1); exit 1; }; }
fi
+if test -z "${FN_PTRS_IN_SO_WITHOUT_PIC_TRUE}" && test -z "${FN_PTRS_IN_SO_WITHOUT_PIC_FALSE}"; then
+ { { echo "$as_me:$LINENO: error: conditional \"FN_PTRS_IN_SO_WITHOUT_PIC\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"FN_PTRS_IN_SO_WITHOUT_PIC\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+ { (exit 1); exit 1; }; }
+fi
if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
{ { echo "$as_me:$LINENO: error: conditional \"MAINTAINER_MODE\" was never defined.
Usually this means the macro was only invoked conditionally." >&5
@@ -6156,6 +6179,8 @@ s,@NATIVE_LINKER_TRUE@,$NATIVE_LINKER_TRUE,;t t
s,@NATIVE_LINKER_FALSE@,$NATIVE_LINKER_FALSE,;t t
s,@GCC_TRUE@,$GCC_TRUE,;t t
s,@GCC_FALSE@,$GCC_FALSE,;t t
+s,@FN_PTRS_IN_SO_WITHOUT_PIC_TRUE@,$FN_PTRS_IN_SO_WITHOUT_PIC_TRUE,;t t
+s,@FN_PTRS_IN_SO_WITHOUT_PIC_FALSE@,$FN_PTRS_IN_SO_WITHOUT_PIC_FALSE,;t t
s,@WARN_CFLAGS@,$WARN_CFLAGS,;t t
s,@NO_WERROR@,$NO_WERROR,;t t
s,@WARN_CXXFLAGS@,$WARN_CXXFLAGS,;t t
diff --git a/gold/configure.ac b/gold/configure.ac
index 500568e..4efe83d 100644
--- a/gold/configure.ac
+++ b/gold/configure.ac
@@ -112,6 +112,17 @@ AM_CONDITIONAL(NATIVE_LINKER,
test "x$target_alias" = "x" -o "x$host_alias" = "x$target_alias")
AM_CONDITIONAL(GCC, test "$GCC" = yes)
+dnl Some architectures do not support taking pointers of functions
+dnl defined in shared libraries except in -fPIC mode. We need to
+dnl tell the unittest framework if we're compiling for one of those
+dnl targets, so it doesn't try to run the tests that do that.
+AM_CONDITIONAL(FN_PTRS_IN_SO_WITHOUT_PIC, [
+ case $target_cpu in
+ i?86) true;;
+ x86_64) false;;
+ *) true;;
+ esac])
+
AM_BINUTILS_WARNINGS
WARN_CXXFLAGS=`echo ${WARN_CFLAGS} | sed -e 's/-Wstrict-prototypes//' -e 's/-Wmissing-prototypes//'`
diff --git a/gold/testsuite/Makefile.am b/gold/testsuite/Makefile.am
index 1663895..6054d66 100644
--- a/gold/testsuite/Makefile.am
+++ b/gold/testsuite/Makefile.am
@@ -26,11 +26,6 @@ NATIVE_PROGS = \
two_file_same_shared_test \
two_file_separate_shared_12_test \
two_file_separate_shared_21_test \
- two_file_shared_1_nonpic_test \
- two_file_shared_2_nonpic_test \
- two_file_same_shared_nonpic_test \
- two_file_separate_shared_12_nonpic_test \
- two_file_separate_shared_21_nonpic_test \
exception_test \
exception_static_test \
exception_shared_1_test \
@@ -39,6 +34,17 @@ NATIVE_PROGS = \
exception_separate_shared_12_test \
exception_separate_shared_21_test
+if FN_PTRS_IN_SO_WITHOUT_PIC
+
+NATIVE_PROGS += \
+ two_file_shared_1_nonpic_test \
+ two_file_shared_2_nonpic_test \
+ two_file_same_shared_nonpic_test \
+ two_file_separate_shared_12_nonpic_test \
+ two_file_separate_shared_21_nonpic_test
+
+endif
+
NATIVE_TESTING = \
basic_test \
basic_pic_test \
@@ -128,8 +134,22 @@ two_file_separate_shared_21_test_LDFLAGS = -Bgcctestdir/ -Wl,-R,.
two_file_separate_shared_21_test_LDADD = \
two_file_shared_2.so two_file_shared_1.so
-# FIXME: The nonpic tests will fail on platforms which can not put
-# non-PIC code into shared libraries; how should we handle this?
+two_file_test_1_pic.o: two_file_test_1.cc
+ $(CXXCOMPILE) -c -fpic -o $@ $<
+two_file_test_2_pic.o: two_file_test_2.cc
+ $(CXXCOMPILE) -c -fpic -o $@ $<
+
+two_file_shared_1.so: two_file_test_1_pic.o
+ $(CXXLINK) -shared two_file_test_1_pic.o
+two_file_shared_2.so: two_file_test_2_pic.o
+ $(CXXLINK) -shared two_file_test_2_pic.o
+two_file_shared.so: two_file_test_1_pic.o two_file_test_2_pic.o
+ $(CXXLINK) -shared two_file_test_1_pic.o two_file_test_2_pic.o
+
+# The nonpic tests will fail on platforms which can not put non-PIC
+# code into shared libraries, so we just don't run them in that case.
+
+if FN_PTRS_IN_SO_WITHOUT_PIC
two_file_shared_1_nonpic_test_SOURCES = \
two_file_test_2.cc two_file_test_main.cc
@@ -165,18 +185,6 @@ two_file_separate_shared_21_nonpic_test_LDFLAGS = -Bgcctestdir/ -Wl,-R,.
two_file_separate_shared_21_nonpic_test_LDADD = \
two_file_shared_2_nonpic.so two_file_shared_1_nonpic.so
-two_file_test_1_pic.o: two_file_test_1.cc
- $(CXXCOMPILE) -c -fpic -o $@ $<
-two_file_test_2_pic.o: two_file_test_2.cc
- $(CXXCOMPILE) -c -fpic -o $@ $<
-
-two_file_shared_1.so: two_file_test_1_pic.o
- $(CXXLINK) -shared two_file_test_1_pic.o
-two_file_shared_2.so: two_file_test_2_pic.o
- $(CXXLINK) -shared two_file_test_2_pic.o
-two_file_shared.so: two_file_test_1_pic.o two_file_test_2_pic.o
- $(CXXLINK) -shared two_file_test_1_pic.o two_file_test_2_pic.o
-
two_file_shared_1_nonpic.so: two_file_test_1.o
$(CXXLINK) -shared two_file_test_1.o
two_file_shared_2_nonpic.so: two_file_test_2.o
@@ -184,6 +192,8 @@ two_file_shared_2_nonpic.so: two_file_test_2.o
two_file_shared_nonpic.so: two_file_test_1.o two_file_test_2.o
$(CXXLINK) -shared two_file_test_1.o two_file_test_2.o
+endif
+
exception_test_SOURCES = \
exception_test_main.cc \
exception_test_1.cc \
diff --git a/gold/testsuite/Makefile.in b/gold/testsuite/Makefile.in
index 9e34821..5de0c50 100644
--- a/gold/testsuite/Makefile.in
+++ b/gold/testsuite/Makefile.in
@@ -42,7 +42,14 @@ POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
target_triplet = @target@
-check_PROGRAMS = object_unittest$(EXEEXT) $(am__EXEEXT_1)
+@FN_PTRS_IN_SO_WITHOUT_PIC_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@am__append_1 = \
+@FN_PTRS_IN_SO_WITHOUT_PIC_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@ two_file_shared_1_nonpic_test \
+@FN_PTRS_IN_SO_WITHOUT_PIC_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@ two_file_shared_2_nonpic_test \
+@FN_PTRS_IN_SO_WITHOUT_PIC_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@ two_file_same_shared_nonpic_test \
+@FN_PTRS_IN_SO_WITHOUT_PIC_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@ two_file_separate_shared_12_nonpic_test \
+@FN_PTRS_IN_SO_WITHOUT_PIC_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@ two_file_separate_shared_21_nonpic_test
+
+check_PROGRAMS = object_unittest$(EXEEXT) $(am__EXEEXT_2)
@GCC_FALSE@constructor_test_DEPENDENCIES = libgoldtest.a ../libgold.a
@NATIVE_LINKER_FALSE@constructor_test_DEPENDENCIES = libgoldtest.a \
@NATIVE_LINKER_FALSE@ ../libgold.a
@@ -81,7 +88,12 @@ libgoldtest_a_LIBADD =
am_libgoldtest_a_OBJECTS = test.$(OBJEXT) testmain.$(OBJEXT) \
testfile.$(OBJEXT)
libgoldtest_a_OBJECTS = $(am_libgoldtest_a_OBJECTS)
-@GCC_TRUE@@NATIVE_LINKER_TRUE@am__EXEEXT_1 = \
+@FN_PTRS_IN_SO_WITHOUT_PIC_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@am__EXEEXT_1 = two_file_shared_1_nonpic_test$(EXEEXT) \
+@FN_PTRS_IN_SO_WITHOUT_PIC_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@ two_file_shared_2_nonpic_test$(EXEEXT) \
+@FN_PTRS_IN_SO_WITHOUT_PIC_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@ two_file_same_shared_nonpic_test$(EXEEXT) \
+@FN_PTRS_IN_SO_WITHOUT_PIC_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@ two_file_separate_shared_12_nonpic_test$(EXEEXT) \
+@FN_PTRS_IN_SO_WITHOUT_PIC_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@ two_file_separate_shared_21_nonpic_test$(EXEEXT)
+@GCC_TRUE@@NATIVE_LINKER_TRUE@am__EXEEXT_2 = \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ constructor_test$(EXEEXT) \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ constructor_static_test$(EXEEXT) \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ two_file_test$(EXEEXT) \
@@ -90,18 +102,14 @@ libgoldtest_a_OBJECTS = $(am_libgoldtest_a_OBJECTS)
@GCC_TRUE@@NATIVE_LINKER_TRUE@ two_file_same_shared_test$(EXEEXT) \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ two_file_separate_shared_12_test$(EXEEXT) \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ two_file_separate_shared_21_test$(EXEEXT) \
-@GCC_TRUE@@NATIVE_LINKER_TRUE@ two_file_shared_1_nonpic_test$(EXEEXT) \
-@GCC_TRUE@@NATIVE_LINKER_TRUE@ two_file_shared_2_nonpic_test$(EXEEXT) \
-@GCC_TRUE@@NATIVE_LINKER_TRUE@ two_file_same_shared_nonpic_test$(EXEEXT) \
-@GCC_TRUE@@NATIVE_LINKER_TRUE@ two_file_separate_shared_12_nonpic_test$(EXEEXT) \
-@GCC_TRUE@@NATIVE_LINKER_TRUE@ two_file_separate_shared_21_nonpic_test$(EXEEXT) \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ exception_test$(EXEEXT) \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ exception_static_test$(EXEEXT) \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ exception_shared_1_test$(EXEEXT) \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ exception_shared_2_test$(EXEEXT) \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ exception_same_shared_test$(EXEEXT) \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ exception_separate_shared_12_test$(EXEEXT) \
-@GCC_TRUE@@NATIVE_LINKER_TRUE@ exception_separate_shared_21_test$(EXEEXT)
+@GCC_TRUE@@NATIVE_LINKER_TRUE@ exception_separate_shared_21_test$(EXEEXT) \
+@GCC_TRUE@@NATIVE_LINKER_TRUE@ $(am__EXEEXT_1)
am__constructor_static_test_SOURCES_DIST = constructor_test.cc
@GCC_TRUE@@NATIVE_LINKER_TRUE@am_constructor_static_test_OBJECTS = \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ constructor_test.$(OBJEXT)
@@ -166,8 +174,7 @@ object_unittest_LDADD = $(LDADD)
object_unittest_DEPENDENCIES = libgoldtest.a ../libgold.a
am__two_file_same_shared_nonpic_test_SOURCES_DIST = \
two_file_test_main.cc
-@GCC_TRUE@@NATIVE_LINKER_TRUE@am_two_file_same_shared_nonpic_test_OBJECTS = \
-@GCC_TRUE@@NATIVE_LINKER_TRUE@ two_file_test_main.$(OBJEXT)
+@FN_PTRS_IN_SO_WITHOUT_PIC_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@am_two_file_same_shared_nonpic_test_OBJECTS = two_file_test_main.$(OBJEXT)
two_file_same_shared_nonpic_test_OBJECTS = \
$(am_two_file_same_shared_nonpic_test_OBJECTS)
am__two_file_same_shared_test_SOURCES_DIST = two_file_test_main.cc
@@ -177,8 +184,7 @@ two_file_same_shared_test_OBJECTS = \
$(am_two_file_same_shared_test_OBJECTS)
am__two_file_separate_shared_12_nonpic_test_SOURCES_DIST = \
two_file_test_main.cc
-@GCC_TRUE@@NATIVE_LINKER_TRUE@am_two_file_separate_shared_12_nonpic_test_OBJECTS = \
-@GCC_TRUE@@NATIVE_LINKER_TRUE@ two_file_test_main.$(OBJEXT)
+@FN_PTRS_IN_SO_WITHOUT_PIC_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@am_two_file_separate_shared_12_nonpic_test_OBJECTS = two_file_test_main.$(OBJEXT)
two_file_separate_shared_12_nonpic_test_OBJECTS = \
$(am_two_file_separate_shared_12_nonpic_test_OBJECTS)
am__two_file_separate_shared_12_test_SOURCES_DIST = \
@@ -189,8 +195,7 @@ two_file_separate_shared_12_test_OBJECTS = \
$(am_two_file_separate_shared_12_test_OBJECTS)
am__two_file_separate_shared_21_nonpic_test_SOURCES_DIST = \
two_file_test_main.cc
-@GCC_TRUE@@NATIVE_LINKER_TRUE@am_two_file_separate_shared_21_nonpic_test_OBJECTS = \
-@GCC_TRUE@@NATIVE_LINKER_TRUE@ two_file_test_main.$(OBJEXT)
+@FN_PTRS_IN_SO_WITHOUT_PIC_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@am_two_file_separate_shared_21_nonpic_test_OBJECTS = two_file_test_main.$(OBJEXT)
two_file_separate_shared_21_nonpic_test_OBJECTS = \
$(am_two_file_separate_shared_21_nonpic_test_OBJECTS)
am__two_file_separate_shared_21_test_SOURCES_DIST = \
@@ -201,9 +206,8 @@ two_file_separate_shared_21_test_OBJECTS = \
$(am_two_file_separate_shared_21_test_OBJECTS)
am__two_file_shared_1_nonpic_test_SOURCES_DIST = two_file_test_2.cc \
two_file_test_main.cc
-@GCC_TRUE@@NATIVE_LINKER_TRUE@am_two_file_shared_1_nonpic_test_OBJECTS = \
-@GCC_TRUE@@NATIVE_LINKER_TRUE@ two_file_test_2.$(OBJEXT) \
-@GCC_TRUE@@NATIVE_LINKER_TRUE@ two_file_test_main.$(OBJEXT)
+@FN_PTRS_IN_SO_WITHOUT_PIC_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@am_two_file_shared_1_nonpic_test_OBJECTS = two_file_test_2.$(OBJEXT) \
+@FN_PTRS_IN_SO_WITHOUT_PIC_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@ two_file_test_main.$(OBJEXT)
two_file_shared_1_nonpic_test_OBJECTS = \
$(am_two_file_shared_1_nonpic_test_OBJECTS)
am__two_file_shared_1_test_SOURCES_DIST = two_file_test_2.cc \
@@ -214,9 +218,8 @@ am__two_file_shared_1_test_SOURCES_DIST = two_file_test_2.cc \
two_file_shared_1_test_OBJECTS = $(am_two_file_shared_1_test_OBJECTS)
am__two_file_shared_2_nonpic_test_SOURCES_DIST = two_file_test_1.cc \
two_file_test_main.cc
-@GCC_TRUE@@NATIVE_LINKER_TRUE@am_two_file_shared_2_nonpic_test_OBJECTS = \
-@GCC_TRUE@@NATIVE_LINKER_TRUE@ two_file_test_1.$(OBJEXT) \
-@GCC_TRUE@@NATIVE_LINKER_TRUE@ two_file_test_main.$(OBJEXT)
+@FN_PTRS_IN_SO_WITHOUT_PIC_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@am_two_file_shared_2_nonpic_test_OBJECTS = two_file_test_1.$(OBJEXT) \
+@FN_PTRS_IN_SO_WITHOUT_PIC_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@ two_file_test_main.$(OBJEXT)
two_file_shared_2_nonpic_test_OBJECTS = \
$(am_two_file_shared_2_nonpic_test_OBJECTS)
am__two_file_shared_2_test_SOURCES_DIST = two_file_test_1.cc \
@@ -315,6 +318,8 @@ ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
+FN_PTRS_IN_SO_WITHOUT_PIC_FALSE = @FN_PTRS_IN_SO_WITHOUT_PIC_FALSE@
+FN_PTRS_IN_SO_WITHOUT_PIC_TRUE = @FN_PTRS_IN_SO_WITHOUT_PIC_TRUE@
GCC_FALSE = @GCC_FALSE@
GCC_TRUE = @GCC_TRUE@
GENCAT = @GENCAT@
@@ -416,8 +421,7 @@ INCLUDES = -D_GNU_SOURCE \
-DLOCALEDIR="\"$(datadir)/locale\"" \
@INCINTL@
-@GCC_TRUE@@NATIVE_LINKER_TRUE@NATIVE_PROGS = \
-@GCC_TRUE@@NATIVE_LINKER_TRUE@ constructor_test \
+@GCC_TRUE@@NATIVE_LINKER_TRUE@NATIVE_PROGS = constructor_test \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ constructor_static_test \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ two_file_test \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ two_file_shared_1_test \
@@ -425,19 +429,14 @@ INCLUDES = -D_GNU_SOURCE \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ two_file_same_shared_test \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ two_file_separate_shared_12_test \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ two_file_separate_shared_21_test \
-@GCC_TRUE@@NATIVE_LINKER_TRUE@ two_file_shared_1_nonpic_test \
-@GCC_TRUE@@NATIVE_LINKER_TRUE@ two_file_shared_2_nonpic_test \
-@GCC_TRUE@@NATIVE_LINKER_TRUE@ two_file_same_shared_nonpic_test \
-@GCC_TRUE@@NATIVE_LINKER_TRUE@ two_file_separate_shared_12_nonpic_test \
-@GCC_TRUE@@NATIVE_LINKER_TRUE@ two_file_separate_shared_21_nonpic_test \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ exception_test \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ exception_static_test \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ exception_shared_1_test \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ exception_shared_2_test \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ exception_same_shared_test \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ exception_separate_shared_12_test \
-@GCC_TRUE@@NATIVE_LINKER_TRUE@ exception_separate_shared_21_test
-
+@GCC_TRUE@@NATIVE_LINKER_TRUE@ exception_separate_shared_21_test \
+@GCC_TRUE@@NATIVE_LINKER_TRUE@ $(am__append_1)
@GCC_TRUE@@NATIVE_LINKER_TRUE@NATIVE_TESTING = \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ basic_test \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ basic_pic_test \
@@ -493,45 +492,45 @@ object_unittest_SOURCES = object_unittest.cc
@GCC_TRUE@@NATIVE_LINKER_TRUE@ two_file_shared_2.so two_file_shared_1.so
-# FIXME: The nonpic tests will fail on platforms which can not put
-# non-PIC code into shared libraries; how should we handle this?
-@GCC_TRUE@@NATIVE_LINKER_TRUE@two_file_shared_1_nonpic_test_SOURCES = \
-@GCC_TRUE@@NATIVE_LINKER_TRUE@ two_file_test_2.cc two_file_test_main.cc
+# The nonpic tests will fail on platforms which can not put non-PIC
+# code into shared libraries, so we just don't run them in that case.
+@FN_PTRS_IN_SO_WITHOUT_PIC_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@two_file_shared_1_nonpic_test_SOURCES = \
+@FN_PTRS_IN_SO_WITHOUT_PIC_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@ two_file_test_2.cc two_file_test_main.cc
-@GCC_TRUE@@NATIVE_LINKER_TRUE@two_file_shared_1_nonpic_test_DEPENDENCIES = \
-@GCC_TRUE@@NATIVE_LINKER_TRUE@ gcctestdir/ld two_file_shared_1_nonpic.so
+@FN_PTRS_IN_SO_WITHOUT_PIC_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@two_file_shared_1_nonpic_test_DEPENDENCIES = \
+@FN_PTRS_IN_SO_WITHOUT_PIC_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@ gcctestdir/ld two_file_shared_1_nonpic.so
-@GCC_TRUE@@NATIVE_LINKER_TRUE@two_file_shared_1_nonpic_test_LDFLAGS = -Bgcctestdir/ -Wl,-R,.
-@GCC_TRUE@@NATIVE_LINKER_TRUE@two_file_shared_1_nonpic_test_LDADD = two_file_shared_1_nonpic.so
-@GCC_TRUE@@NATIVE_LINKER_TRUE@two_file_shared_2_nonpic_test_SOURCES = \
-@GCC_TRUE@@NATIVE_LINKER_TRUE@ two_file_test_1.cc two_file_test_main.cc
+@FN_PTRS_IN_SO_WITHOUT_PIC_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@two_file_shared_1_nonpic_test_LDFLAGS = -Bgcctestdir/ -Wl,-R,.
+@FN_PTRS_IN_SO_WITHOUT_PIC_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@two_file_shared_1_nonpic_test_LDADD = two_file_shared_1_nonpic.so
+@FN_PTRS_IN_SO_WITHOUT_PIC_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@two_file_shared_2_nonpic_test_SOURCES = \
+@FN_PTRS_IN_SO_WITHOUT_PIC_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@ two_file_test_1.cc two_file_test_main.cc
-@GCC_TRUE@@NATIVE_LINKER_TRUE@two_file_shared_2_nonpic_test_DEPENDENCIES = \
-@GCC_TRUE@@NATIVE_LINKER_TRUE@ gcctestdir/ld two_file_shared_2_nonpic.so
+@FN_PTRS_IN_SO_WITHOUT_PIC_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@two_file_shared_2_nonpic_test_DEPENDENCIES = \
+@FN_PTRS_IN_SO_WITHOUT_PIC_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@ gcctestdir/ld two_file_shared_2_nonpic.so
-@GCC_TRUE@@NATIVE_LINKER_TRUE@two_file_shared_2_nonpic_test_LDFLAGS = -Bgcctestdir/ -Wl,-R,.
-@GCC_TRUE@@NATIVE_LINKER_TRUE@two_file_shared_2_nonpic_test_LDADD = two_file_shared_2_nonpic.so
-@GCC_TRUE@@NATIVE_LINKER_TRUE@two_file_same_shared_nonpic_test_SOURCES = two_file_test_main.cc
-@GCC_TRUE@@NATIVE_LINKER_TRUE@two_file_same_shared_nonpic_test_DEPENDENCIES = \
-@GCC_TRUE@@NATIVE_LINKER_TRUE@ gcctestdir/ld two_file_shared_nonpic.so
+@FN_PTRS_IN_SO_WITHOUT_PIC_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@two_file_shared_2_nonpic_test_LDFLAGS = -Bgcctestdir/ -Wl,-R,.
+@FN_PTRS_IN_SO_WITHOUT_PIC_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@two_file_shared_2_nonpic_test_LDADD = two_file_shared_2_nonpic.so
+@FN_PTRS_IN_SO_WITHOUT_PIC_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@two_file_same_shared_nonpic_test_SOURCES = two_file_test_main.cc
+@FN_PTRS_IN_SO_WITHOUT_PIC_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@two_file_same_shared_nonpic_test_DEPENDENCIES = \
+@FN_PTRS_IN_SO_WITHOUT_PIC_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@ gcctestdir/ld two_file_shared_nonpic.so
-@GCC_TRUE@@NATIVE_LINKER_TRUE@two_file_same_shared_nonpic_test_LDFLAGS = -Bgcctestdir/ -Wl,-R,.
-@GCC_TRUE@@NATIVE_LINKER_TRUE@two_file_same_shared_nonpic_test_LDADD = two_file_shared_nonpic.so
-@GCC_TRUE@@NATIVE_LINKER_TRUE@two_file_separate_shared_12_nonpic_test_SOURCES = two_file_test_main.cc
-@GCC_TRUE@@NATIVE_LINKER_TRUE@two_file_separate_shared_12_nonpic_test_DEPENDENCIES = \
-@GCC_TRUE@@NATIVE_LINKER_TRUE@ gcctestdir/ld two_file_shared_1_nonpic.so two_file_shared_2_nonpic.so
+@FN_PTRS_IN_SO_WITHOUT_PIC_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@two_file_same_shared_nonpic_test_LDFLAGS = -Bgcctestdir/ -Wl,-R,.
+@FN_PTRS_IN_SO_WITHOUT_PIC_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@two_file_same_shared_nonpic_test_LDADD = two_file_shared_nonpic.so
+@FN_PTRS_IN_SO_WITHOUT_PIC_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@two_file_separate_shared_12_nonpic_test_SOURCES = two_file_test_main.cc
+@FN_PTRS_IN_SO_WITHOUT_PIC_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@two_file_separate_shared_12_nonpic_test_DEPENDENCIES = \
+@FN_PTRS_IN_SO_WITHOUT_PIC_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@ gcctestdir/ld two_file_shared_1_nonpic.so two_file_shared_2_nonpic.so
-@GCC_TRUE@@NATIVE_LINKER_TRUE@two_file_separate_shared_12_nonpic_test_LDFLAGS = -Bgcctestdir/ -Wl,-R,.
-@GCC_TRUE@@NATIVE_LINKER_TRUE@two_file_separate_shared_12_nonpic_test_LDADD = \
-@GCC_TRUE@@NATIVE_LINKER_TRUE@ two_file_shared_1_nonpic.so two_file_shared_2_nonpic.so
+@FN_PTRS_IN_SO_WITHOUT_PIC_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@two_file_separate_shared_12_nonpic_test_LDFLAGS = -Bgcctestdir/ -Wl,-R,.
+@FN_PTRS_IN_SO_WITHOUT_PIC_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@two_file_separate_shared_12_nonpic_test_LDADD = \
+@FN_PTRS_IN_SO_WITHOUT_PIC_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@ two_file_shared_1_nonpic.so two_file_shared_2_nonpic.so
-@GCC_TRUE@@NATIVE_LINKER_TRUE@two_file_separate_shared_21_nonpic_test_SOURCES = two_file_test_main.cc
-@GCC_TRUE@@NATIVE_LINKER_TRUE@two_file_separate_shared_21_nonpic_test_DEPENDENCIES = \
-@GCC_TRUE@@NATIVE_LINKER_TRUE@ gcctestdir/ld two_file_shared_1_nonpic.so two_file_shared_2_nonpic.so
+@FN_PTRS_IN_SO_WITHOUT_PIC_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@two_file_separate_shared_21_nonpic_test_SOURCES = two_file_test_main.cc
+@FN_PTRS_IN_SO_WITHOUT_PIC_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@two_file_separate_shared_21_nonpic_test_DEPENDENCIES = \
+@FN_PTRS_IN_SO_WITHOUT_PIC_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@ gcctestdir/ld two_file_shared_1_nonpic.so two_file_shared_2_nonpic.so
-@GCC_TRUE@@NATIVE_LINKER_TRUE@two_file_separate_shared_21_nonpic_test_LDFLAGS = -Bgcctestdir/ -Wl,-R,.
-@GCC_TRUE@@NATIVE_LINKER_TRUE@two_file_separate_shared_21_nonpic_test_LDADD = \
-@GCC_TRUE@@NATIVE_LINKER_TRUE@ two_file_shared_2_nonpic.so two_file_shared_1_nonpic.so
+@FN_PTRS_IN_SO_WITHOUT_PIC_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@two_file_separate_shared_21_nonpic_test_LDFLAGS = -Bgcctestdir/ -Wl,-R,.
+@FN_PTRS_IN_SO_WITHOUT_PIC_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@two_file_separate_shared_21_nonpic_test_LDADD = \
+@FN_PTRS_IN_SO_WITHOUT_PIC_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@ two_file_shared_2_nonpic.so two_file_shared_1_nonpic.so
@GCC_TRUE@@NATIVE_LINKER_TRUE@exception_test_SOURCES = \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ exception_test_main.cc \
@@ -988,12 +987,12 @@ uninstall-am: uninstall-info-am
@GCC_TRUE@@NATIVE_LINKER_TRUE@two_file_shared.so: two_file_test_1_pic.o two_file_test_2_pic.o
@GCC_TRUE@@NATIVE_LINKER_TRUE@ $(CXXLINK) -shared two_file_test_1_pic.o two_file_test_2_pic.o
-@GCC_TRUE@@NATIVE_LINKER_TRUE@two_file_shared_1_nonpic.so: two_file_test_1.o
-@GCC_TRUE@@NATIVE_LINKER_TRUE@ $(CXXLINK) -shared two_file_test_1.o
-@GCC_TRUE@@NATIVE_LINKER_TRUE@two_file_shared_2_nonpic.so: two_file_test_2.o
-@GCC_TRUE@@NATIVE_LINKER_TRUE@ $(CXXLINK) -shared two_file_test_2.o
-@GCC_TRUE@@NATIVE_LINKER_TRUE@two_file_shared_nonpic.so: two_file_test_1.o two_file_test_2.o
-@GCC_TRUE@@NATIVE_LINKER_TRUE@ $(CXXLINK) -shared two_file_test_1.o two_file_test_2.o
+@FN_PTRS_IN_SO_WITHOUT_PIC_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@two_file_shared_1_nonpic.so: two_file_test_1.o
+@FN_PTRS_IN_SO_WITHOUT_PIC_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@ $(CXXLINK) -shared two_file_test_1.o
+@FN_PTRS_IN_SO_WITHOUT_PIC_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@two_file_shared_2_nonpic.so: two_file_test_2.o
+@FN_PTRS_IN_SO_WITHOUT_PIC_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@ $(CXXLINK) -shared two_file_test_2.o
+@FN_PTRS_IN_SO_WITHOUT_PIC_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@two_file_shared_nonpic.so: two_file_test_1.o two_file_test_2.o
+@FN_PTRS_IN_SO_WITHOUT_PIC_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@ $(CXXLINK) -shared two_file_test_1.o two_file_test_2.o
@GCC_TRUE@@NATIVE_LINKER_TRUE@exception_test_1_pic.o: exception_test_1.cc
@GCC_TRUE@@NATIVE_LINKER_TRUE@ $(CXXCOMPILE) -c -fpic -o $@ $<