From: DJ Delorie Date: Wed, 3 Sep 2003 00:03:18 +0000 (+0000) Subject: merge from gcc X-Git-Tag: ezannoni_pie-20030916-branchpoint~183 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=60b04ee881f1a448f92b009ff39ae40ddf723465;p=external%2Fbinutils.git merge from gcc --- diff --git a/libiberty/ChangeLog b/libiberty/ChangeLog index 3ea130d..8581dae 100644 --- a/libiberty/ChangeLog +++ b/libiberty/ChangeLog @@ -1,3 +1,9 @@ +2003-09-02 John David Anglin + + PR bootstrap/12100 + * aclocal.m4 (AC_LANG_FUNC_LINK_TRY): Define. + * configure: Rebuilt. + 2003-08-27 Daniel Jacobowitz * aclocal.m4: Include acx.m4 and no-executables.m4. diff --git a/libiberty/aclocal.m4 b/libiberty/aclocal.m4 index 118cb02..f33e0c6 100644 --- a/libiberty/aclocal.m4 +++ b/libiberty/aclocal.m4 @@ -180,3 +180,52 @@ AC_DEFINE_UNQUOTED(STACK_DIRECTION, $ac_cv_c_stack_direction, STACK_DIRECTION < 0 => grows toward lower addresses STACK_DIRECTION = 0 => direction of growth unknown]) ]) + +# AC_LANG_FUNC_LINK_TRY(C)(FUNCTION) +# ---------------------------------- +# Don't include because on OSF/1 3.0 it includes +# which includes which contains a +# prototype for select. Similarly for bzero. +# +# This test used to merely assign f=$1 in main(), but that was +# optimized away by HP unbundled cc A.05.36 for ia64 under +O3, +# presumably on the basis that there's no need to do that store if the +# program is about to exit. Conversely, the AIX linker optimizes an +# unused external declaration that initializes f=$1. So this test +# program has both an external initialization of f, and a use of f in +# main that affects the exit status. +# +m4_define([AC_LANG_FUNC_LINK_TRY(C)], +[AC_LANG_PROGRAM( +[/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $1 (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. Under hpux, + including includes and causes problems + checking for functions defined therein. */ +#if defined (__STDC__) && !defined (_HPUX_SOURCE) +# include +#else +# include +#endif +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +{ +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $1 (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$1) || defined (__stub___$1) +choke me +#else +char (*f) () = $1; +#endif +#ifdef __cplusplus +} +#endif +], [return f != $1;])]) + diff --git a/libiberty/configure b/libiberty/configure index 9d6b2cf..98a641e 100755 --- a/libiberty/configure +++ b/libiberty/configure @@ -923,7 +923,7 @@ ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd` else echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi - cd "$ac_popdir" + cd $ac_popdir done fi @@ -1120,7 +1120,7 @@ _ASBOX echo "$as_me: caught signal $ac_signal" echo "$as_me: exit $exit_status" } >&5 - rm -f core *.core && + rm -f core core.* *.core && rm -rf conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status ' 0 @@ -2486,7 +2486,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then for ac_declaration in \ - '' \ + ''\ + '#include ' \ 'extern "C" void std::exit (int) throw (); using std::exit;' \ 'extern "C" void std::exit (int); using std::exit;' \ 'extern "C" void exit (int) throw ();' \ @@ -2500,8 +2501,8 @@ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -$ac_declaration #include +$ac_declaration int main () { @@ -2976,7 +2977,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_c_bigendian=yes fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi fi @@ -3529,7 +3530,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_header_stdc=no fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi fi @@ -4220,8 +4221,10 @@ cat >>conftest.$ac_ext <<_ACEOF /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ -#ifdef __STDC__ + exists even on freestanding compilers. Under hpux, + including includes and causes problems + checking for functions defined therein. */ +#if defined (__STDC__) && !defined (_HPUX_SOURCE) # include #else # include @@ -4645,8 +4648,10 @@ cat >>conftest.$ac_ext <<_ACEOF /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ -#ifdef __STDC__ + exists even on freestanding compilers. Under hpux, + including includes and causes problems + checking for functions defined therein. */ +#if defined (__STDC__) && !defined (_HPUX_SOURCE) # include #else # include @@ -4766,8 +4771,10 @@ cat >>conftest.$ac_ext <<_ACEOF /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ -#ifdef __STDC__ + exists even on freestanding compilers. Under hpux, + including includes and causes problems + checking for functions defined therein. */ +#if defined (__STDC__) && !defined (_HPUX_SOURCE) # include #else # include @@ -4886,7 +4893,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_c_stack_direction=-1 fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi echo "$as_me:$LINENO: result: $ac_cv_c_stack_direction" >&5 @@ -5065,8 +5072,10 @@ cat >>conftest.$ac_ext <<_ACEOF /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ -#ifdef __STDC__ + exists even on freestanding compilers. Under hpux, + including includes and causes problems + checking for functions defined therein. */ +#if defined (__STDC__) && !defined (_HPUX_SOURCE) # include #else # include @@ -5173,7 +5182,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_func_fork_works=no fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi echo "$as_me:$LINENO: result: $ac_cv_func_fork_works" >&5 @@ -5328,7 +5337,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_func_vfork_works=no fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi echo "$as_me:$LINENO: result: $ac_cv_func_vfork_works" >&5 @@ -5393,8 +5402,10 @@ cat >>conftest.$ac_ext <<_ACEOF /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ -#ifdef __STDC__ + exists even on freestanding compilers. Under hpux, + including includes and causes problems + checking for functions defined therein. */ +#if defined (__STDC__) && !defined (_HPUX_SOURCE) # include #else # include @@ -5486,8 +5497,10 @@ cat >>conftest.$ac_ext <<_ACEOF /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ -#ifdef __STDC__ + exists even on freestanding compilers. Under hpux, + including includes and causes problems + checking for functions defined therein. */ +#if defined (__STDC__) && !defined (_HPUX_SOURCE) # include #else # include @@ -5688,8 +5701,10 @@ cat >>conftest.$ac_ext <<_ACEOF /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ -#ifdef __STDC__ + exists even on freestanding compilers. Under hpux, + including includes and causes problems + checking for functions defined therein. */ +#if defined (__STDC__) && !defined (_HPUX_SOURCE) # include #else # include @@ -6006,8 +6021,10 @@ cat >>conftest.$ac_ext <<_ACEOF /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ -#ifdef __STDC__ + exists even on freestanding compilers. Under hpux, + including includes and causes problems + checking for functions defined therein. */ +#if defined (__STDC__) && !defined (_HPUX_SOURCE) # include #else # include @@ -6233,7 +6250,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_func_mmap_fixed_mapped=no fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi echo "$as_me:$LINENO: result: $ac_cv_func_mmap_fixed_mapped" >&5 @@ -6346,7 +6363,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_func_strncmp_works=no fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi rm -f core core.* *.core fi