diff --git a/libiberty/ChangeLog b/libiberty/ChangeLog index 1805aa35b6a..a06b64bb72c 100644 --- a/libiberty/ChangeLog +++ b/libiberty/ChangeLog @@ -1,3 +1,7 @@ +Thu Oct 8 23:42:08 1998 Jeffrey A Law (law@cygnus.com) + + * Merge egcs & devo libiberty. + 1998-09-08 Martin von Löwis * cplus-dem.c (demangle_arm_pt): Demangle anonymous namespaces. @@ -20,6 +24,12 @@ Sat Sep 5 03:24:49 1998 Jeffrey A Law (law@cygnus.com) * getopt1.c, obstack.c: Similarly. * Makefile.in: Build mkstemp.o +Tue Sep 1 23:12:47 1998 Christopher Faylor + + * configure.in: Include asprintf in list of functions known not + to be in newlib. + * configure: Rebuild. + Wed Aug 19 14:05:01 1998 Mumit Khan * cplus-dem.c (work_stuff): Add dllimported. @@ -36,6 +46,35 @@ Mon Aug 17 10:40:34 1998 Kaveh R. Ghazi * cplus-dem.c: Include config.h if it exists. Also, only prototype malloc/realloc if we can't get stdlib.h. +Sat Aug 15 16:15:01 1998 Ian Lance Taylor + + * configure.in: Switch back to checking --with-target-subdir when + deciding whether to check for newlib, undoing part of July 15 + change. + * configure: Rebuild. + +Thu Aug 13 16:47:38 1998 Mark Mitchell + + * cplus-dem.c (type_kind_t): New type. + (demangle_template_value_parm): Add type_kind_t parameter. Rely + on this paramter, rather than demangling the type again. + (demangle_integral_value): Pass tk_integral. + (demangle_template_: Pass the value returned from do_type. + (do_type): Return a type_kind_t. Pass tk_integral to + demangle_template_value_parm for array bounds. + (demangle_fund_type): Likewise. + + Also incorporate from GCC version: + + Tue Jul 21 13:28:19 1998 Jason Merrill + + * cplus-dem.c (do_type): Use demangle_template_value_parm for arrays. + +Thu Aug 13 16:47:38 1998 Kaveh R. Ghazi + + * cplus-dem.c (demangle_nested_args): Make function definition + static to match the prototype. + Tue Jul 28 11:33:09 1998 Mark Mitchell * cplus-dem.c (type_kind_t): New type. @@ -53,16 +92,32 @@ Tue Jul 28 11:33:09 1998 Mark Mitchell * cplus-dem.c (do_type): Use demangle_template_value_parm for arrays. +Mon Jul 27 12:16:08 1998 Ian Lance Taylor + + * Makefile.in (ALLOCA): New variable. + ($(TARGETLIB)): Add $(ALLOCA) to library. + (needed-list): Add $(ALLOCA). + ($(ALLOCA)): Depend upon stamp-picdir. + Sun Jul 19 08:23:17 1998 Kaveh R. Ghazi * cplus-dem.c (demangle_nested_args): Make function definition static to match the prototype. -1998-07-13 Mark Mitchell +Wed Jul 15 00:12:58 1998 Ian Lance Taylor - * cplus-dem.c: Incorporate changes from GCC version not present in - the libiberty version: - (string): Move definition before work_stuff. + * configure.in: Check --with-cross-host rather than + --with-target-subdir when deciding whether build uses a cross + compiler, and when deciding where to install the library. + * configure: Rebuild. + +Sun Jul 12 01:27:05 1998 Jason Merrill + + * cplus-dem.c (demangle_nested_args): Return a value. + +Sat Jul 11 16:19:48 1998 Mark Mitchell + + * cplus-dem.c (string): Move definition before work_stuff. (work_stuff): Add volatile_type, forgetting_types, previous_argument, and nrepeats fields. (SCOPE_STRING): New macro. @@ -91,24 +146,47 @@ Sun Jul 19 08:23:17 1998 Kaveh R. Ghazi (do_arg): Improve commment. Handle 'n' repeat code. (remember_type): Check forgetting_types. (demangle_args): Deal with 'n' repeat codes. Tidy. + +Thu Jul 2 16:26:24 1998 Ian Lance Taylor + + * config.table: Only use mh-fbsd21 on *-*-freebsd2.2.[012], not on + *-*-freebsd2.2.*. From Dmitrij Tejblum . + +Mon Jun 15 16:29:01 1998 Ian Lance Taylor + + * configure.in (setobjs): Correct quoting error in cygwin32 case. + From Chris Faylor . + +Mon Jun 1 13:47:55 1998 Jason Molenda (crash@bugshack.cygnus.com) + + * obstack.c: Update to latest FSF version. + +Mon Jun 1 14:17:36 1998 Mike Stump + + * Makefile.in: Add a dependency on stamp-picdir for the + objects, so that we can do a parallel build. Sat May 30 22:17:13 1998 Mumit Khan * configure.in (checkfuncs): Add missing "'". -Fri May 22 11:06:41 1998 Andreas Schwab +Fri May 29 12:40:41 1998 Jason Molenda (crash@bugshack.cygnus.com) - * Makefile.in (distclean): Don't remove alloca-conf.h + * obstack.c (_obstack_memory_used): Elide this function if we're + on a system with GNU libc. + +Tue May 26 18:28:43 1998 Ian Lance Taylor + + * Makefile.in (distclean): Remove config.log. + +Tue May 26 15:01:52 1998 Andreas Schwab + + * Makefile.in (distclean): Don't remove alloca-conf.h. Fri May 22 01:38:07 1998 Hans-Peter Nilsson * cplus-dem.c (MBUF_SIZE): Bumped from 512 to 32767. -Fri May 22 01:19:28 1998 Mike Stump - - * Makefile.in: Add a dependency on stamp-picdir for the - objects, so that we can do a parallel build. - 1998-05-21 Mark Mitchell * cplus-dem.c (do_type): Handle volatile qualification. diff --git a/libiberty/Makefile.in b/libiberty/Makefile.in index edc6440f0d2..606e0cf5038 100644 --- a/libiberty/Makefile.in +++ b/libiberty/Makefile.in @@ -64,6 +64,7 @@ MAKEOVERRIDES = TARGETLIB = libiberty.a LIBOBJS = @LIBOBJS@ +ALLOCA = @ALLOCA@ # A configuration can specify extra .o files that should be included, # even if they are in libc. (Perhaps the libc version is buggy.) @@ -127,10 +128,10 @@ REQUIRED_OFILES = argv.o choose-temp.o concat.o cplus-dem.o \ floatformat.o mkstemp.o objalloc.o obstack.o pexecute.o spaces.o strerror.o \ strsignal.o xatexit.o xexit.o xmalloc.o xstrdup.o xstrerror.o -$(TARGETLIB): $(REQUIRED_OFILES) $(EXTRA_OFILES) $(LIBOBJS) +$(TARGETLIB): $(REQUIRED_OFILES) $(EXTRA_OFILES) $(LIBOBJS) $(ALLOCA) rm -f $(TARGETLIB) $(AR) $(AR_FLAGS) $(TARGETLIB) \ - $(REQUIRED_OFILES) $(EXTRA_OFILES) $(LIBOBJS) + $(REQUIRED_OFILES) $(EXTRA_OFILES) $(LIBOBJS) $(ALLOCA) $(RANLIB) $(TARGETLIB) INSTALL_DEST = @INSTALL_DEST@ @@ -150,7 +151,7 @@ install_to_tooldir: all # needed-list is used by libstdc++. needed-list: Makefile - f="$(LIBOBJS) $(EXTRA_OFILES)"; \ + f="$(LIBOBJS) $(ALLOCA) $(EXTRA_OFILES)"; \ case $$f in \ *alloca.o*) f="$$f xmalloc.o xexit.o" ;; \ esac; \ @@ -196,6 +197,7 @@ clean: mostlyclean distclean: clean @$(MULTICLEAN) multi-clean DO=distclean rm -f *~ Makefile config.status xhost-mkfrag TAGS multilib.out + rm -f config.log maintainer-clean realclean: distclean force: @@ -210,7 +212,7 @@ stamp-h: config.in config.status config.status: $(srcdir)/configure $(srcdir)/config.table $(SHELL) ./config.status --recheck -$(REQUIRED_OFILES) $(EXTRA_OFILES) $(LIBOBJS): stamp-picdir +$(REQUIRED_OFILES) $(EXTRA_OFILES) $(LIBOBJS) $(ALLOCA): stamp-picdir alloca.o: config.h atexit.o: config.h diff --git a/libiberty/config.table b/libiberty/config.table index 828b3b2bfe0..00944f319e8 100644 --- a/libiberty/config.table +++ b/libiberty/config.table @@ -3,7 +3,7 @@ case "${host}" in frag=mh-aix ;; *-*-cxux7*) frag=mh-cxux7 ;; *-*-freebsd2.1.*) frag=mh-fbsd21 ;; - *-*-freebsd2.2.*) frag=mh-fbsd21 ;; + *-*-freebsd2.2.[012]) frag=mh-fbsd21 ;; i[345]86-*-windows*) frag=mh-windows ;; esac diff --git a/libiberty/configure b/libiberty/configure index 7de36aa2149..6843ccf0366 100755 --- a/libiberty/configure +++ b/libiberty/configure @@ -12,7 +12,9 @@ ac_help= ac_default_prefix=/usr/local # Any additions from configure.in: ac_help="$ac_help - --with-target-subdir=SUBDIR Configuring with a cross compiler" + --with-target-subdir=SUBDIR Configuring in a subdirectory" +ac_help="$ac_help + --with-cross-host=HOST Configuring with a cross compiler" ac_help="$ac_help --with-newlib Configuring with newlib" @@ -530,6 +532,12 @@ if test "${with_target_subdir+set}" = set; then : fi +# Check whether --with-cross-host or --without-cross-host was given. +if test "${with_cross_host+set}" = set; then + withval="$with_cross_host" + : +fi + # Check whether --with-newlib or --without-newlib was given. if test "${with_newlib+set}" = set; then withval="$with_newlib" @@ -577,7 +585,7 @@ else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; } fi echo $ac_n "checking host system type""... $ac_c" 1>&6 -echo "configure:581: checking host system type" >&5 +echo "configure:589: checking host system type" >&5 host_alias=$host case "$host_alias" in @@ -600,7 +608,7 @@ echo "$ac_t""$host" 1>&6 echo $ac_n "checking build system type""... $ac_c" 1>&6 -echo "configure:604: checking build system type" >&5 +echo "configure:612: checking build system type" >&5 build_alias=$build case "$build_alias" in @@ -626,7 +634,7 @@ fi # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. set dummy ${ac_tool_prefix}ar; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:630: checking for $ac_word" >&5 +echo "configure:638: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -657,7 +665,7 @@ fi # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:661: checking for $ac_word" >&5 +echo "configure:669: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -688,7 +696,7 @@ if test -n "$ac_tool_prefix"; then # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:692: checking for $ac_word" >&5 +echo "configure:700: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -732,7 +740,7 @@ fi # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:736: checking for $ac_word" >&5 +echo "configure:744: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -761,7 +769,7 @@ if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:765: checking for $ac_word" >&5 +echo "configure:773: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -809,7 +817,7 @@ fi fi echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 -echo "configure:813: checking whether we are using GNU C" >&5 +echo "configure:821: checking whether we are using GNU C" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -818,7 +826,7 @@ else yes; #endif EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:822: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then +if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:830: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gcc=yes else ac_cv_prog_gcc=no @@ -833,7 +841,7 @@ if test $ac_cv_prog_gcc = yes; then ac_save_CFLAGS="$CFLAGS" CFLAGS= echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:837: checking whether ${CC-cc} accepts -g" >&5 +echo "configure:845: checking whether ${CC-cc} accepts -g" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -862,7 +870,7 @@ fi echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6 -echo "configure:866: checking for POSIXized ISC" >&5 +echo "configure:874: checking for POSIXized ISC" >&5 if test -d /etc/conf/kconfig.d && grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1 then @@ -900,7 +908,7 @@ fi # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./install, which can be erroneously created by make from ./install.sh. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 -echo "configure:904: checking for a BSD compatible install" >&5 +echo "configure:912: checking for a BSD compatible install" >&5 if test -z "$INSTALL"; then if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -959,7 +967,7 @@ host_makefile_frag=${frag} # able to link anything, it had better be able to at least compile # something. echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:963: checking how to run the C preprocessor" >&5 +echo "configure:971: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= @@ -974,13 +982,13 @@ else # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:984: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:992: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then : @@ -991,13 +999,13 @@ else rm -rf conftest* CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1001: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1009: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then : @@ -1023,17 +1031,17 @@ for ac_hdr in sys/file.h sys/param.h stdlib.h string.h unistd.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:1027: checking for $ac_hdr" >&5 +echo "configure:1035: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1037: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1045: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -1111,12 +1119,12 @@ if test "x" = "y"; then for ac_func in asprintf atexit basename bcmp bcopy bzero clock getcwd do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:1115: checking for $ac_func" >&5 +echo "configure:1123: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1151: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -1166,12 +1174,12 @@ done for ac_func in getpagesize index insque memchr memcmp memcpy memmove do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:1170: checking for $ac_func" >&5 +echo "configure:1178: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1206: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -1221,12 +1229,12 @@ done for ac_func in memset random rename rindex sigsetmask strcasecmp do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:1225: checking for $ac_func" >&5 +echo "configure:1233: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1261: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -1276,12 +1284,12 @@ done for ac_func in strchr strdup strncasecmp strrchr strstr strtod strtol do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:1280: checking for $ac_func" >&5 +echo "configure:1288: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1316: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -1331,12 +1339,12 @@ done for ac_func in strtoul tmpnam vasprintf vfprintf vprintf vsprintf waitpid do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:1335: checking for $ac_func" >&5 +echo "configure:1343: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1371: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -1398,12 +1406,12 @@ EOF for ac_func in getrusage on_exit psignal strerror strsignal sysconf times do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:1402: checking for $ac_func" >&5 +echo "configure:1410: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1438: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -1460,20 +1468,21 @@ fi setobjs= if test -n "${with_target_subdir}"; then - # We are being configured with a cross compiler. AC_REPLACE_FUNCS + # We are being configured as a target library. AC_REPLACE_FUNCS # may not work correctly, because the compiler may not be able to - # link executables. + # link executables. Note that we may still be being configured + # native. # If we are being configured for newlib, we know which functions # newlib provide and which ones we will be expected to provide. if test "x${with_newlib}" = "xyes"; then ALLOCA="alloca.o" - LIBOBJS="basename.o insque.o random.o strdup.o vasprintf.o" + LIBOBJS="asprintf.o basename.o insque.o random.o strdup.o vasprintf.o" for f in $funcs; do case "$f" in - basename | insque | random | strdup | vasprintf) + asprintf | basename | insque | random | strdup | vasprintf) ;; *) n=HAVE_`echo $f | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` @@ -1488,7 +1497,7 @@ EOF # newlib doesnt provide any of the variables in $vars, so we # dont have to check them here. - # Of the functions in $checkfuncs, VxWorks only has strerror. + # Of the functions in $checkfuncs, newlib only has strerror. cat >> confdefs.h <<\EOF #define HAVE_STRERROR 1 EOF @@ -1580,7 +1589,7 @@ EOF # We haven't set the list of objects yet. Use the standard autoconf # tests. This will only work if the compiler works. echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:1584: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo "configure:1593: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. @@ -1590,11 +1599,11 @@ ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1607: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then ac_cv_prog_cc_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then @@ -1614,19 +1623,19 @@ if test $ac_cv_prog_cc_works = no; then { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:1618: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:1627: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 cross_compiling=$ac_cv_prog_cc_cross for ac_func in $funcs do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:1625: checking for $ac_func" >&5 +echo "configure:1634: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1662: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -1678,19 +1687,19 @@ done # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works # for constant arguments. Useless! echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6 -echo "configure:1682: checking for working alloca.h" >&5 +echo "configure:1691: checking for working alloca.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { char *p = alloca(2 * sizeof(int)); ; return 0; } EOF -if { (eval echo configure:1694: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1703: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* ac_cv_header_alloca_h=yes else @@ -1711,12 +1720,12 @@ EOF fi echo $ac_n "checking for alloca""... $ac_c" 1>&6 -echo "configure:1715: checking for alloca" >&5 +echo "configure:1724: checking for alloca" >&5 if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1752: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* ac_cv_func_alloca_works=yes else @@ -1771,12 +1780,12 @@ EOF echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6 -echo "configure:1775: checking whether alloca needs Cray hooks" >&5 +echo "configure:1784: checking whether alloca needs Cray hooks" >&5 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&6 if test $ac_cv_os_cray = yes; then for ac_func in _getb67 GETB67 getb67; do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:1805: checking for $ac_func" >&5 +echo "configure:1814: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1842: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -1856,7 +1865,7 @@ done fi echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6 -echo "configure:1860: checking stack direction for C alloca" >&5 +echo "configure:1869: checking stack direction for C alloca" >&5 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1864,7 +1873,7 @@ else ac_cv_c_stack_direction=0 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:1896: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_c_stack_direction=1 else @@ -1905,12 +1914,12 @@ EOF fi echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:1909: checking for ANSI C header files" >&5 +echo "configure:1918: checking for ANSI C header files" >&5 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -1918,7 +1927,7 @@ else #include EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1922: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1931: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -1935,7 +1944,7 @@ rm -f conftest* if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -1953,7 +1962,7 @@ fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -1974,7 +1983,7 @@ if test "$cross_compiling" = yes; then : else cat > conftest.$ac_ext < #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') @@ -1985,7 +1994,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } EOF -if { (eval echo configure:1989: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:1998: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then : else @@ -2009,12 +2018,12 @@ EOF fi echo $ac_n "checking for pid_t""... $ac_c" 1>&6 -echo "configure:2013: checking for pid_t" >&5 +echo "configure:2022: checking for pid_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -2043,17 +2052,17 @@ fi ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for vfork.h""... $ac_c" 1>&6 -echo "configure:2047: checking for vfork.h" >&5 +echo "configure:2056: checking for vfork.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2057: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2066: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -2078,18 +2087,18 @@ else fi echo $ac_n "checking for working vfork""... $ac_c" 1>&6 -echo "configure:2082: checking for working vfork" >&5 +echo "configure:2091: checking for working vfork" >&5 if eval "test \"`echo '$''{'ac_cv_func_vfork_works'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test "$cross_compiling" = yes; then echo $ac_n "checking for vfork""... $ac_c" 1>&6 -echo "configure:2088: checking for vfork" >&5 +echo "configure:2097: checking for vfork" >&5 if eval "test \"`echo '$''{'ac_cv_func_vfork'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2125: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_vfork=yes" else @@ -2134,7 +2143,7 @@ fi ac_cv_func_vfork_works=$ac_cv_func_vfork else cat > conftest.$ac_ext < @@ -2229,7 +2238,7 @@ main() { } } EOF -if { (eval echo configure:2233: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2242: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_func_vfork_works=yes else @@ -2256,19 +2265,19 @@ fi fi for v in $vars; do echo $ac_n "checking for $v""... $ac_c" 1>&6 -echo "configure:2260: checking for $v" >&5 +echo "configure:2269: checking for $v" >&5 if eval "test \"`echo '$''{'libiberty_cv_var_$v'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2281: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "libiberty_cv_var_$v=yes" else @@ -2294,12 +2303,12 @@ EOF for ac_func in $checkfuncs do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:2298: checking for $ac_func" >&5 +echo "configure:2307: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2335: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -2350,7 +2359,7 @@ fi # Install a library built with a cross compiler in $(tooldir) rather # than $(libdir). -if test -z "${with_target_subdir}"; then +if test -z "${with_cross_host}"; then INSTALL_DEST=libdir else INSTALL_DEST=tooldir diff --git a/libiberty/configure.in b/libiberty/configure.in index b81e009bb58..5ce8b609aad 100644 --- a/libiberty/configure.in +++ b/libiberty/configure.in @@ -5,7 +5,9 @@ AC_INIT(pexecute.c) dnl We use these options to decide which functions to include. AC_ARG_WITH(target-subdir, -[ --with-target-subdir=SUBDIR Configuring with a cross compiler]) +[ --with-target-subdir=SUBDIR Configuring in a subdirectory]) +AC_ARG_WITH(cross-host, +[ --with-cross-host=HOST Configuring with a cross compiler]) AC_ARG_WITH(newlib, [ --with-newlib Configuring with newlib]) @@ -173,20 +175,21 @@ fi setobjs= if test -n "${with_target_subdir}"; then - # We are being configured with a cross compiler. AC_REPLACE_FUNCS + # We are being configured as a target library. AC_REPLACE_FUNCS # may not work correctly, because the compiler may not be able to - # link executables. + # link executables. Note that we may still be being configured + # native. # If we are being configured for newlib, we know which functions # newlib provide and which ones we will be expected to provide. if test "x${with_newlib}" = "xyes"; then ALLOCA="alloca.o" - LIBOBJS="basename.o insque.o random.o strdup.o vasprintf.o" + LIBOBJS="asprintf.o basename.o insque.o random.o strdup.o vasprintf.o" for f in $funcs; do case "$f" in - basename | insque | random | strdup | vasprintf) + asprintf | basename | insque | random | strdup | vasprintf) ;; *) n=HAVE_`echo $f | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` @@ -198,7 +201,7 @@ if test -n "${with_target_subdir}"; then # newlib doesnt provide any of the variables in $vars, so we # dont have to check them here. - # Of the functions in $checkfuncs, VxWorks only has strerror. + # Of the functions in $checkfuncs, newlib only has strerror. AC_DEFINE(HAVE_STRERROR) setobjs=yes @@ -300,7 +303,7 @@ fi # Install a library built with a cross compiler in $(tooldir) rather # than $(libdir). -if test -z "${with_target_subdir}"; then +if test -z "${with_cross_host}"; then INSTALL_DEST=libdir else INSTALL_DEST=tooldir