aboutsummaryrefslogtreecommitdiff
path: root/gold/configure
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>2008-03-28 22:42:34 +0000
committerIan Lance Taylor <ian@airs.com>2008-03-28 22:42:34 +0000
commit2fd322316ec7699c44d24b1c465c80ada336754d (patch)
tree9f4f290c5d9e5efe79544cfaf10a3c62f63b83d3 /gold/configure
parent2460c166aeb65cd1664234dfebbd779c77ee2956 (diff)
downloadgdb-2fd322316ec7699c44d24b1c465c80ada336754d.zip
gdb-2fd322316ec7699c44d24b1c465c80ada336754d.tar.gz
gdb-2fd322316ec7699c44d24b1c465c80ada336754d.tar.bz2
* layout.cc (Layout::layout): If we see an input section with a
name that needs sorting, set the must_sort flag for the output section. (Layout::make_output_section): If the name of the output section indicates that it might require sorting, set the may_sort flag. * output.h (Output_section::may_sort_attached_input_sections): New function. (Output_section::set_may_sort_attached_input_sections): New function. (Output_section::must_sort_attached_input_sections): New function. (Output_section::set_must_sort_attached_input_sections): New function. (class Output_section): Declare Input_section_sort_entry. Define Input_section_sort_compare. Declare sort_attached_input_sections. Add new fields: may_sort_attached_input_sections_, must_sort_attached_input_sections_, attached_input_sections_are_sorted_. * output.cc (Output_section::Output_section): Initialize new fields. (Output_section::add_input_section): Add an entry to input_sections_ if may_sort or must_sort are true. (Output_section::set_final_data_size): Call sort_attached_input_sections if necessary. (Output_section::Input_section_sort_entry): Define new class. (Output_section::Input_section_sort_compare::operator()): New function. (Output_section::sort_attached_input_sections): New function. * configure.ac: Check whether the compiler supports constructor priorities. Define a CONSTRUCTOR_PRIORITY automake conditional. * testsuite/initpri1.c: New file. * testsuite/Makefile.am (check_PROGRAMS): Add initpri1 if CONSTRUCTOR_PRIORITY. (initpri1_SOURCES, initpri1_DEPENDENCIES): New variables. (initpri1_LDFLAGS): New variable. * configure, Makefile.in, testsuite/Makefile.in: Rebuild.
Diffstat (limited to 'gold/configure')
-rwxr-xr-xgold/configure64
1 files changed, 63 insertions, 1 deletions
diff --git a/gold/configure b/gold/configure
index 01cdf16..8076b8e 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 THREADS_TRUE THREADS_FALSE 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 OBJDUMP_AND_CPPFILT_TRUE OBJDUMP_AND_CPPFILT_FALSE READELF_TRUE READELF_FALSE FN_PTRS_IN_SO_WITHOUT_PIC_TRUE FN_PTRS_IN_SO_WITHOUT_PIC_FALSE TLS_TRUE TLS_FALSE STATIC_TLS_TRUE STATIC_TLS_FALSE WARN_CFLAGS NO_WERROR WARN_CXXFLAGS LFS_CFLAGS LIBOBJS CPP EGREP CXXCPP 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 THREADS_TRUE THREADS_FALSE 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 OBJDUMP_AND_CPPFILT_TRUE OBJDUMP_AND_CPPFILT_FALSE READELF_TRUE READELF_FALSE FN_PTRS_IN_SO_WITHOUT_PIC_TRUE FN_PTRS_IN_SO_WITHOUT_PIC_FALSE TLS_TRUE TLS_FALSE STATIC_TLS_TRUE STATIC_TLS_FALSE CONSTRUCTOR_PRIORITY_TRUE CONSTRUCTOR_PRIORITY_FALSE WARN_CFLAGS NO_WERROR WARN_CXXFLAGS LFS_CFLAGS LIBOBJS CPP EGREP CXXCPP MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT LTLIBOBJS'
ac_subst_files=''
# Initialize some variables set by options.
@@ -4651,6 +4651,59 @@ else
fi
+echo "$as_me:$LINENO: checking for constructor priorities" >&5
+echo $ECHO_N "checking for constructor priorities... $ECHO_C" >&6
+if test "${gold_cv_c_conprio+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+void f() __attribute__ ((constructor (1)));
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ gold_cv_c_conprio=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+gold_cv_c_conprio=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $gold_cv_c_conprio" >&5
+echo "${ECHO_T}$gold_cv_c_conprio" >&6
+
+
+
+if test "$gold_cv_c_conprio" = "yes"; then
+ CONSTRUCTOR_PRIORITY_TRUE=
+ CONSTRUCTOR_PRIORITY_FALSE='#'
+else
+ CONSTRUCTOR_PRIORITY_TRUE='#'
+ CONSTRUCTOR_PRIORITY_FALSE=
+fi
+
+
GCC_WARN_CFLAGS="-W -Wall -Wstrict-prototypes -Wmissing-prototypes"
@@ -6501,6 +6554,13 @@ echo "$as_me: error: conditional \"STATIC_TLS\" was never defined.
Usually this means the macro was only invoked conditionally." >&2;}
{ (exit 1); exit 1; }; }
fi
+if test -z "${CONSTRUCTOR_PRIORITY_TRUE}" && test -z "${CONSTRUCTOR_PRIORITY_FALSE}"; then
+ { { echo "$as_me:$LINENO: error: conditional \"CONSTRUCTOR_PRIORITY\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"CONSTRUCTOR_PRIORITY\" 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
@@ -7142,6 +7202,8 @@ s,@TLS_TRUE@,$TLS_TRUE,;t t
s,@TLS_FALSE@,$TLS_FALSE,;t t
s,@STATIC_TLS_TRUE@,$STATIC_TLS_TRUE,;t t
s,@STATIC_TLS_FALSE@,$STATIC_TLS_FALSE,;t t
+s,@CONSTRUCTOR_PRIORITY_TRUE@,$CONSTRUCTOR_PRIORITY_TRUE,;t t
+s,@CONSTRUCTOR_PRIORITY_FALSE@,$CONSTRUCTOR_PRIORITY_FALSE,;t t
s,@WARN_CFLAGS@,$WARN_CFLAGS,;t t
s,@NO_WERROR@,$NO_WERROR,;t t
s,@WARN_CXXFLAGS@,$WARN_CXXFLAGS,;t t