diff options
author | Alan Modra <amodra@gmail.com> | 2000-02-23 13:52:23 +0000 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2000-02-23 13:52:23 +0000 |
commit | 5b93d8bb517c1f5715435dcf627a8642f557ddb2 (patch) | |
tree | e09626193185adb6455a6251622f32180183db5c /bfd | |
parent | ab91fdd5f80265ca7aabee53c9626d393ea8eb86 (diff) | |
download | gdb-5b93d8bb517c1f5715435dcf627a8642f557ddb2.zip gdb-5b93d8bb517c1f5715435dcf627a8642f557ddb2.tar.gz gdb-5b93d8bb517c1f5715435dcf627a8642f557ddb2.tar.bz2 |
Add IBM 370 support.
Diffstat (limited to 'bfd')
-rw-r--r-- | bfd/ChangeLog | 23 | ||||
-rw-r--r-- | bfd/Makefile.am | 7 | ||||
-rw-r--r-- | bfd/Makefile.in | 7 | ||||
-rw-r--r-- | bfd/archures.c | 3 | ||||
-rw-r--r-- | bfd/bfd-in.h | 2 | ||||
-rw-r--r-- | bfd/bfd-in2.h | 6 | ||||
-rw-r--r-- | bfd/config.bfd | 5 | ||||
-rwxr-xr-x | bfd/configure | 994 | ||||
-rw-r--r-- | bfd/configure.in | 8 | ||||
-rw-r--r-- | bfd/cpu-i370.c | 94 | ||||
-rw-r--r-- | bfd/elf.c | 5 | ||||
-rw-r--r-- | bfd/elf32-i370.c | 1745 | ||||
-rw-r--r-- | bfd/libbfd.h | 1 | ||||
-rw-r--r-- | bfd/reloc.c | 7 | ||||
-rw-r--r-- | bfd/targets.c | 4 |
15 files changed, 2458 insertions, 453 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 5d4d4a2..6613b47 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,26 @@ +2000-02-23 Alan Modra <alan@spri.levels.unisa.edu.au> + + * bfd-in.h: Update copyright date. + +2000-02-23 Linas Vepstas <linas@linas.org> + + * cpu-i370.c: New file. + * elf32-i370.c: New file. + * archures.c (enum bfd_architecture): Add bfd_arch_i370. + (bfd_i370_arch): New. + (bfd_archures_list): Add bfd_i370_arch. + * elf.c (prep_headers): Add bfd_arch_i370. + * Makefile.am: Add support for IBM 370 elf. + * config.bfd: Likewise. + * configure.in: Likewise. + * libbfd.h (bfd_reloc_code_real_names): Likewise. + * reloc.c (bfd_reloc_code_type): Likewise. + * targets.c: Likewise. + + * Makefile.in: Regenerate. + * configure: Regenerate. + * bfd-in2.h: Regenerate. + 2000-02-22 Ian Lance Taylor <ian@zembu.com> * elf32-i386.c (elf_i386_info_to_howto_rel): Give a warning for diff --git a/bfd/Makefile.am b/bfd/Makefile.am index 22fb255..f014439 100644 --- a/bfd/Makefile.am +++ b/bfd/Makefile.am @@ -47,6 +47,7 @@ ALL_MACHINES = \ cpu-h8300.lo \ cpu-h8500.lo \ cpu-hppa.lo \ + cpu-i370.lo \ cpu-i386.lo \ cpu-i860.lo \ cpu-i960.lo \ @@ -82,6 +83,7 @@ ALL_MACHINES_CFILES = \ cpu-h8300.c \ cpu-h8500.c \ cpu-hppa.c \ + cpu-i370.c \ cpu-i386.c \ cpu-i860.c \ cpu-i960.c \ @@ -159,6 +161,7 @@ BFD32_BACKENDS = \ elf32-d30v.lo \ elf32-fr30.lo \ elf32-gen.lo \ + elf32-i370.lo \ elf32-i386.lo \ elf32-i860.lo \ elf32-i960.lo \ @@ -283,6 +286,7 @@ BFD32_BACKENDS_CFILES = \ elf32-d30v.c \ elf32-fr30.c \ elf32-gen.c \ + elf32-i370.c \ elf32-i386.c \ elf32-i860.c \ elf32-i960.c \ @@ -850,6 +854,9 @@ elf32-fr30.lo: elf32-fr30.c elf-bfd.h $(INCDIR)/elf/common.h \ elf32-gen.lo: elf32-gen.c elf-bfd.h $(INCDIR)/elf/common.h \ $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h \ elf32-target.h +elf32-i370.lo: elf32-i370.c elf-bfd.h $(INCDIR)/elf/common.h \ + $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h \ + elf32-target.h elf32-i386.lo: elf32-i386.c $(INCDIR)/bfdlink.h elf-bfd.h \ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ $(INCDIR)/elf/i386.h $(INCDIR)/elf/reloc-macros.h elf32-target.h diff --git a/bfd/Makefile.in b/bfd/Makefile.in index 31dc267..73315b4 100644 --- a/bfd/Makefile.in +++ b/bfd/Makefile.in @@ -164,6 +164,7 @@ ALL_MACHINES = \ cpu-h8300.lo \ cpu-h8500.lo \ cpu-hppa.lo \ + cpu-i370.lo \ cpu-i386.lo \ cpu-i860.lo \ cpu-i960.lo \ @@ -200,6 +201,7 @@ ALL_MACHINES_CFILES = \ cpu-h8300.c \ cpu-h8500.c \ cpu-hppa.c \ + cpu-i370.c \ cpu-i386.c \ cpu-i860.c \ cpu-i960.c \ @@ -278,6 +280,7 @@ BFD32_BACKENDS = \ elf32-d30v.lo \ elf32-fr30.lo \ elf32-gen.lo \ + elf32-i370.lo \ elf32-i386.lo \ elf32-i860.lo \ elf32-i960.lo \ @@ -403,6 +406,7 @@ BFD32_BACKENDS_CFILES = \ elf32-d30v.c \ elf32-fr30.c \ elf32-gen.c \ + elf32-i370.c \ elf32-i386.c \ elf32-i860.c \ elf32-i960.c \ @@ -1380,6 +1384,9 @@ elf32-fr30.lo: elf32-fr30.c elf-bfd.h $(INCDIR)/elf/common.h \ elf32-gen.lo: elf32-gen.c elf-bfd.h $(INCDIR)/elf/common.h \ $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h \ elf32-target.h +elf32-i370.lo: elf32-i370.c elf-bfd.h $(INCDIR)/elf/common.h \ + $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h \ + elf32-target.h elf32-i386.lo: elf32-i386.c $(INCDIR)/bfdlink.h elf-bfd.h \ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ $(INCDIR)/elf/i386.h $(INCDIR)/elf/reloc-macros.h elf32-target.h diff --git a/bfd/archures.c b/bfd/archures.c index 21e980e..483f649 100644 --- a/bfd/archures.c +++ b/bfd/archures.c @@ -135,6 +135,7 @@ DESCRIPTION . bfd_arch_we32k, {* AT&T WE32xxx *} . bfd_arch_tahoe, {* CCI/Harris Tahoe *} . bfd_arch_i860, {* Intel 860 *} +. bfd_arch_i370, {* IBM 360/370 Mainframes *} . bfd_arch_romp, {* IBM ROMP PC/RT *} . bfd_arch_alliant, {* Alliant *} . bfd_arch_convex, {* Convex *} @@ -245,6 +246,7 @@ extern const bfd_arch_info_type bfd_d30v_arch; extern const bfd_arch_info_type bfd_h8300_arch; extern const bfd_arch_info_type bfd_h8500_arch; extern const bfd_arch_info_type bfd_hppa_arch; +extern const bfd_arch_info_type bfd_i370_arch; extern const bfd_arch_info_type bfd_i386_arch; extern const bfd_arch_info_type bfd_i860_arch; extern const bfd_arch_info_type bfd_i960_arch; @@ -284,6 +286,7 @@ static const bfd_arch_info_type * const bfd_archures_list[] = &bfd_h8300_arch, &bfd_h8500_arch, &bfd_hppa_arch, + &bfd_i370_arch, &bfd_i386_arch, &bfd_i860_arch, &bfd_i960_arch, diff --git a/bfd/bfd-in.h b/bfd/bfd-in.h index a5312f4..15aa3a6 100644 --- a/bfd/bfd-in.h +++ b/bfd/bfd-in.h @@ -1,5 +1,5 @@ /* Main header file for the bfd library -- portable access to object files. - Copyright 1990, 91, 92, 93, 94, 95, 96, 97, 98, 1999 + Copyright 1990, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000 Free Software Foundation, Inc. Contributed by Cygnus Support. diff --git a/bfd/bfd-in2.h b/bfd/bfd-in2.h index 99bc67f..519ad86 100644 --- a/bfd/bfd-in2.h +++ b/bfd/bfd-in2.h @@ -1,5 +1,5 @@ /* Main header file for the bfd library -- portable access to object files. - Copyright 1990, 91, 92, 93, 94, 95, 96, 97, 98, 1999 + Copyright 1990, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000 Free Software Foundation, Inc. Contributed by Cygnus Support. @@ -1341,6 +1341,7 @@ enum bfd_architecture bfd_arch_we32k, /* AT&T WE32xxx */ bfd_arch_tahoe, /* CCI/Harris Tahoe */ bfd_arch_i860, /* Intel 860 */ + bfd_arch_i370, /* IBM 360/370 Mainframes */ bfd_arch_romp, /* IBM ROMP PC/RT */ bfd_arch_alliant, /* Alliant */ bfd_arch_convex, /* Convex */ @@ -1997,6 +1998,9 @@ to compensate for the borrow when the low bits are added. */ BFD_RELOC_PPC_EMB_BIT_FLD, BFD_RELOC_PPC_EMB_RELSDA, +/* IBM 370/390 relocations */ + BFD_RELOC_I370_D12, + /* The type of reloc used to build a contructor table - at the moment probably a 32 bit wide absolute relocation, but the target can choose. It generally does map to one of the other relocation types. */ diff --git a/bfd/config.bfd b/bfd/config.bfd index 65710b4..ff5249b 100644 --- a/bfd/config.bfd +++ b/bfd/config.bfd @@ -35,6 +35,7 @@ thumb*) targ_archs=bfd_arm_arch ;; c30*) targ_archs=bfd_tic30_arch ;; hppa*) targ_archs=bfd_hppa_arch ;; i[3456]86) targ_archs=bfd_i386_arch ;; +i370) targ_archs=bfd_i370_arch ;; m68*) targ_archs=bfd_m68k_arch ;; m88*) targ_archs=bfd_m88k_arch ;; mips*) targ_archs=bfd_mips_arch ;; @@ -221,6 +222,10 @@ case "${targ}" in #endif #endif /* defined (HOST_HPPAHPUX) || defined (HOST_HPPABSD) || defined (HOST_HPPAOSF) */ + i370-*-*) + targ_defvec=bfd_elf32_i370_vec + targ_selvecs="bfd_elf32_i370_vec" + ;; i[3456]86-*-sco3.2v5*coff) targ_defvec=i386coff_vec targ_selvecs=bfd_elf32_i386_vec diff --git a/bfd/configure b/bfd/configure index c1736f9..62c7927 100755 --- a/bfd/configure +++ b/bfd/configure @@ -1,7 +1,7 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated automatically using autoconf version 2.13 +# Generated automatically using autoconf version 2.13.1 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. # # This configure script is free software; the Free Software Foundation @@ -53,7 +53,6 @@ program_suffix=NONE program_transform_name=s,x,x, silent= site= -sitefile= srcdir= target=NONE verbose= @@ -168,7 +167,6 @@ Configuration: --help print this message --no-create do not create output files --quiet, --silent do not print \`checking...' messages - --site-file=FILE use FILE as the site file --version print the version of autoconf that created configure Directory and file names: --prefix=PREFIX install architecture-independent files in PREFIX @@ -339,11 +337,6 @@ EOF -site=* | --site=* | --sit=*) site="$ac_optarg" ;; - -site-file | --site-file | --site-fil | --site-fi | --site-f) - ac_prev=sitefile ;; - -site-file=* | --site-file=* | --site-fil=* | --site-fi=* | --site-f=*) - sitefile="$ac_optarg" ;; - -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) @@ -365,7 +358,7 @@ EOF verbose=yes ;; -version | --version | --versio | --versi | --vers) - echo "configure generated by autoconf version 2.13" + echo "configure generated by autoconf version 2.13.1" exit 0 ;; -with-* | --with-*) @@ -509,16 +502,12 @@ fi srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'` # Prefer explicitly selected file to automatically selected ones. -if test -z "$sitefile"; then - if test -z "$CONFIG_SITE"; then - if test "x$prefix" != xNONE; then - CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" - else - CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" - fi +if test -z "$CONFIG_SITE"; then + if test "x$prefix" != xNONE; then + CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" + else + CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" fi -else - CONFIG_SITE="$sitefile" fi for ac_site_file in $CONFIG_SITE; do if test -r "$ac_site_file"; then @@ -529,7 +518,7 @@ done if test -r "$cache_file"; then echo "loading cache $cache_file" - . $cache_file + test -f "$cache_file" && . $cache_file else echo "creating cache $cache_file" > $cache_file @@ -573,9 +562,130 @@ done if test -z "$ac_aux_dir"; then { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; } fi -ac_config_guess=$ac_aux_dir/config.guess -ac_config_sub=$ac_aux_dir/config.sub -ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. +ac_config_guess="$SHELL $ac_aux_dir/config.guess" +ac_config_sub="$SHELL $ac_aux_dir/config.sub" +ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure. + + +echo $ac_n "checking host system type""... $ac_c" 1>&6 +echo "configure:572: checking host system type" >&5 +if test "x$ac_cv_host" = "x" || (test "x$host" != "xNONE" && test "x$host" != "x$ac_cv_host_alias"); then + +# Make sure we can run config.sub. + if $ac_config_sub sun4 >/dev/null 2>&1; then : + else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; } + fi + + ac_cv_host_alias=$host + case "$ac_cv_host_alias" in + NONE) + case $nonopt in + NONE) + if ac_cv_host_alias=`$ac_config_guess`; then : + else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; } + fi ;; + *) ac_cv_host_alias=$nonopt ;; + esac ;; + esac + + ac_cv_host=`$ac_config_sub $ac_cv_host_alias` + ac_cv_host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` + ac_cv_host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` + ac_cv_host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` +else + echo $ac_n "(cached) $ac_c" 1>&6 +fi + +echo "$ac_t""$ac_cv_host" 1>&6 + +host=$ac_cv_host +host_alias=$ac_cv_host_alias +host_cpu=$ac_cv_host_cpu +host_vendor=$ac_cv_host_vendor +host_os=$ac_cv_host_os + + + + + +echo $ac_n "checking target system type""... $ac_c" 1>&6 +echo "configure:613: checking target system type" >&5 +if test "x$ac_cv_target" = "x" || (test "x$target" != "xNONE" && test "x$target" != "x$ac_cv_target_alias"); then + +# Make sure we can run config.sub. + if $ac_config_sub sun4 >/dev/null 2>&1; then : + else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; } + fi + + ac_cv_target_alias=$target + case "$ac_cv_target_alias" in + NONE) + case $nonopt in + NONE) + ac_cv_target_alias=$host_alias ;; + + *) ac_cv_target_alias=$nonopt ;; + esac ;; + esac + + ac_cv_target=`$ac_config_sub $ac_cv_target_alias` + ac_cv_target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` + ac_cv_target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` + ac_cv_target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` +else + echo $ac_n "(cached) $ac_c" 1>&6 +fi + +echo "$ac_t""$ac_cv_target" 1>&6 + +target=$ac_cv_target +target_alias=$ac_cv_target_alias +target_cpu=$ac_cv_target_cpu +target_vendor=$ac_cv_target_vendor +target_os=$ac_cv_target_os + + + + + +echo $ac_n "checking build system type""... $ac_c" 1>&6 +echo "configure:653: checking build system type" >&5 +if test "x$ac_cv_build" = "x" || (test "x$build" != "xNONE" && test "x$build" != "x$ac_cv_build_alias"); then + +# Make sure we can run config.sub. + if $ac_config_sub sun4 >/dev/null 2>&1; then : + else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; } + fi + + ac_cv_build_alias=$build + case "$ac_cv_build_alias" in + NONE) + case $nonopt in + NONE) + ac_cv_build_alias=$host_alias ;; + + *) ac_cv_build_alias=$nonopt ;; + esac ;; + esac + + ac_cv_build=`$ac_config_sub $ac_cv_build_alias` + ac_cv_build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` + ac_cv_build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` + ac_cv_build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` +else + echo $ac_n "(cached) $ac_c" 1>&6 +fi + +echo "$ac_t""$ac_cv_build" 1>&6 + +build=$ac_cv_build +build_alias=$ac_cv_build_alias +build_cpu=$ac_cv_build_cpu +build_vendor=$ac_cv_build_vendor +build_os=$ac_cv_build_os + + + # Do some error checking and defaulting for the host and target type. @@ -598,69 +708,6 @@ NONE---*---* | *---NONE---* | *---*---NONE) ;; *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;; esac - -# Make sure we can run config.sub. -if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then : -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:609: checking host system type" >&5 - -host_alias=$host -case "$host_alias" in -NONE) - case $nonopt in - NONE) - if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then : - else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; } - fi ;; - *) host_alias=$nonopt ;; - esac ;; -esac - -host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias` -host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` -host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` -host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` -echo "$ac_t""$host" 1>&6 - -echo $ac_n "checking target system type""... $ac_c" 1>&6 -echo "configure:630: checking target system type" >&5 - -target_alias=$target -case "$target_alias" in -NONE) - case $nonopt in - NONE) target_alias=$host_alias ;; - *) target_alias=$nonopt ;; - esac ;; -esac - -target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias` -target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` -target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` -target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` -echo "$ac_t""$target" 1>&6 - -echo $ac_n "checking build system type""... $ac_c" 1>&6 -echo "configure:648: checking build system type" >&5 - -build_alias=$build -case "$build_alias" in -NONE) - case $nonopt in - NONE) build_alias=$host_alias ;; - *) build_alias=$nonopt ;; - esac ;; -esac - -build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias` -build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` -build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` -build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` -echo "$ac_t""$build" 1>&6 - test "$host_alias" != "$target_alias" && test "$program_prefix$program_suffix$program_transform_name" = \ NONENONEs,x,x, && @@ -669,8 +716,8 @@ test "$host_alias" != "$target_alias" && # 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:673: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then +echo "configure:720: checking for $ac_word" >&5 +if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$CC"; then @@ -699,8 +746,8 @@ 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:703: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then +echo "configure:750: checking for $ac_word" >&5 +if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$CC"; then @@ -746,12 +793,12 @@ fi if test -z "$CC"; then case "`uname -s`" in - *win32* | *WIN32*) + *win32* | *WIN32* | *CYGWIN*) # Extract the first word of "cl", so it can be a program name with args. set dummy cl; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:754: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then +echo "configure:801: checking for $ac_word" >&5 +if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$CC"; then @@ -781,8 +828,8 @@ fi test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } fi -echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:786: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works""... $ac_c" 1>&6 +echo "configure:833: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works" >&5 ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. @@ -793,12 +840,12 @@ cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext << EOF -#line 797 "configure" +#line 844 "configure" #include "confdefs.h" main(){return(0);} EOF -if { (eval echo configure:802: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:849: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; 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 @@ -823,14 +870,14 @@ echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 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:828: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 +echo "configure:875: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 cross_compiling=$ac_cv_prog_cc_cross echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 -echo "configure:833: checking whether we are using GNU C" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then +echo "configure:880: checking whether we are using GNU C" >&5 +if eval "test \"\${ac_cv_prog_gcc+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.c <<EOF @@ -838,7 +885,7 @@ else yes; #endif EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:842: \"$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:889: \"$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 @@ -857,8 +904,8 @@ ac_test_CFLAGS="${CFLAGS+set}" ac_save_CFLAGS="$CFLAGS" CFLAGS= echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:861: checking whether ${CC-cc} accepts -g" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then +echo "configure:908: checking whether ${CC-cc} accepts -g" >&5 +if eval "test \"\${ac_cv_prog_cc_g+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else echo 'void f(){}' > conftest.c @@ -889,7 +936,7 @@ else fi echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6 -echo "configure:893: checking for POSIXized ISC" >&5 +echo "configure:940: 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 @@ -922,9 +969,9 @@ 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:926: checking for a BSD compatible install" >&5 +echo "configure:973: checking for a BSD compatible install" >&5 if test -z "$INSTALL"; then -if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then +if eval "test \"\${ac_cv_path_install+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":" @@ -942,6 +989,10 @@ else grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : + elif test $ac_prog = install && + grep pwplus $ac_dir/$ac_prog >/dev/null 2>&1; then + # program-specific install script used by HP pwplus--don't use. + : else ac_cv_path_install="$ac_dir/$ac_prog -c" break 2 @@ -970,12 +1021,12 @@ echo "$ac_t""$INSTALL" 1>&6 # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' -test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}' +test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6 -echo "configure:979: checking whether build environment is sane" >&5 +echo "configure:1030: checking whether build environment is sane" >&5 # Just in case sleep 1 echo timestamp > conftestfile @@ -1023,18 +1074,18 @@ EOF_SED rm -f conftestsed fi test "$program_prefix" != NONE && - program_transform_name="s,^,${program_prefix},; $program_transform_name" + program_transform_name="s,^,${program_prefix},;$program_transform_name" # Use a double $ so make ignores it. test "$program_suffix" != NONE && - program_transform_name="s,\$\$,${program_suffix},; $program_transform_name" + program_transform_name="s,\$\$,${program_suffix},;$program_transform_name" # sed with no file args requires a program. test "$program_transform_name" = "" && program_transform_name="s,x,x," echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 -echo "configure:1036: checking whether ${MAKE-make} sets \${MAKE}" >&5 +echo "configure:1087: checking whether ${MAKE-make} sets \${MAKE}" >&5 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then +if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftestmake <<\EOF @@ -1078,7 +1129,7 @@ EOF missing_dir=`cd $ac_aux_dir && pwd` echo $ac_n "checking for working aclocal""... $ac_c" 1>&6 -echo "configure:1082: checking for working aclocal" >&5 +echo "configure:1133: checking for working aclocal" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. @@ -1091,7 +1142,7 @@ else fi echo $ac_n "checking for working autoconf""... $ac_c" 1>&6 -echo "configure:1095: checking for working autoconf" >&5 +echo "configure:1146: checking for working autoconf" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. @@ -1104,7 +1155,7 @@ else fi echo $ac_n "checking for working automake""... $ac_c" 1>&6 -echo "configure:1108: checking for working automake" >&5 +echo "configure:1159: checking for working automake" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. @@ -1117,7 +1168,7 @@ else fi echo $ac_n "checking for working autoheader""... $ac_c" 1>&6 -echo "configure:1121: checking for working autoheader" >&5 +echo "configure:1172: checking for working autoheader" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. @@ -1130,7 +1181,7 @@ else fi echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6 -echo "configure:1134: checking for working makeinfo" >&5 +echo "configure:1185: checking for working makeinfo" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. @@ -1153,8 +1204,8 @@ 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:1157: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then +echo "configure:1208: checking for $ac_word" >&5 +if eval "test \"\${ac_cv_prog_AR+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$AR"; then @@ -1185,8 +1236,8 @@ 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:1189: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then +echo "configure:1240: checking for $ac_word" >&5 +if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$RANLIB"; then @@ -1217,8 +1268,8 @@ 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:1221: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then +echo "configure:1272: checking for $ac_word" >&5 +if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$RANLIB"; then @@ -1323,8 +1374,8 @@ fi # 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:1327: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then +echo "configure:1378: checking for $ac_word" >&5 +if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$RANLIB"; then @@ -1362,7 +1413,7 @@ ac_prog=ld if test "$ac_cv_prog_gcc" = yes; then # Check if gcc -print-prog-name=ld gives a path. echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6 -echo "configure:1366: checking for ld used by GCC" >&5 +echo "configure:1417: checking for ld used by GCC" >&5 ac_prog=`($CC -print-prog-name=ld) 2>&5` case "$ac_prog" in # Accept absolute paths. @@ -1386,12 +1437,12 @@ echo "configure:1366: checking for ld used by GCC" >&5 esac elif test "$with_gnu_ld" = yes; then echo $ac_n "checking for GNU ld""... $ac_c" 1>&6 -echo "configure:1390: checking for GNU ld" >&5 +echo "configure:1441: checking for GNU ld" >&5 else echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6 -echo "configure:1393: checking for non-GNU ld" >&5 +echo "configure:1444: checking for non-GNU ld" >&5 fi -if eval "test \"`echo '$''{'ac_cv_path_LD'+set}'`\" = set"; then +if eval "test \"\${ac_cv_path_LD+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -z "$LD"; then @@ -1425,8 +1476,8 @@ fi test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; } echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6 -echo "configure:1429: checking if the linker ($LD) is GNU ld" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_gnu_ld'+set}'`\" = set"; then +echo "configure:1480: checking if the linker ($LD) is GNU ld" >&5 +if eval "test \"\${ac_cv_prog_gnu_ld+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else # I'd rather use --version here, but apparently some GNU ld's only accept -v. @@ -1441,8 +1492,8 @@ echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6 -echo "configure:1445: checking for BSD-compatible nm" >&5 -if eval "test \"`echo '$''{'ac_cv_path_NM'+set}'`\" = set"; then +echo "configure:1496: checking for BSD-compatible nm" >&5 +if eval "test \"\${ac_cv_path_NM+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$NM"; then @@ -1479,8 +1530,8 @@ echo "$ac_t""$NM" 1>&6 # Check for command to grab the raw symbol name followed by C symbol from nm. echo $ac_n "checking command to parse $NM output""... $ac_c" 1>&6 -echo "configure:1483: checking command to parse $NM output" >&5 -if eval "test \"`echo '$''{'ac_cv_sys_global_symbol_pipe'+set}'`\" = set"; then +echo "configure:1534: checking command to parse $NM output" >&5 +if eval "test \"\${ac_cv_sys_global_symbol_pipe+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else # These are sane defaults that work on at least a few old systems. @@ -1542,11 +1593,11 @@ void nm_test_func(){} int main(){nm_test_var='a';nm_test_func;return 0;} EOF - if { (eval echo configure:1546: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + if { (eval echo configure:1597: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then # Now try to grab the symbols. ac_nlist=conftest.nm - if { (eval echo configure:1550: \"$NM conftest.$ac_objext \| $ac_cv_sys_global_symbol_pipe \> $ac_nlist\") 1>&5; (eval $NM conftest.$ac_objext \| $ac_cv_sys_global_symbol_pipe \> $ac_nlist) 2>&5; } && test -s "$ac_nlist"; then + if { (eval echo configure:1601: \"$NM conftest.$ac_objext \| $ac_cv_sys_global_symbol_pipe \> $ac_nlist\") 1>&5; (eval $NM conftest.$ac_objext \| $ac_cv_sys_global_symbol_pipe \> $ac_nlist) 2>&5; } && test -s "$ac_nlist"; then # Try sorting and uniquifying the output. if sort "$ac_nlist" | uniq > "$ac_nlist"T; then @@ -1598,7 +1649,7 @@ EOF ac_save_CFLAGS="$CFLAGS" LIBS="conftestm.$ac_objext" CFLAGS="$CFLAGS$no_builtin_flag" - if { (eval echo configure:1602: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then + if { (eval echo configure:1653: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then ac_pipe_works=yes else echo "configure: failed program was:" >&5 @@ -1644,8 +1695,8 @@ fi echo "$ac_t""$ac_result" 1>&6 echo $ac_n "checking for _ prefix in compiled symbols""... $ac_c" 1>&6 -echo "configure:1648: checking for _ prefix in compiled symbols" >&5 -if eval "test \"`echo '$''{'ac_cv_sys_symbol_underscore'+set}'`\" = set"; then +echo "configure:1699: checking for _ prefix in compiled symbols" >&5 +if eval "test \"\${ac_cv_sys_symbol_underscore+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_cv_sys_symbol_underscore=no @@ -1653,10 +1704,10 @@ cat > conftest.$ac_ext <<EOF void nm_test_func(){} int main(){nm_test_func;return 0;} EOF -if { (eval echo configure:1657: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1708: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then # Now try to grab the symbols. ac_nlist=conftest.nm - if { (eval echo configure:1660: \"$NM conftest.$ac_objext \| $ac_cv_sys_global_symbol_pipe \> $ac_nlist\") 1>&5; (eval $NM conftest.$ac_objext \| $ac_cv_sys_global_symbol_pipe \> $ac_nlist) 2>&5; } && test -s "$ac_nlist"; then + if { (eval echo configure:1711: \"$NM conftest.$ac_objext \| $ac_cv_sys_global_symbol_pipe \> $ac_nlist\") 1>&5; (eval $NM conftest.$ac_objext \| $ac_cv_sys_global_symbol_pipe \> $ac_nlist) 2>&5; } && test -s "$ac_nlist"; then # See whether the symbols have a leading underscore. if egrep '^. _nm_test_func' "$ac_nlist" >/dev/null; then ac_cv_sys_symbol_underscore=yes @@ -1682,8 +1733,8 @@ echo "$ac_t""$ac_cv_sys_symbol_underscore" 1>&6 USE_SYMBOL_UNDERSCORE=${ac_cv_sys_symbol_underscore=no} echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 -echo "configure:1686: checking whether ln -s works" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then +echo "configure:1737: checking whether ln -s works" >&5 +if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else rm -f conftestdata @@ -1718,8 +1769,8 @@ test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld" case "$host" in *-*-irix6*) # Find out which ABI we are using. - echo '#line 1722 "configure"' > conftest.$ac_ext - if { (eval echo configure:1723: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + echo '#line 1773 "configure"' > conftest.$ac_ext + if { (eval echo configure:1774: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then case "`/usr/bin/file conftest.o`" in *32-bit*) LD="${LD-ld} -32" @@ -1740,19 +1791,19 @@ case "$host" in SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -belf" echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6 -echo "configure:1744: checking whether the C compiler needs -belf" >&5 -if eval "test \"`echo '$''{'lt_cv_cc_needs_belf'+set}'`\" = set"; then +echo "configure:1795: checking whether the C compiler needs -belf" >&5 +if eval "test \"\${lt_cv_cc_needs_belf+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 1749 "configure" +#line 1800 "configure" #include "confdefs.h" int main() { ; return 0; } EOF -if { (eval echo configure:1756: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1807: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* lt_cv_cc_needs_belf=yes else @@ -1775,8 +1826,8 @@ echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6 # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. set dummy ${ac_tool_prefix}dlltool; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1779: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL'+set}'`\" = set"; then +echo "configure:1830: checking for $ac_word" >&5 +if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$DLLTOOL"; then @@ -1807,8 +1858,8 @@ if test -n "$ac_tool_prefix"; then # Extract the first word of "dlltool", so it can be a program name with args. set dummy dlltool; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1811: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL'+set}'`\" = set"; then +echo "configure:1862: checking for $ac_word" >&5 +if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$DLLTOOL"; then @@ -1842,8 +1893,8 @@ fi # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args. set dummy ${ac_tool_prefix}as; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1846: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then +echo "configure:1897: checking for $ac_word" >&5 +if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$AS"; then @@ -1874,8 +1925,8 @@ if test -n "$ac_tool_prefix"; then # Extract the first word of "as", so it can be a program name with args. set dummy as; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1878: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then +echo "configure:1929: checking for $ac_word" >&5 +if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$AS"; then @@ -1987,7 +2038,7 @@ $libtool_flags --no-verify $ac_aux_dir/ltmain.sh $host \ # Reload cache, that may have been modified by ltconfig if test -r "$cache_file"; then echo "loading cache $cache_file" - . $cache_file + test -f "$cache_file" && . $cache_file else echo "creating cache $cache_file" > $cache_file @@ -2065,17 +2116,17 @@ EOF_SED rm -f conftestsed fi test "$program_prefix" != NONE && - program_transform_name="s,^,${program_prefix},; $program_transform_name" + program_transform_name="s,^,${program_prefix},;$program_transform_name" # Use a double $ so make ignores it. test "$program_suffix" != NONE && - program_transform_name="s,\$\$,${program_suffix},; $program_transform_name" + program_transform_name="s,\$\$,${program_suffix},;$program_transform_name" # sed with no file args requires a program. test "$program_transform_name" = "" && program_transform_name="s,x,x," echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6 -echo "configure:2079: checking whether to enable maintainer-specific portions of Makefiles" >&5 +echo "configure:2130: checking whether to enable maintainer-specific portions of Makefiles" >&5 # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given. if test "${enable_maintainer_mode+set}" = set; then enableval="$enable_maintainer_mode" @@ -2098,12 +2149,12 @@ fi echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6 -echo "configure:2102: checking for Cygwin environment" >&5 -if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then +echo "configure:2153: checking for Cygwin environment" >&5 +if eval "test \"\${ac_cv_cygwin+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 2107 "configure" +#line 2158 "configure" #include "confdefs.h" int main() { @@ -2114,7 +2165,7 @@ int main() { return __CYGWIN__; ; return 0; } EOF -if { (eval echo configure:2118: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2169: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_cygwin=yes else @@ -2124,26 +2175,25 @@ else ac_cv_cygwin=no fi rm -f conftest* -rm -f conftest* fi echo "$ac_t""$ac_cv_cygwin" 1>&6 CYGWIN= test "$ac_cv_cygwin" = yes && CYGWIN=yes echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6 -echo "configure:2135: checking for mingw32 environment" >&5 -if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then +echo "configure:2185: checking for mingw32 environment" >&5 +if eval "test \"\${ac_cv_mingw32+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 2140 "configure" +#line 2190 "configure" #include "confdefs.h" int main() { return __MINGW32__; ; return 0; } EOF -if { (eval echo configure:2147: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2197: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_mingw32=yes else @@ -2153,29 +2203,57 @@ else ac_cv_mingw32=no fi rm -f conftest* -rm -f conftest* fi echo "$ac_t""$ac_cv_mingw32" 1>&6 MINGW32= test "$ac_cv_mingw32" = yes && MINGW32=yes +echo $ac_n "checking for EMX OS/2 environment""... $ac_c" 1>&6 +echo "configure:2213: checking for EMX OS/2 environment" >&5 +if eval "test \"\${ac_cv_emxos2+set}\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 2218 "configure" +#include "confdefs.h" + +int main() { +return __EMX__; +; return 0; } +EOF +if { (eval echo configure:2225: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_emxos2=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_emxos2=no +fi +rm -f conftest* +fi + +echo "$ac_t""$ac_cv_emxos2" 1>&6 +EMXOS2= +test "$ac_cv_emxos2" = yes && EMXOS2=yes + echo $ac_n "checking for executable suffix""... $ac_c" 1>&6 -echo "configure:2166: checking for executable suffix" >&5 -if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then +echo "configure:2244: checking for executable suffix" >&5 +if eval "test \"\${ac_cv_exeext+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else - if test "$CYGWIN" = yes || test "$MINGW32" = yes; then + if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then ac_cv_exeext=.exe else rm -f conftest* echo 'int main () { return 0; }' > conftest.$ac_ext ac_cv_exeext= - if { (eval echo configure:2176: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then + if { (eval echo configure:2254: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then for file in conftest.*; do case $file in - *.c | *.o | *.obj | *.ilk | *.pdb) ;; + *.c | *.C | *.o | *.obj | *.xcoff) ;; *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;; esac done @@ -2201,8 +2279,8 @@ target64=false # 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:2205: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then +echo "configure:2283: checking for $ac_word" >&5 +if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$CC"; then @@ -2231,8 +2309,8 @@ 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:2235: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then +echo "configure:2313: checking for $ac_word" >&5 +if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$CC"; then @@ -2278,12 +2356,12 @@ fi if test -z "$CC"; then case "`uname -s`" in - *win32* | *WIN32*) + *win32* | *WIN32* | *CYGWIN*) # Extract the first word of "cl", so it can be a program name with args. set dummy cl; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2286: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then +echo "configure:2364: checking for $ac_word" >&5 +if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$CC"; then @@ -2313,8 +2391,8 @@ fi test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } fi -echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:2318: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works""... $ac_c" 1>&6 +echo "configure:2396: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works" >&5 ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. @@ -2325,12 +2403,12 @@ cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext << EOF -#line 2329 "configure" +#line 2407 "configure" #include "confdefs.h" main(){return(0);} EOF -if { (eval echo configure:2334: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2412: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; 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 @@ -2355,14 +2433,14 @@ echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 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:2360: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 +echo "configure:2438: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 cross_compiling=$ac_cv_prog_cc_cross echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 -echo "configure:2365: checking whether we are using GNU C" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then +echo "configure:2443: checking whether we are using GNU C" >&5 +if eval "test \"\${ac_cv_prog_gcc+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.c <<EOF @@ -2370,7 +2448,7 @@ else yes; #endif EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2374: \"$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:2452: \"$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 @@ -2389,8 +2467,8 @@ ac_test_CFLAGS="${CFLAGS+set}" ac_save_CFLAGS="$CFLAGS" CFLAGS= echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:2393: checking whether ${CC-cc} accepts -g" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then +echo "configure:2471: checking whether ${CC-cc} accepts -g" >&5 +if eval "test \"\${ac_cv_prog_cc_g+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else echo 'void f(){}' > conftest.c @@ -2423,13 +2501,13 @@ fi ALL_LINGUAS= echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:2427: checking how to run the C preprocessor" >&5 +echo "configure:2505: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then -if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then +if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else # This must be in double quotes, not single quotes, because CPP may get @@ -2438,13 +2516,13 @@ else # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. cat > conftest.$ac_ext <<EOF -#line 2442 "configure" +#line 2520 "configure" #include "confdefs.h" #include <assert.h> Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2448: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2526: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -2455,13 +2533,13 @@ else rm -rf conftest* CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext <<EOF -#line 2459 "configure" +#line 2537 "configure" #include "confdefs.h" #include <assert.h> Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2465: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2543: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -2472,13 +2550,13 @@ else rm -rf conftest* CPP="${CC-cc} -nologo -E" cat > conftest.$ac_ext <<EOF -#line 2476 "configure" +#line 2554 "configure" #include "confdefs.h" #include <assert.h> Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2482: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2560: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -2503,12 +2581,12 @@ fi echo "$ac_t""$CPP" 1>&6 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:2507: checking for ANSI C header files" >&5 -if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then +echo "configure:2585: checking for ANSI C header files" >&5 +if eval "test \"\${ac_cv_header_stdc+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 2512 "configure" +#line 2590 "configure" #include "confdefs.h" #include <stdlib.h> #include <stdarg.h> @@ -2516,7 +2594,7 @@ else #include <float.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2520: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2598: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -2533,7 +2611,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 -#line 2537 "configure" +#line 2615 "configure" #include "confdefs.h" #include <string.h> EOF @@ -2551,7 +2629,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 -#line 2555 "configure" +#line 2633 "configure" #include "confdefs.h" #include <stdlib.h> EOF @@ -2572,7 +2650,7 @@ if test "$cross_compiling" = yes; then : else cat > conftest.$ac_ext <<EOF -#line 2576 "configure" +#line 2654 "configure" #include "confdefs.h" #include <ctype.h> #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') @@ -2583,7 +2661,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } EOF -if { (eval echo configure:2587: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2665: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else @@ -2607,12 +2685,12 @@ EOF fi echo $ac_n "checking for working const""... $ac_c" 1>&6 -echo "configure:2611: checking for working const" >&5 -if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then +echo "configure:2689: checking for working const" >&5 +if eval "test \"\${ac_cv_c_const+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 2616 "configure" +#line 2694 "configure" #include "confdefs.h" int main() { @@ -2661,7 +2739,7 @@ ccp = (char const *const *) p; ; return 0; } EOF -if { (eval echo configure:2665: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2743: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes else @@ -2682,21 +2760,21 @@ EOF fi echo $ac_n "checking for inline""... $ac_c" 1>&6 -echo "configure:2686: checking for inline" >&5 -if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then +echo "configure:2764: checking for inline" >&5 +if eval "test \"\${ac_cv_c_inline+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_cv_c_inline=no for ac_kw in inline __inline__ __inline; do cat > conftest.$ac_ext <<EOF -#line 2693 "configure" +#line 2771 "configure" #include "confdefs.h" int main() { -} $ac_kw foo() { +} $ac_kw int foo() { ; return 0; } EOF -if { (eval echo configure:2700: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2778: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_inline=$ac_kw; break else @@ -2722,12 +2800,12 @@ EOF esac echo $ac_n "checking for off_t""... $ac_c" 1>&6 -echo "configure:2726: checking for off_t" >&5 -if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then +echo "configure:2804: checking for off_t" >&5 +if eval "test \"\${ac_cv_type_off_t+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 2731 "configure" +#line 2809 "configure" #include "confdefs.h" #include <sys/types.h> #if STDC_HEADERS @@ -2738,29 +2816,31 @@ EOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then rm -rf conftest* - ac_cv_type_off_t=yes + eval "ac_cv_type_off_t=yes" else rm -rf conftest* - ac_cv_type_off_t=no + eval "ac_cv_type_off_t=no" fi rm -f conftest* fi -echo "$ac_t""$ac_cv_type_off_t" 1>&6 -if test $ac_cv_type_off_t = no; then - cat >> confdefs.h <<\EOF +if eval "test \"`echo '$ac_cv_type_'off_t`\" = yes"; then + echo "$ac_t""yes" 1>&6 +else + echo "$ac_t""no" 1>&6 + cat >> confdefs.h <<EOF #define off_t long EOF fi echo $ac_n "checking for size_t""... $ac_c" 1>&6 -echo "configure:2759: checking for size_t" >&5 -if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then +echo "configure:2839: checking for size_t" >&5 +if eval "test \"\${ac_cv_type_size_t+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 2764 "configure" +#line 2844 "configure" #include "confdefs.h" #include <sys/types.h> #if STDC_HEADERS @@ -2771,17 +2851,19 @@ EOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then rm -rf conftest* - ac_cv_type_size_t=yes + eval "ac_cv_type_size_t=yes" else rm -rf conftest* - ac_cv_type_size_t=no + eval "ac_cv_type_size_t=no" fi rm -f conftest* fi -echo "$ac_t""$ac_cv_type_size_t" 1>&6 -if test $ac_cv_type_size_t = no; then - cat >> confdefs.h <<\EOF +if eval "test \"`echo '$ac_cv_type_'size_t`\" = yes"; then + echo "$ac_t""yes" 1>&6 +else + echo "$ac_t""no" 1>&6 + cat >> confdefs.h <<EOF #define size_t unsigned EOF @@ -2790,19 +2872,19 @@ fi # 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:2794: checking for working alloca.h" >&5 -if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then +echo "configure:2876: checking for working alloca.h" >&5 +if eval "test \"\${ac_cv_header_alloca_h+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 2799 "configure" +#line 2881 "configure" #include "confdefs.h" #include <alloca.h> int main() { char *p = alloca(2 * sizeof(int)); ; return 0; } EOF -if { (eval echo configure:2806: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2888: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_header_alloca_h=yes else @@ -2823,12 +2905,12 @@ EOF fi echo $ac_n "checking for alloca""... $ac_c" 1>&6 -echo "configure:2827: checking for alloca" >&5 -if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then +echo "configure:2909: checking for alloca" >&5 +if eval "test \"\${ac_cv_func_alloca_works+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 2832 "configure" +#line 2914 "configure" #include "confdefs.h" #ifdef __GNUC__ @@ -2856,7 +2938,7 @@ int main() { char *p = (char *) alloca(1); ; return 0; } EOF -if { (eval echo configure:2860: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2942: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_func_alloca_works=yes else @@ -2888,12 +2970,12 @@ EOF echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6 -echo "configure:2892: checking whether alloca needs Cray hooks" >&5 -if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then +echo "configure:2974: checking whether alloca needs Cray hooks" >&5 +if eval "test \"\${ac_cv_os_cray+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 2897 "configure" +#line 2979 "configure" #include "confdefs.h" #if defined(CRAY) && ! defined(CRAY2) webecray @@ -2918,12 +3000,12 @@ echo "$ac_t""$ac_cv_os_cray" 1>&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:2922: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then +echo "configure:3004: checking for $ac_func" >&5 +if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 2927 "configure" +#line 3009 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -2932,6 +3014,7 @@ else /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char $ac_func(); +char (*f)(); int main() { @@ -2941,12 +3024,12 @@ int main() { #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else -$ac_func(); +f = $ac_func; #endif ; return 0; } EOF -if { (eval echo configure:2950: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3033: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -2973,15 +3056,15 @@ done fi echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6 -echo "configure:2977: checking stack direction for C alloca" >&5 -if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then +echo "configure:3060: checking stack direction for C alloca" >&5 +if eval "test \"\${ac_cv_c_stack_direction+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test "$cross_compiling" = yes; then ac_cv_c_stack_direction=0 else cat > conftest.$ac_ext <<EOF -#line 2985 "configure" +#line 3068 "configure" #include "confdefs.h" find_stack_direction () { @@ -3000,7 +3083,7 @@ main () exit (find_stack_direction() < 0); } EOF -if { (eval echo configure:3004: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3087: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_c_stack_direction=1 else @@ -3025,17 +3108,17 @@ for ac_hdr in unistd.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:3029: checking for $ac_hdr" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then +echo "configure:3112: checking for $ac_hdr" >&5 +if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 3034 "configure" +#line 3117 "configure" #include "confdefs.h" #include <$ac_hdr> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3039: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3122: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -3064,12 +3147,12 @@ done for ac_func in getpagesize do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3068: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then +echo "configure:3151: checking for $ac_func" >&5 +if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 3073 "configure" +#line 3156 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -3078,6 +3161,7 @@ else /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char $ac_func(); +char (*f)(); int main() { @@ -3087,12 +3171,12 @@ int main() { #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else -$ac_func(); +f = $ac_func; #endif ; return 0; } EOF -if { (eval echo configure:3096: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3180: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -3117,15 +3201,15 @@ fi done echo $ac_n "checking for working mmap""... $ac_c" 1>&6 -echo "configure:3121: checking for working mmap" >&5 -if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then +echo "configure:3205: checking for working mmap" >&5 +if eval "test \"\${ac_cv_func_mmap_fixed_mapped+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test "$cross_compiling" = yes; then ac_cv_func_mmap_fixed_mapped=no else cat > conftest.$ac_ext <<EOF -#line 3129 "configure" +#line 3213 "configure" #include "confdefs.h" /* Thanks to Mike Haertel and Jim Avera for this test. @@ -3265,7 +3349,7 @@ main() } EOF -if { (eval echo configure:3269: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3353: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_func_mmap_fixed_mapped=yes else @@ -3293,17 +3377,17 @@ unistd.h values.h sys/param.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:3297: checking for $ac_hdr" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then +echo "configure:3381: checking for $ac_hdr" >&5 +if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 3302 "configure" +#line 3386 "configure" #include "confdefs.h" #include <$ac_hdr> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3307: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3391: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -3333,12 +3417,12 @@ done __argz_count __argz_stringify __argz_next do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3337: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then +echo "configure:3421: checking for $ac_func" >&5 +if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 3342 "configure" +#line 3426 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -3347,6 +3431,7 @@ else /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char $ac_func(); +char (*f)(); int main() { @@ -3356,12 +3441,12 @@ int main() { #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else -$ac_func(); +f = $ac_func; #endif ; return 0; } EOF -if { (eval echo configure:3365: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3450: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -3390,12 +3475,12 @@ done for ac_func in stpcpy do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3394: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then +echo "configure:3479: checking for $ac_func" >&5 +if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 3399 "configure" +#line 3484 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -3404,6 +3489,7 @@ else /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char $ac_func(); +char (*f)(); int main() { @@ -3413,12 +3499,12 @@ int main() { #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else -$ac_func(); +f = $ac_func; #endif ; return 0; } EOF -if { (eval echo configure:3422: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3508: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -3452,19 +3538,19 @@ EOF if test $ac_cv_header_locale_h = yes; then echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6 -echo "configure:3456: checking for LC_MESSAGES" >&5 -if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then +echo "configure:3542: checking for LC_MESSAGES" >&5 +if eval "test \"\${am_cv_val_LC_MESSAGES+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 3461 "configure" +#line 3547 "configure" #include "confdefs.h" #include <locale.h> int main() { return LC_MESSAGES ; return 0; } EOF -if { (eval echo configure:3468: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3554: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* am_cv_val_LC_MESSAGES=yes else @@ -3485,7 +3571,7 @@ EOF fi fi echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6 -echo "configure:3489: checking whether NLS is requested" >&5 +echo "configure:3575: checking whether NLS is requested" >&5 # Check whether --enable-nls or --disable-nls was given. if test "${enable_nls+set}" = set; then enableval="$enable_nls" @@ -3505,7 +3591,7 @@ fi EOF echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6 -echo "configure:3509: checking whether included gettext is requested" >&5 +echo "configure:3595: checking whether included gettext is requested" >&5 # Check whether --with-included-gettext or --without-included-gettext was given. if test "${with_included_gettext+set}" = set; then withval="$with_included_gettext" @@ -3524,17 +3610,17 @@ fi ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for libintl.h""... $ac_c" 1>&6 -echo "configure:3528: checking for libintl.h" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then +echo "configure:3614: checking for libintl.h" >&5 +if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 3533 "configure" +#line 3619 "configure" #include "confdefs.h" #include <libintl.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3538: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3624: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -3551,19 +3637,19 @@ fi if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 echo $ac_n "checking for gettext in libc""... $ac_c" 1>&6 -echo "configure:3555: checking for gettext in libc" >&5 -if eval "test \"`echo '$''{'gt_cv_func_gettext_libc'+set}'`\" = set"; then +echo "configure:3641: checking for gettext in libc" >&5 +if eval "test \"\${gt_cv_func_gettext_libc+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 3560 "configure" +#line 3646 "configure" #include "confdefs.h" #include <libintl.h> int main() { return (int) gettext ("") ; return 0; } EOF -if { (eval echo configure:3567: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3653: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* gt_cv_func_gettext_libc=yes else @@ -3579,15 +3665,15 @@ echo "$ac_t""$gt_cv_func_gettext_libc" 1>&6 if test "$gt_cv_func_gettext_libc" != "yes"; then echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6 -echo "configure:3583: checking for bindtextdomain in -lintl" >&5 -ac_lib_var=`echo intl'_'bindtextdomain | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then +echo "configure:3669: checking for bindtextdomain in -lintl" >&5 +ac_lib_var=`echo intl'_'bindtextdomain | sed 'y%./+-:%__p__%'` +if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" LIBS="-lintl $LIBS" cat > conftest.$ac_ext <<EOF -#line 3591 "configure" +#line 3677 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -3598,7 +3684,7 @@ int main() { bindtextdomain() ; return 0; } EOF -if { (eval echo configure:3602: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3688: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3614,19 +3700,19 @@ fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 echo $ac_n "checking for gettext in libintl""... $ac_c" 1>&6 -echo "configure:3618: checking for gettext in libintl" >&5 -if eval "test \"`echo '$''{'gt_cv_func_gettext_libintl'+set}'`\" = set"; then +echo "configure:3704: checking for gettext in libintl" >&5 +if eval "test \"\${gt_cv_func_gettext_libintl+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 3623 "configure" +#line 3709 "configure" #include "confdefs.h" int main() { return (int) gettext ("") ; return 0; } EOF -if { (eval echo configure:3630: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3716: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* gt_cv_func_gettext_libintl=yes else @@ -3654,8 +3740,8 @@ EOF # Extract the first word of "msgfmt", so it can be a program name with args. set dummy msgfmt; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3658: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then +echo "configure:3744: checking for $ac_word" >&5 +if eval "test \"\${ac_cv_path_MSGFMT+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else case "$MSGFMT" in @@ -3688,12 +3774,12 @@ fi for ac_func in dcgettext do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3692: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then +echo "configure:3778: checking for $ac_func" >&5 +if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 3697 "configure" +#line 3783 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -3702,6 +3788,7 @@ else /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char $ac_func(); +char (*f)(); int main() { @@ -3711,12 +3798,12 @@ int main() { #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else -$ac_func(); +f = $ac_func; #endif ; return 0; } EOF -if { (eval echo configure:3720: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3807: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -3743,8 +3830,8 @@ done # Extract the first word of "gmsgfmt", so it can be a program name with args. set dummy gmsgfmt; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3747: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then +echo "configure:3834: checking for $ac_word" >&5 +if eval "test \"\${ac_cv_path_GMSGFMT+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else case "$GMSGFMT" in @@ -3779,8 +3866,8 @@ fi # Extract the first word of "xgettext", so it can be a program name with args. set dummy xgettext; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3783: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then +echo "configure:3870: checking for $ac_word" >&5 +if eval "test \"\${ac_cv_path_XGETTEXT+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else case "$XGETTEXT" in @@ -3811,7 +3898,7 @@ else fi cat > conftest.$ac_ext <<EOF -#line 3815 "configure" +#line 3902 "configure" #include "confdefs.h" int main() { @@ -3819,7 +3906,7 @@ extern int _nl_msg_cat_cntr; return _nl_msg_cat_cntr ; return 0; } EOF -if { (eval echo configure:3823: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3910: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* CATOBJEXT=.gmo DATADIRNAME=share @@ -3851,8 +3938,8 @@ fi # Extract the first word of "msgfmt", so it can be a program name with args. set dummy msgfmt; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3855: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then +echo "configure:3942: checking for $ac_word" >&5 +if eval "test \"\${ac_cv_path_MSGFMT+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else case "$MSGFMT" in @@ -3885,8 +3972,8 @@ fi # Extract the first word of "gmsgfmt", so it can be a program name with args. set dummy gmsgfmt; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3889: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then +echo "configure:3976: checking for $ac_word" >&5 +if eval "test \"\${ac_cv_path_GMSGFMT+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else case "$GMSGFMT" in @@ -3921,8 +4008,8 @@ fi # Extract the first word of "xgettext", so it can be a program name with args. set dummy xgettext; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3925: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then +echo "configure:4012: checking for $ac_word" >&5 +if eval "test \"\${ac_cv_path_XGETTEXT+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else case "$XGETTEXT" in @@ -4011,7 +4098,7 @@ fi LINGUAS= else echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6 -echo "configure:4015: checking for catalogs to be installed" >&5 +echo "configure:4102: checking for catalogs to be installed" >&5 NEW_LINGUAS= for lang in ${LINGUAS=$ALL_LINGUAS}; do case "$ALL_LINGUAS" in @@ -4039,17 +4126,17 @@ echo "configure:4015: checking for catalogs to be installed" >&5 if test "$CATOBJEXT" = ".cat"; then ac_safe=`echo "linux/version.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for linux/version.h""... $ac_c" 1>&6 -echo "configure:4043: checking for linux/version.h" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then +echo "configure:4130: checking for linux/version.h" >&5 +if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 4048 "configure" +#line 4135 "configure" #include "confdefs.h" #include <linux/version.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4053: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4140: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -4127,9 +4214,9 @@ 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:4131: checking for a BSD compatible install" >&5 +echo "configure:4218: checking for a BSD compatible install" >&5 if test -z "$INSTALL"; then -if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then +if eval "test \"\${ac_cv_path_install+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":" @@ -4147,6 +4234,10 @@ else grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : + elif test $ac_prog = install && + grep pwplus $ac_dir/$ac_prog >/dev/null 2>&1; then + # program-specific install script used by HP pwplus--don't use. + : else ac_cv_path_install="$ac_dir/$ac_prog -c" break 2 @@ -4175,7 +4266,7 @@ echo "$ac_t""$INSTALL" 1>&6 # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' -test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}' +test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' @@ -4210,8 +4301,8 @@ if test "x$cross_compiling" = "xno"; then EXEEXT_FOR_BUILD='$(EXEEXT)' else echo $ac_n "checking for build system executable suffix""... $ac_c" 1>&6 -echo "configure:4214: checking for build system executable suffix" >&5 -if eval "test \"`echo '$''{'bfd_cv_build_exeext'+set}'`\" = set"; then +echo "configure:4305: checking for build system executable suffix" >&5 +if eval "test \"\${bfd_cv_build_exeext+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else rm -f conftest* @@ -4238,17 +4329,17 @@ for ac_hdr in stddef.h string.h strings.h stdlib.h time.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:4242: checking for $ac_hdr" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then +echo "configure:4333: checking for $ac_hdr" >&5 +if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 4247 "configure" +#line 4338 "configure" #include "confdefs.h" #include <$ac_hdr> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4252: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4343: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -4278,17 +4369,17 @@ for ac_hdr in fcntl.h sys/file.h sys/time.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:4282: checking for $ac_hdr" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then +echo "configure:4373: checking for $ac_hdr" >&5 +if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 4287 "configure" +#line 4378 "configure" #include "confdefs.h" #include <$ac_hdr> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4292: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4383: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -4315,12 +4406,12 @@ fi done echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 -echo "configure:4319: checking whether time.h and sys/time.h may both be included" >&5 -if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then +echo "configure:4410: checking whether time.h and sys/time.h may both be included" >&5 +if eval "test \"\${ac_cv_header_time+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 4324 "configure" +#line 4415 "configure" #include "confdefs.h" #include <sys/types.h> #include <sys/time.h> @@ -4329,7 +4420,7 @@ int main() { struct tm *tp; ; return 0; } EOF -if { (eval echo configure:4333: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4424: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_time=yes else @@ -4354,12 +4445,12 @@ for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6 -echo "configure:4358: checking for $ac_hdr that defines DIR" >&5 -if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then +echo "configure:4449: checking for $ac_hdr that defines DIR" >&5 +if eval "test \"\${ac_cv_header_dirent_$ac_safe+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 4363 "configure" +#line 4454 "configure" #include "confdefs.h" #include <sys/types.h> #include <$ac_hdr> @@ -4367,7 +4458,7 @@ int main() { DIR *dirp = 0; ; return 0; } EOF -if { (eval echo configure:4371: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4462: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_header_dirent_$ac_safe=yes" else @@ -4392,15 +4483,15 @@ done # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. if test $ac_header_dirent = dirent.h; then echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6 -echo "configure:4396: checking for opendir in -ldir" >&5 -ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then +echo "configure:4487: checking for opendir in -ldir" >&5 +ac_lib_var=`echo dir'_'opendir | sed 'y%./+-:%__p__%'` +if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" LIBS="-ldir $LIBS" cat > conftest.$ac_ext <<EOF -#line 4404 "configure" +#line 4495 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -4411,7 +4502,7 @@ int main() { opendir() ; return 0; } EOF -if { (eval echo configure:4415: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4506: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4433,15 +4524,15 @@ fi else echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6 -echo "configure:4437: checking for opendir in -lx" >&5 -ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then +echo "configure:4528: checking for opendir in -lx" >&5 +ac_lib_var=`echo x'_'opendir | sed 'y%./+-:%__p__%'` +if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" LIBS="-lx $LIBS" cat > conftest.$ac_ext <<EOF -#line 4445 "configure" +#line 4536 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -4452,7 +4543,7 @@ int main() { opendir() ; return 0; } EOF -if { (eval echo configure:4456: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4547: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4477,12 +4568,12 @@ fi for ac_func in fcntl getpagesize setitimer sysconf fdopen getuid getgid do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4481: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then +echo "configure:4572: checking for $ac_func" >&5 +if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 4486 "configure" +#line 4577 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -4491,6 +4582,7 @@ else /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char $ac_func(); +char (*f)(); int main() { @@ -4500,12 +4592,12 @@ int main() { #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else -$ac_func(); +f = $ac_func; #endif ; return 0; } EOF -if { (eval echo configure:4509: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4601: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -4540,12 +4632,12 @@ EOF esac echo $ac_n "checking whether strstr must be declared""... $ac_c" 1>&6 -echo "configure:4544: checking whether strstr must be declared" >&5 -if eval "test \"`echo '$''{'bfd_cv_decl_needed_strstr'+set}'`\" = set"; then +echo "configure:4636: checking whether strstr must be declared" >&5 +if eval "test \"\${bfd_cv_decl_needed_strstr+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 4549 "configure" +#line 4641 "configure" #include "confdefs.h" #include <stdio.h> @@ -4566,7 +4658,7 @@ int main() { char *(*pfn) = (char *(*)) strstr ; return 0; } EOF -if { (eval echo configure:4570: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4662: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_decl_needed_strstr=no else @@ -4587,12 +4679,12 @@ EOF fi echo $ac_n "checking whether malloc must be declared""... $ac_c" 1>&6 -echo "configure:4591: checking whether malloc must be declared" >&5 -if eval "test \"`echo '$''{'bfd_cv_decl_needed_malloc'+set}'`\" = set"; then +echo "configure:4683: checking whether malloc must be declared" >&5 +if eval "test \"\${bfd_cv_decl_needed_malloc+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 4596 "configure" +#line 4688 "configure" #include "confdefs.h" #include <stdio.h> @@ -4613,7 +4705,7 @@ int main() { char *(*pfn) = (char *(*)) malloc ; return 0; } EOF -if { (eval echo configure:4617: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4709: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_decl_needed_malloc=no else @@ -4634,12 +4726,12 @@ EOF fi echo $ac_n "checking whether realloc must be declared""... $ac_c" 1>&6 -echo "configure:4638: checking whether realloc must be declared" >&5 -if eval "test \"`echo '$''{'bfd_cv_decl_needed_realloc'+set}'`\" = set"; then +echo "configure:4730: checking whether realloc must be declared" >&5 +if eval "test \"\${bfd_cv_decl_needed_realloc+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 4643 "configure" +#line 4735 "configure" #include "confdefs.h" #include <stdio.h> @@ -4660,7 +4752,7 @@ int main() { char *(*pfn) = (char *(*)) realloc ; return 0; } EOF -if { (eval echo configure:4664: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4756: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_decl_needed_realloc=no else @@ -4681,12 +4773,12 @@ EOF fi echo $ac_n "checking whether free must be declared""... $ac_c" 1>&6 -echo "configure:4685: checking whether free must be declared" >&5 -if eval "test \"`echo '$''{'bfd_cv_decl_needed_free'+set}'`\" = set"; then +echo "configure:4777: checking whether free must be declared" >&5 +if eval "test \"\${bfd_cv_decl_needed_free+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 4690 "configure" +#line 4782 "configure" #include "confdefs.h" #include <stdio.h> @@ -4707,7 +4799,7 @@ int main() { char *(*pfn) = (char *(*)) free ; return 0; } EOF -if { (eval echo configure:4711: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4803: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_decl_needed_free=no else @@ -4728,12 +4820,12 @@ EOF fi echo $ac_n "checking whether getenv must be declared""... $ac_c" 1>&6 -echo "configure:4732: checking whether getenv must be declared" >&5 -if eval "test \"`echo '$''{'bfd_cv_decl_needed_getenv'+set}'`\" = set"; then +echo "configure:4824: checking whether getenv must be declared" >&5 +if eval "test \"\${bfd_cv_decl_needed_getenv+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 4737 "configure" +#line 4829 "configure" #include "confdefs.h" #include <stdio.h> @@ -4754,7 +4846,7 @@ int main() { char *(*pfn) = (char *(*)) getenv ; return 0; } EOF -if { (eval echo configure:4758: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4850: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_decl_needed_getenv=no else @@ -4793,8 +4885,13 @@ if test "${target}" = "${host}"; then hppa*-*-mpeix*) COREFILE=hpux-core.lo ;; hppa*-*-bsd*) COREFILE="hpux-core.lo hppabsd-core.lo" COREFLAG="-DHPUX_CORE -DHPPABSD_CORE" ;; + i370-*-*) + COREFILE=trad-core.lo + TRAD_HEADER='"hosts/i370linux.h"' + ;; + i[3456]86-sequent-bsd*) - COREFILE=trad-core.lo; + COREFILE=trad-core.lo TRAD_HEADER='"hosts/symmetry.h"' ;; i[3456]86-sequent-sysv4*) ;; @@ -4955,17 +5052,17 @@ if test "${target}" = "${host}"; then do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:4959: checking for $ac_hdr" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then +echo "configure:5056: checking for $ac_hdr" >&5 +if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 4964 "configure" +#line 5061 "configure" #include "confdefs.h" #include <$ac_hdr> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4969: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:5066: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -4993,19 +5090,19 @@ done if test "$ac_cv_header_sys_procfs_h" = yes; then echo $ac_n "checking for prstatus_t in sys/procfs.h""... $ac_c" 1>&6 -echo "configure:4997: checking for prstatus_t in sys/procfs.h" >&5 - if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prstatus_t'+set}'`\" = set"; then +echo "configure:5094: checking for prstatus_t in sys/procfs.h" >&5 + if eval "test \"\${bfd_cv_have_sys_procfs_type_prstatus_t+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 5002 "configure" +#line 5099 "configure" #include "confdefs.h" #include <sys/procfs.h> int main() { prstatus_t avar ; return 0; } EOF -if { (eval echo configure:5009: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5106: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_have_sys_procfs_type_prstatus_t=yes else @@ -5027,19 +5124,19 @@ EOF echo "$ac_t""$bfd_cv_have_sys_procfs_type_prstatus_t" 1>&6 echo $ac_n "checking for prstatus_t.pr_who in sys/procfs.h""... $ac_c" 1>&6 -echo "configure:5031: checking for prstatus_t.pr_who in sys/procfs.h" >&5 - if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_member_prstatus_t_pr_who'+set}'`\" = set"; then +echo "configure:5128: checking for prstatus_t.pr_who in sys/procfs.h" >&5 + if eval "test \"\${bfd_cv_have_sys_procfs_type_member_prstatus_t_pr_who+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 5036 "configure" +#line 5133 "configure" #include "confdefs.h" #include <sys/procfs.h> int main() { prstatus_t avar; void* aref = (void*) &avar.pr_who ; return 0; } EOF -if { (eval echo configure:5043: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5140: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_have_sys_procfs_type_member_prstatus_t_pr_who=yes else @@ -5061,19 +5158,19 @@ EOF echo "$ac_t""$bfd_cv_have_sys_procfs_type_member_prstatus_t_pr_who" 1>&6 echo $ac_n "checking for pstatus_t in sys/procfs.h""... $ac_c" 1>&6 -echo "configure:5065: checking for pstatus_t in sys/procfs.h" >&5 - if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pstatus_t'+set}'`\" = set"; then +echo "configure:5162: checking for pstatus_t in sys/procfs.h" >&5 + if eval "test \"\${bfd_cv_have_sys_procfs_type_pstatus_t+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 5070 "configure" +#line 5167 "configure" #include "confdefs.h" #include <sys/procfs.h> int main() { pstatus_t avar ; return 0; } EOF -if { (eval echo configure:5077: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5174: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_have_sys_procfs_type_pstatus_t=yes else @@ -5095,19 +5192,19 @@ EOF echo "$ac_t""$bfd_cv_have_sys_procfs_type_pstatus_t" 1>&6 echo $ac_n "checking for prpsinfo_t in sys/procfs.h""... $ac_c" 1>&6 -echo "configure:5099: checking for prpsinfo_t in sys/procfs.h" >&5 - if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prpsinfo_t'+set}'`\" = set"; then +echo "configure:5196: checking for prpsinfo_t in sys/procfs.h" >&5 + if eval "test \"\${bfd_cv_have_sys_procfs_type_prpsinfo_t+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 5104 "configure" +#line 5201 "configure" #include "confdefs.h" #include <sys/procfs.h> int main() { prpsinfo_t avar ; return 0; } EOF -if { (eval echo configure:5111: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5208: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_have_sys_procfs_type_prpsinfo_t=yes else @@ -5129,19 +5226,19 @@ EOF echo "$ac_t""$bfd_cv_have_sys_procfs_type_prpsinfo_t" 1>&6 echo $ac_n "checking for psinfo_t in sys/procfs.h""... $ac_c" 1>&6 -echo "configure:5133: checking for psinfo_t in sys/procfs.h" >&5 - if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_psinfo_t'+set}'`\" = set"; then +echo "configure:5230: checking for psinfo_t in sys/procfs.h" >&5 + if eval "test \"\${bfd_cv_have_sys_procfs_type_psinfo_t+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 5138 "configure" +#line 5235 "configure" #include "confdefs.h" #include <sys/procfs.h> int main() { psinfo_t avar ; return 0; } EOF -if { (eval echo configure:5145: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5242: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_have_sys_procfs_type_psinfo_t=yes else @@ -5163,19 +5260,19 @@ EOF echo "$ac_t""$bfd_cv_have_sys_procfs_type_psinfo_t" 1>&6 echo $ac_n "checking for lwpstatus_t in sys/procfs.h""... $ac_c" 1>&6 -echo "configure:5167: checking for lwpstatus_t in sys/procfs.h" >&5 - if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_lwpstatus_t'+set}'`\" = set"; then +echo "configure:5264: checking for lwpstatus_t in sys/procfs.h" >&5 + if eval "test \"\${bfd_cv_have_sys_procfs_type_lwpstatus_t+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 5172 "configure" +#line 5269 "configure" #include "confdefs.h" #include <sys/procfs.h> int main() { lwpstatus_t avar ; return 0; } EOF -if { (eval echo configure:5179: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5276: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_have_sys_procfs_type_lwpstatus_t=yes else @@ -5197,19 +5294,19 @@ EOF echo "$ac_t""$bfd_cv_have_sys_procfs_type_lwpstatus_t" 1>&6 echo $ac_n "checking for lwpstatus_t.pr_context in sys/procfs.h""... $ac_c" 1>&6 -echo "configure:5201: checking for lwpstatus_t.pr_context in sys/procfs.h" >&5 - if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_context'+set}'`\" = set"; then +echo "configure:5298: checking for lwpstatus_t.pr_context in sys/procfs.h" >&5 + if eval "test \"\${bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_context+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 5206 "configure" +#line 5303 "configure" #include "confdefs.h" #include <sys/procfs.h> int main() { lwpstatus_t avar; void* aref = (void*) &avar.pr_context ; return 0; } EOF -if { (eval echo configure:5213: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5310: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_context=yes else @@ -5231,19 +5328,19 @@ EOF echo "$ac_t""$bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_context" 1>&6 echo $ac_n "checking for lwpstatus_t.pr_reg in sys/procfs.h""... $ac_c" 1>&6 -echo "configure:5235: checking for lwpstatus_t.pr_reg in sys/procfs.h" >&5 - if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_reg'+set}'`\" = set"; then +echo "configure:5332: checking for lwpstatus_t.pr_reg in sys/procfs.h" >&5 + if eval "test \"\${bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_reg+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 5240 "configure" +#line 5337 "configure" #include "confdefs.h" #include <sys/procfs.h> int main() { lwpstatus_t avar; void* aref = (void*) &avar.pr_reg ; return 0; } EOF -if { (eval echo configure:5247: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5344: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_reg=yes else @@ -5265,19 +5362,19 @@ EOF echo "$ac_t""$bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_reg" 1>&6 echo $ac_n "checking for win32_pstatus_t in sys/procfs.h""... $ac_c" 1>&6 -echo "configure:5269: checking for win32_pstatus_t in sys/procfs.h" >&5 - if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_win32_pstatus_t'+set}'`\" = set"; then +echo "configure:5366: checking for win32_pstatus_t in sys/procfs.h" >&5 + if eval "test \"\${bfd_cv_have_sys_procfs_type_win32_pstatus_t+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 5274 "configure" +#line 5371 "configure" #include "confdefs.h" #include <sys/procfs.h> int main() { win32_pstatus_t avar ; return 0; } EOF -if { (eval echo configure:5281: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5378: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_have_sys_procfs_type_win32_pstatus_t=yes else @@ -5433,6 +5530,7 @@ do bfd_elf32_d30v_vec) tb="$tb elf32-d30v.lo elf32.lo $elf" ;; bfd_elf32_fr30_vec) tb="$tb elf32-fr30.lo elf32.lo $elf" ;; bfd_elf32_hppa_vec) tb="$tb elf32-hppa.lo elf32.lo $elf" ;; + bfd_elf32_i370_vec) tb="$tb elf32-i370.lo elf32.lo $elf" ;; bfd_elf32_i386_vec) tb="$tb elf32-i386.lo elf32.lo $elf" ;; bfd_elf32_i860_vec) tb="$tb elf32-i860.lo elf32.lo $elf" ;; bfd_elf32_i960_vec) tb="$tb elf32-i960.lo elf32.lo $elf" ;; @@ -5631,17 +5729,17 @@ for ac_hdr in unistd.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:5635: checking for $ac_hdr" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then +echo "configure:5733: checking for $ac_hdr" >&5 +if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 5640 "configure" +#line 5738 "configure" #include "confdefs.h" #include <$ac_hdr> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:5645: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:5743: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -5670,12 +5768,12 @@ done for ac_func in getpagesize do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5674: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then +echo "configure:5772: checking for $ac_func" >&5 +if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 5679 "configure" +#line 5777 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -5684,6 +5782,7 @@ else /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char $ac_func(); +char (*f)(); int main() { @@ -5693,12 +5792,12 @@ int main() { #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else -$ac_func(); +f = $ac_func; #endif ; return 0; } EOF -if { (eval echo configure:5702: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5801: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -5723,15 +5822,15 @@ fi done echo $ac_n "checking for working mmap""... $ac_c" 1>&6 -echo "configure:5727: checking for working mmap" >&5 -if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then +echo "configure:5826: checking for working mmap" >&5 +if eval "test \"\${ac_cv_func_mmap_fixed_mapped+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test "$cross_compiling" = yes; then ac_cv_func_mmap_fixed_mapped=no else cat > conftest.$ac_ext <<EOF -#line 5735 "configure" +#line 5834 "configure" #include "confdefs.h" /* Thanks to Mike Haertel and Jim Avera for this test. @@ -5871,7 +5970,7 @@ main() } EOF -if { (eval echo configure:5875: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:5974: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_func_mmap_fixed_mapped=yes else @@ -5896,12 +5995,12 @@ fi for ac_func in madvise mprotect do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5900: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then +echo "configure:5999: checking for $ac_func" >&5 +if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 5905 "configure" +#line 6004 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -5910,6 +6009,7 @@ else /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char $ac_func(); +char (*f)(); int main() { @@ -5919,12 +6019,12 @@ int main() { #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else -$ac_func(); +f = $ac_func; #endif ; return 0; } EOF -if { (eval echo configure:5928: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6028: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -6046,7 +6146,7 @@ do echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion" exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; -version | --version | --versio | --versi | --vers | --ver | --ve | --v) - echo "$CONFIG_STATUS generated by autoconf version 2.13" + echo "$CONFIG_STATUS generated by autoconf version 2.13.1" exit 0 ;; -help | --help | --hel | --he | --h) echo "\$ac_cs_usage"; exit 0 ;; @@ -6387,5 +6487,5 @@ exit 0 EOF chmod +x $CONFIG_STATUS rm -fr confdefs* $ac_clean_files -test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 +test "$no_create" = yes || $SHELL $CONFIG_STATUS || exit 1 diff --git a/bfd/configure.in b/bfd/configure.in index 88d3731..092d97c 100644 --- a/bfd/configure.in +++ b/bfd/configure.in @@ -126,10 +126,15 @@ if test "${target}" = "${host}"; then hppa*-*-mpeix*) COREFILE=hpux-core.lo ;; hppa*-*-bsd*) COREFILE="hpux-core.lo hppabsd-core.lo" COREFLAG="-DHPUX_CORE -DHPPABSD_CORE" ;; + i370-*-*) + COREFILE=trad-core.lo + TRAD_HEADER='"hosts/i370linux.h"' + ;; + changequote(,)dnl i[3456]86-sequent-bsd*) changequote([,])dnl - COREFILE=trad-core.lo; + COREFILE=trad-core.lo TRAD_HEADER='"hosts/symmetry.h"' ;; changequote(,)dnl @@ -448,6 +453,7 @@ do bfd_elf32_d30v_vec) tb="$tb elf32-d30v.lo elf32.lo $elf" ;; bfd_elf32_fr30_vec) tb="$tb elf32-fr30.lo elf32.lo $elf" ;; bfd_elf32_hppa_vec) tb="$tb elf32-hppa.lo elf32.lo $elf" ;; + bfd_elf32_i370_vec) tb="$tb elf32-i370.lo elf32.lo $elf" ;; bfd_elf32_i386_vec) tb="$tb elf32-i386.lo elf32.lo $elf" ;; bfd_elf32_i860_vec) tb="$tb elf32-i860.lo elf32.lo $elf" ;; bfd_elf32_i960_vec) tb="$tb elf32-i960.lo elf32.lo $elf" ;; diff --git a/bfd/cpu-i370.c b/bfd/cpu-i370.c new file mode 100644 index 0000000..2331eef --- /dev/null +++ b/bfd/cpu-i370.c @@ -0,0 +1,94 @@ +/* BFD i370 CPU definition + Copyright (C) 1994, 95, 96, 98, 99, 2000 Free Software Foundation, Inc. + Contributed by Ian Lance Taylor, Cygnus Support. + Hacked by Linas Vepstas <linas@linas.org> in 1998, 1999 + +This file is part of BFD, the Binary File Descriptor library. + +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + +#include "bfd.h" +#include "sysdep.h" +#include "libbfd.h" + +/* The common i360/370 architecture comes in many forms */ + +static const bfd_arch_info_type *i370_compatible + PARAMS ((const bfd_arch_info_type *, const bfd_arch_info_type *)); + +static const bfd_arch_info_type * +i370_compatible (a, b) + const bfd_arch_info_type *a; + const bfd_arch_info_type *b; +{ + BFD_ASSERT (a->arch == bfd_arch_i370); + switch (b->arch) + { + default: + return NULL; + case bfd_arch_i370: + return bfd_default_compatible (a, b); + } + /*NOTREACHED*/ +} + +static const bfd_arch_info_type arch_info_struct[] = +{ + /* hack alert: old old machines are really 16 and 24 bit arch ... */ + { + 32, /* 32 bits in a word */ + 32, /* 32 bits in an address */ + 8, /* 8 bits in a byte */ + bfd_arch_i370, + 360, /* for the 360 */ + "i370", + "i370:360", + 3, + false, /* not the default */ + i370_compatible, + bfd_default_scan, + &arch_info_struct[1] + }, + { + 32, /* 32 bits in a word */ + 32, /* 32 bits in an address */ + 8, /* 8 bits in a byte */ + bfd_arch_i370, + 370, /* for the 370 */ + "i370", + "i370:370", + 3, + false, /* not the default */ + i370_compatible, + bfd_default_scan, + 0 + }, +}; + +const bfd_arch_info_type bfd_i370_arch = + { + 32, /* 32 bits in a word */ + 32, /* 32 bits in an address */ + 8, /* 8 bits in a byte */ + bfd_arch_i370, + 0, /* for the 360/370 common architecture */ + "i370", + "i370:common", + 3, + true, /* the default */ + i370_compatible, + bfd_default_scan, + &arch_info_struct[0] + }; @@ -1,5 +1,5 @@ /* ELF executable support for BFD. - Copyright 1993, 94, 95, 96, 97, 98, 1999 Free Software Foundation, Inc. + Copyright 1993, 94, 95, 96, 97, 98, 99, 2000 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. @@ -3231,6 +3231,9 @@ prep_headers (abfd) else i_ehdrp->e_machine = EM_SPARC; break; + case bfd_arch_i370: + i_ehdrp->e_machine = EM_S370; + break; case bfd_arch_i386: i_ehdrp->e_machine = EM_386; break; diff --git a/bfd/elf32-i370.c b/bfd/elf32-i370.c new file mode 100644 index 0000000..6dc993d --- /dev/null +++ b/bfd/elf32-i370.c @@ -0,0 +1,1745 @@ +/* i370-specific support for 32-bit ELF + Copyright 1994, 95, 96, 97, 98, 2000 Free Software Foundation, Inc. + Written by Ian Lance Taylor, Cygnus Support. + Hacked by Linas Vepstas for i370 linas@linas.org + +This file is part of BFD, the Binary File Descriptor library. + +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + + + +/* This file is based on a preliminary PowerPC ELF ABI. + But its been hacked on for the IBM 360/370 architectures. + Basically, the 31bit relocation works, and just about everything + else is a wild card. In particular, don't expect shared libs or + dynamic loading to work ... its never been tested ... +*/ + + +#include "bfd.h" +#include "sysdep.h" +#include "bfdlink.h" +#include "libbfd.h" +#include "elf-bfd.h" +#include "elf/i370.h" + +#define USE_RELA /* we want RELA relocations, not REL */ + +/* i370 relocations */ +/* Note that there is really just one relocation that we currently + * support (and only one that we seem to need, at the moment), and + * that is the 31-bit address relocation. Note that the 370/390 + * only supports a 31-bit (2GB) address space. + */ +enum i370_reloc_type +{ + R_I370_NONE = 0, + R_I370_ADDR31 = 1, + R_I370_ADDR32 = 2, + R_I370_ADDR16 = 3, + R_I370_REL31 = 4, + R_I370_REL32 = 5, + R_I370_ADDR12 = 6, + R_I370_REL12 = 7, + R_I370_ADDR8 = 8, + R_I370_REL8 = 9, + R_I370_COPY = 10, + R_I370_RELATIVE = 11, + + R_I370_max +}; + + +static reloc_howto_type *i370_elf_howto_table[ (int)R_I370_max ]; + +static reloc_howto_type i370_elf_howto_raw[] = +{ + /* This reloc does nothing. */ + HOWTO (R_I370_NONE, /* type */ + 0, /* rightshift */ + 2, /* size (0 = byte, 1 = short, 2 = long) */ + 32, /* bitsize */ + false, /* pc_relative */ + 0, /* bitpos */ + complain_overflow_bitfield, /* complain_on_overflow */ + bfd_elf_generic_reloc, /* special_function */ + "R_I370_NONE", /* name */ + false, /* partial_inplace */ + 0, /* src_mask */ + 0, /* dst_mask */ + false), /* pcrel_offset */ + + /* A standard 31 bit relocation. */ + HOWTO (R_I370_ADDR31, /* type */ + 0, /* rightshift */ + 2, /* size (0 = byte, 1 = short, 2 = long) */ + 31, /* bitsize */ + false, /* pc_relative */ + 0, /* bitpos */ + complain_overflow_bitfield, /* complain_on_overflow */ + bfd_elf_generic_reloc, /* special_function */ + "R_I370_ADDR31", /* name */ + false, /* partial_inplace */ + 0, /* src_mask */ + 0x7fffffff, /* dst_mask */ + false), /* pcrel_offset */ + + /* A standard 32 bit relocation. */ + HOWTO (R_I370_ADDR32, /* type */ + 0, /* rightshift */ + 2, /* size (0 = byte, 1 = short, 2 = long) */ + 32, /* bitsize */ + false, /* pc_relative */ + 0, /* bitpos */ + complain_overflow_bitfield, /* complain_on_overflow */ + bfd_elf_generic_reloc, /* special_function */ + "R_I370_ADDR32", /* name */ + false, /* partial_inplace */ + 0, /* src_mask */ + 0xffffffff, /* dst_mask */ + false), /* pcrel_offset */ + + /* A standard 16 bit relocation. */ + HOWTO (R_I370_ADDR16, /* type */ + 0, /* rightshift */ + 1, /* size (0 = byte, 1 = short, 2 = long) */ + 16, /* bitsize */ + false, /* pc_relative */ + 0, /* bitpos */ + complain_overflow_bitfield, /* complain_on_overflow */ + bfd_elf_generic_reloc, /* special_function */ + "R_I370_ADDR16", /* name */ + false, /* partial_inplace */ + 0, /* src_mask */ + 0xffff, /* dst_mask */ + false), /* pcrel_offset */ + + /* 31-bit PC relative */ + HOWTO (R_I370_REL31, /* type */ + 0, /* rightshift */ + 2, /* size (0 = byte, 1 = short, 2 = long) */ + 31, /* bitsize */ + true, /* pc_relative */ + 0, /* bitpos */ + complain_overflow_bitfield, /* complain_on_overflow */ + bfd_elf_generic_reloc, /* special_function */ + "R_I370_REL31", /* name */ + false, /* partial_inplace */ + 0, /* src_mask */ + 0x7fffffff, /* dst_mask */ + true), /* pcrel_offset */ + + /* 32-bit PC relative */ + HOWTO (R_I370_REL32, /* type */ + 0, /* rightshift */ + 2, /* size (0 = byte, 1 = short, 2 = long) */ + 32, /* bitsize */ + true, /* pc_relative */ + 0, /* bitpos */ + complain_overflow_bitfield, /* complain_on_overflow */ + bfd_elf_generic_reloc, /* special_function */ + "R_I370_REL32", /* name */ + false, /* partial_inplace */ + 0, /* src_mask */ + 0xffffffff, /* dst_mask */ + true), /* pcrel_offset */ + + /* A standard 12 bit relocation. */ + HOWTO (R_I370_ADDR12, /* type */ + 0, /* rightshift */ + 1, /* size (0 = byte, 1 = short, 2 = long) */ + 12, /* bitsize */ + false, /* pc_relative */ + 0, /* bitpos */ + complain_overflow_bitfield, /* complain_on_overflow */ + bfd_elf_generic_reloc, /* special_function */ + "R_I370_ADDR12", /* name */ + false, /* partial_inplace */ + 0, /* src_mask */ + 0xfff, /* dst_mask */ + false), /* pcrel_offset */ + + /* 12-bit PC relative */ + HOWTO (R_I370_REL12, /* type */ + 0, /* rightshift */ + 1, /* size (0 = byte, 1 = short, 2 = long) */ + 12, /* bitsize */ + true, /* pc_relative */ + 0, /* bitpos */ + complain_overflow_bitfield, /* complain_on_overflow */ + bfd_elf_generic_reloc, /* special_function */ + "R_I370_REL12", /* name */ + false, /* partial_inplace */ + 0, /* src_mask */ + 0xfff, /* dst_mask */ + true), /* pcrel_offset */ + + /* A standard 8 bit relocation. */ + HOWTO (R_I370_ADDR8, /* type */ + 0, /* rightshift */ + 0, /* size (0 = byte, 1 = short, 2 = long) */ + 8, /* bitsize */ + false, /* pc_relative */ + 0, /* bitpos */ + complain_overflow_bitfield, /* complain_on_overflow */ + bfd_elf_generic_reloc, /* special_function */ + "R_I370_ADDR8", /* name */ + false, /* partial_inplace */ + 0, /* src_mask */ + 0xff, /* dst_mask */ + false), /* pcrel_offset */ + + /* 8-bit PC relative */ + HOWTO (R_I370_REL8, /* type */ + 0, /* rightshift */ + 0, /* size (0 = byte, 1 = short, 2 = long) */ + 8, /* bitsize */ + true, /* pc_relative */ + 0, /* bitpos */ + complain_overflow_bitfield, /* complain_on_overflow */ + bfd_elf_generic_reloc, /* special_function */ + "R_I370_REL8", /* name */ + false, /* partial_inplace */ + 0, /* src_mask */ + 0xff, /* dst_mask */ + true), /* pcrel_offset */ + + /* This is used only by the dynamic linker. The symbol should exist + both in the object being run and in some shared library. The + dynamic linker copies the data addressed by the symbol from the + shared library into the object, because the object being + run has to have the data at some particular address. */ + HOWTO (R_I370_COPY, /* type */ + 0, /* rightshift */ + 2, /* size (0 = byte, 1 = short, 2 = long) */ + 32, /* bitsize */ + false, /* pc_relative */ + 0, /* bitpos */ + complain_overflow_bitfield, /* complain_on_overflow */ + bfd_elf_generic_reloc, /* special_function */ + "R_I370_COPY", /* name */ + false, /* partial_inplace */ + 0, /* src_mask */ + 0, /* dst_mask */ + false), /* pcrel_offset */ + + /* Used only by the dynamic linker. When the object is run, this + longword is set to the load address of the object, plus the + addend. */ + HOWTO (R_I370_RELATIVE, /* type */ + 0, /* rightshift */ + 2, /* size (0 = byte, 1 = short, 2 = long) */ + 32, /* bitsize */ + false, /* pc_relative */ + 0, /* bitpos */ + complain_overflow_bitfield, /* complain_on_overflow */ + bfd_elf_generic_reloc, /* special_function */ + "R_I370_RELATIVE", /* name */ + false, /* partial_inplace */ + 0, /* src_mask */ + 0xffffffff, /* dst_mask */ + false), /* pcrel_offset */ + +}; + + +static void i370_elf_howto_init PARAMS ((void)); +static void i370_elf_info_to_howto PARAMS ((bfd *abfd, arelent *cache_ptr, + Elf32_Internal_Rela *dst)); +static boolean i370_elf_set_private_flags PARAMS ((bfd *, flagword)); + + +/* Initialize the i370_elf_howto_table, so that linear accesses can be done. */ + +static void +i370_elf_howto_init () +{ + unsigned int i, type; + + for (i = 0; i < sizeof (i370_elf_howto_raw) / sizeof (i370_elf_howto_raw[0]); i++) + { + type = i370_elf_howto_raw[i].type; + BFD_ASSERT (type < sizeof(i370_elf_howto_table) / sizeof(i370_elf_howto_table[0])); + i370_elf_howto_table[type] = &i370_elf_howto_raw[i]; + } +} + + +static reloc_howto_type * +i370_elf_reloc_type_lookup (abfd, code) + bfd *abfd; + bfd_reloc_code_real_type code; +{ + enum i370_reloc_type i370_reloc = R_I370_NONE; + + if (!i370_elf_howto_table[ R_I370_ADDR31 ]) /* Initialize howto table if needed */ + i370_elf_howto_init (); + + switch ((int)code) + { + default: + return (reloc_howto_type *)NULL; + + case BFD_RELOC_NONE: i370_reloc = R_I370_NONE; break; + case BFD_RELOC_32: i370_reloc = R_I370_ADDR31; break; + case BFD_RELOC_16: i370_reloc = R_I370_ADDR16; break; + case BFD_RELOC_32_PCREL: i370_reloc = R_I370_REL31; break; + case BFD_RELOC_CTOR: i370_reloc = R_I370_ADDR31; break; + case BFD_RELOC_I370_D12: i370_reloc = R_I370_ADDR12; break; + } + + return i370_elf_howto_table[ (int)i370_reloc ]; +}; + +static boolean i370_elf_copy_private_bfd_data PARAMS ((bfd *, bfd *)); +static boolean i370_elf_merge_private_bfd_data PARAMS ((bfd *, bfd *)); + +static boolean i370_elf_relocate_section PARAMS ((bfd *, + struct bfd_link_info *info, + bfd *, + asection *, + bfd_byte *, + Elf_Internal_Rela *relocs, + Elf_Internal_Sym *local_syms, + asection **)); + +static boolean i370_elf_create_dynamic_sections PARAMS ((bfd *, + struct bfd_link_info *)); + +static boolean i370_elf_section_from_shdr PARAMS ((bfd *, + Elf32_Internal_Shdr *, + char *)); +static boolean i370_elf_fake_sections PARAMS ((bfd *, + Elf32_Internal_Shdr *, + asection *)); + +static elf_linker_section_t *i370_elf_create_linker_section + PARAMS ((bfd *abfd, + struct bfd_link_info *info, + enum elf_linker_section_enum)); + +static boolean i370_elf_check_relocs PARAMS ((bfd *, + struct bfd_link_info *, + asection *, + const Elf_Internal_Rela *)); + +static boolean i370_elf_adjust_dynamic_symbol PARAMS ((struct bfd_link_info *, + struct elf_link_hash_entry *)); + +static boolean i370_elf_adjust_dynindx PARAMS ((struct elf_link_hash_entry *, PTR)); + +static boolean i370_elf_size_dynamic_sections PARAMS ((bfd *, struct bfd_link_info *)); + +static boolean i370_elf_finish_dynamic_sections PARAMS ((bfd *, struct bfd_link_info *)); + +/* The name of the dynamic interpreter. This is put in the .interp + section. */ + +#define ELF_DYNAMIC_INTERPRETER "/lib/ld.so" + + +/* Set the howto pointer for an i370 ELF reloc. */ + +static void +i370_elf_info_to_howto (abfd, cache_ptr, dst) + bfd *abfd; + arelent *cache_ptr; + Elf32_Internal_Rela *dst; +{ + if (!i370_elf_howto_table[ R_I370_ADDR31 ]) /* Initialize howto table */ + i370_elf_howto_init (); + + BFD_ASSERT (ELF32_R_TYPE (dst->r_info) < (unsigned int) R_I370_max); + cache_ptr->howto = i370_elf_howto_table[ELF32_R_TYPE (dst->r_info)]; +} + +/* hack alert -- the following several routines look generic to me ... + * why are we bothering with them ??? + */ +/* Function to set whether a module needs the -mrelocatable bit set. */ +static boolean +i370_elf_set_private_flags (abfd, flags) + bfd *abfd; + flagword flags; +{ + BFD_ASSERT (!elf_flags_init (abfd) + || elf_elfheader (abfd)->e_flags == flags); + + elf_elfheader (abfd)->e_flags = flags; + elf_flags_init (abfd) = true; + return true; +} + +/* Copy backend specific data from one object module to another */ +static boolean +i370_elf_copy_private_bfd_data (ibfd, obfd) + bfd *ibfd; + bfd *obfd; +{ + if (bfd_get_flavour (ibfd) != bfd_target_elf_flavour + || bfd_get_flavour (obfd) != bfd_target_elf_flavour) + return true; + + BFD_ASSERT (!elf_flags_init (obfd) + || elf_elfheader (obfd)->e_flags == elf_elfheader (ibfd)->e_flags); + + elf_elfheader (obfd)->e_flags = elf_elfheader (ibfd)->e_flags; + elf_flags_init (obfd) = true; + return true; +} + +/* Merge backend specific data from an object file to the output + object file when linking */ +static boolean +i370_elf_merge_private_bfd_data (ibfd, obfd) + bfd *ibfd; + bfd *obfd; +{ + flagword old_flags; + flagword new_flags; + + if (bfd_get_flavour (ibfd) != bfd_target_elf_flavour + || bfd_get_flavour (obfd) != bfd_target_elf_flavour) + return true; + + new_flags = elf_elfheader (ibfd)->e_flags; + old_flags = elf_elfheader (obfd)->e_flags; + if (!elf_flags_init (obfd)) /* First call, no flags set */ + { + elf_flags_init (obfd) = true; + elf_elfheader (obfd)->e_flags = new_flags; + } + + else if (new_flags == old_flags) /* Compatible flags are ok */ + ; + + else /* Incompatible flags */ + { + (*_bfd_error_handler) + ("%s: uses different e_flags (0x%lx) fields than previous modules (0x%lx)", + bfd_get_filename (ibfd), (long)new_flags, (long)old_flags); + + bfd_set_error (bfd_error_bad_value); + return false; + } + + return true; +} + + +/* Handle an i370 specific section when reading an object file. This + is called when elfcode.h finds a section with an unknown type. */ +/* XXX hack alert bogus This routine is mostly all junk and almost + * certainly does the wrong thing. Its here simply because it does + * just enough to allow glibc-2.1 ld.so to compile & link. + */ + +static boolean +i370_elf_section_from_shdr (abfd, hdr, name) + bfd *abfd; + Elf32_Internal_Shdr *hdr; + char *name; +{ + asection *newsect; + flagword flags; + + if (! _bfd_elf_make_section_from_shdr (abfd, hdr, name)) + return false; + + newsect = hdr->bfd_section; + flags = bfd_get_section_flags (abfd, newsect); + if (hdr->sh_flags & SHF_EXCLUDE) + flags |= SEC_EXCLUDE; + + if (hdr->sh_type == SHT_ORDERED) + flags |= SEC_SORT_ENTRIES; + + bfd_set_section_flags (abfd, newsect, flags); + return true; +} + + + +/* Set up any other section flags and such that may be necessary. */ +/* XXX hack alert bogus This routine is mostly all junk and almost + * certainly does the wrong thing. Its here simply because it does + * just enough to allow glibc-2.1 ld.so to compile & link. + */ + + +static boolean +i370_elf_fake_sections (abfd, shdr, asect) + bfd *abfd; + Elf32_Internal_Shdr *shdr; + asection *asect; +{ + if ((asect->flags & SEC_EXCLUDE) != 0) + shdr->sh_flags |= SHF_EXCLUDE; + + if ((asect->flags & SEC_SORT_ENTRIES) != 0) + shdr->sh_type = SHT_ORDERED; + + return true; +} + + +/* Create a special linker section */ +/* XXX hack alert bogus This routine is mostly all junk and almost + * certainly does the wrong thing. Its here simply because it does + * just enough to allow glibc-2.1 ld.so to compile & link. + */ + +static elf_linker_section_t * +i370_elf_create_linker_section (abfd, info, which) + bfd *abfd; + struct bfd_link_info *info; + enum elf_linker_section_enum which; +{ + bfd *dynobj = elf_hash_table (info)->dynobj; + elf_linker_section_t *lsect; + + /* Record the first bfd section that needs the special section */ + if (!dynobj) + dynobj = elf_hash_table (info)->dynobj = abfd; + + /* If this is the first time, create the section */ + lsect = elf_linker_section (dynobj, which); + if (!lsect) + { + elf_linker_section_t defaults; + static elf_linker_section_t zero_section; + + defaults = zero_section; + defaults.which = which; + defaults.hole_written_p = false; + defaults.alignment = 2; + + /* Both of these sections are (technically) created by the user + putting data in them, so they shouldn't be marked + SEC_LINKER_CREATED. + + The linker creates them so it has somewhere to attach their + respective symbols. In fact, if they were empty it would + be OK to leave the symbol set to 0 (or any random number), because + the appropriate register should never be used. */ + defaults.flags = (SEC_ALLOC | SEC_LOAD | SEC_HAS_CONTENTS + | SEC_IN_MEMORY); + + switch (which) + { + default: + (*_bfd_error_handler) ("%s: Unknown special linker type %d", + bfd_get_filename (abfd), + (int)which); + + bfd_set_error (bfd_error_bad_value); + return (elf_linker_section_t *)0; + + case LINKER_SECTION_SDATA: /* .sdata/.sbss section */ + defaults.name = ".sdata"; + defaults.rel_name = ".rela.sdata"; + defaults.bss_name = ".sbss"; + defaults.sym_name = "_SDA_BASE_"; + defaults.sym_offset = 32768; + break; + + case LINKER_SECTION_SDATA2: /* .sdata2/.sbss2 section */ + defaults.name = ".sdata2"; + defaults.rel_name = ".rela.sdata2"; + defaults.bss_name = ".sbss2"; + defaults.sym_name = "_SDA2_BASE_"; + defaults.sym_offset = 32768; + defaults.flags |= SEC_READONLY; + break; + } + + lsect = _bfd_elf_create_linker_section (abfd, info, which, &defaults); + } + + return lsect; +} + + +/* We have to create .dynsbss and .rela.sbss here so that they get mapped + to output sections (just like _bfd_elf_create_dynamic_sections has + to create .dynbss and .rela.bss). */ +/* XXX hack alert bogus This routine is mostly all junk and almost + * certainly does the wrong thing. Its here simply because it does + * just enough to allow glibc-2.1 ld.so to compile & link. + */ + +static boolean +i370_elf_create_dynamic_sections (abfd, info) + bfd *abfd; + struct bfd_link_info *info; +{ + register asection *s; + flagword flags; + + if (!_bfd_elf_create_dynamic_sections(abfd, info)) + return false; + + flags = (SEC_ALLOC | SEC_LOAD | SEC_HAS_CONTENTS | SEC_IN_MEMORY + | SEC_LINKER_CREATED); + + s = bfd_make_section (abfd, ".dynsbss"); + if (s == NULL + || ! bfd_set_section_flags (abfd, s, SEC_ALLOC)) + return false; + + if (! info->shared) + { + s = bfd_make_section (abfd, ".rela.sbss"); + if (s == NULL + || ! bfd_set_section_flags (abfd, s, flags | SEC_READONLY) + || ! bfd_set_section_alignment (abfd, s, 2)) + return false; + } + + /* xxx beats me, seem to need a rela.text ... */ + s = bfd_make_section (abfd, ".rela.text"); + if (s == NULL + || ! bfd_set_section_flags (abfd, s, flags | SEC_READONLY) + || ! bfd_set_section_alignment (abfd, s, 2)) + return false; + return true; +} + +/* Adjust a symbol defined by a dynamic object and referenced by a + regular object. The current definition is in some section of the + dynamic object, but we're not including those sections. We have to + change the definition to something the rest of the link can + understand. */ +/* XXX hack alert bogus This routine is mostly all junk and almost + * certainly does the wrong thing. Its here simply because it does + * just enough to allow glibc-2.1 ld.so to compile & link. + */ + +static boolean +i370_elf_adjust_dynamic_symbol (info, h) + struct bfd_link_info *info; + struct elf_link_hash_entry *h; +{ + bfd *dynobj = elf_hash_table (info)->dynobj; + asection *s; + unsigned int power_of_two; + bfd_vma plt_offset; + +#ifdef DEBUG + fprintf (stderr, "i370_elf_adjust_dynamic_symbol called for %s\n", + h->root.root.string); +#endif + + /* Make sure we know what is going on here. */ + BFD_ASSERT (dynobj != NULL + && ((h->elf_link_hash_flags & ELF_LINK_HASH_NEEDS_PLT) + || h->weakdef != NULL + || ((h->elf_link_hash_flags + & ELF_LINK_HASH_DEF_DYNAMIC) != 0 + && (h->elf_link_hash_flags + & ELF_LINK_HASH_REF_REGULAR) != 0 + && (h->elf_link_hash_flags + & ELF_LINK_HASH_DEF_REGULAR) == 0))); + + + s = bfd_get_section_by_name (dynobj, ".rela.text"); + BFD_ASSERT (s != NULL); + s->_raw_size += sizeof (Elf32_External_Rela); + + /* If this is a weak symbol, and there is a real definition, the + processor independent code will have arranged for us to see the + real definition first, and we can just use the same value. */ + if (h->weakdef != NULL) + { + BFD_ASSERT (h->weakdef->root.type == bfd_link_hash_defined + || h->weakdef->root.type == bfd_link_hash_defweak); + h->root.u.def.section = h->weakdef->root.u.def.section; + h->root.u.def.value = h->weakdef->root.u.def.value; + return true; + } + + /* This is a reference to a symbol defined by a dynamic object which + is not a function. */ + + /* If we are creating a shared library, we must presume that the + only references to the symbol are via the global offset table. + For such cases we need not do anything here; the relocations will + be handled correctly by relocate_section. */ + if (info->shared) + return true; + + /* We must allocate the symbol in our .dynbss section, which will + become part of the .bss section of the executable. There will be + an entry for this symbol in the .dynsym section. The dynamic + object will contain position independent code, so all references + from the dynamic object to this symbol will go through the global + offset table. The dynamic linker will use the .dynsym entry to + determine the address it must put in the global offset table, so + both the dynamic object and the regular object will refer to the + same memory location for the variable. + + Of course, if the symbol is sufficiently small, we must instead + allocate it in .sbss. FIXME: It would be better to do this if and + only if there were actually SDAREL relocs for that symbol. */ + + if (h->size <= elf_gp_size (dynobj)) + s = bfd_get_section_by_name (dynobj, ".dynsbss"); + else + s = bfd_get_section_by_name (dynobj, ".dynbss"); + BFD_ASSERT (s != NULL); + + /* We must generate a R_I370_COPY reloc to tell the dynamic linker to + copy the initial value out of the dynamic object and into the + runtime process image. We need to remember the offset into the + .rela.bss section we are going to use. */ + if ((h->root.u.def.section->flags & SEC_ALLOC) != 0) + { + asection *srel; + + if (h->size <= elf_gp_size (dynobj)) + srel = bfd_get_section_by_name (dynobj, ".rela.sbss"); + else + srel = bfd_get_section_by_name (dynobj, ".rela.bss"); + BFD_ASSERT (srel != NULL); + srel->_raw_size += sizeof (Elf32_External_Rela); + h->elf_link_hash_flags |= ELF_LINK_HASH_NEEDS_COPY; + } + + /* We need to figure out the alignment required for this symbol. I + have no idea how ELF linkers handle this. */ + power_of_two = bfd_log2 (h->size); + if (power_of_two > 4) + power_of_two = 4; + + /* Apply the required alignment. */ + s->_raw_size = BFD_ALIGN (s->_raw_size, + (bfd_size_type) (1 << power_of_two)); + if (power_of_two > bfd_get_section_alignment (dynobj, s)) + { + if (! bfd_set_section_alignment (dynobj, s, power_of_two)) + return false; + } + + /* Define the symbol as being at this point in the section. */ + h->root.u.def.section = s; + h->root.u.def.value = s->_raw_size; + + /* Increment the section size to make room for the symbol. */ + s->_raw_size += h->size; + + return true; +} + + +/* Increment the index of a dynamic symbol by a given amount. Called + via elf_link_hash_traverse. */ +/* XXX hack alert bogus This routine is mostly all junk and almost + * certainly does the wrong thing. Its here simply because it does + * just enough to allow glibc-2.1 ld.so to compile & link. + */ + +static boolean +i370_elf_adjust_dynindx (h, cparg) + struct elf_link_hash_entry *h; + PTR cparg; +{ + int *cp = (int *) cparg; + +#ifdef DEBUG + fprintf (stderr, + "i370_elf_adjust_dynindx called, h->dynindx = %d, *cp = %d\n", + h->dynindx, *cp); +#endif + + if (h->dynindx != -1) + h->dynindx += *cp; + + return true; +} + + +/* Set the sizes of the dynamic sections. */ +/* XXX hack alert bogus This routine is mostly all junk and almost + * certainly does the wrong thing. Its here simply because it does + * just enough to allow glibc-2.1 ld.so to compile & link. + */ + +static boolean +i370_elf_size_dynamic_sections (output_bfd, info) + bfd *output_bfd; + struct bfd_link_info *info; +{ + bfd *dynobj; + asection *s; + boolean plt; + boolean relocs; + boolean reltext; + +#ifdef DEBUG + fprintf (stderr, "i370_elf_size_dynamic_sections called\n"); +#endif + + dynobj = elf_hash_table (info)->dynobj; + BFD_ASSERT (dynobj != NULL); + + if (elf_hash_table (info)->dynamic_sections_created) + { + /* Set the contents of the .interp section to the interpreter. */ + if (! info->shared) + { + s = bfd_get_section_by_name (dynobj, ".interp"); + BFD_ASSERT (s != NULL); + s->_raw_size = sizeof ELF_DYNAMIC_INTERPRETER; + s->contents = (unsigned char *) ELF_DYNAMIC_INTERPRETER; + } + } + else + { + /* We may have created entries in the .rela.got, .rela.sdata, and + .rela.sdata2 sections. However, if we are not creating the + dynamic sections, we will not actually use these entries. Reset + the size of .rela.got, et al, which will cause it to get + stripped from the output file below. */ + static char *rela_sections[] = { ".rela.got", ".rela.sdata", + ".rela.sdata2", ".rela.sbss", + (char *)0 }; + char **p; + + for (p = rela_sections; *p != (char *)0; p++) + { + s = bfd_get_section_by_name (dynobj, *p); + if (s != NULL) + s->_raw_size = 0; + } + } + + /* The check_relocs and adjust_dynamic_symbol entry points have + determined the sizes of the various dynamic sections. Allocate + memory for them. */ + plt = false; + relocs = false; + reltext = false; + for (s = dynobj->sections; s != NULL; s = s->next) + { + const char *name; + boolean strip; + + if ((s->flags & SEC_LINKER_CREATED) == 0) + continue; + + /* It's OK to base decisions on the section name, because none + of the dynobj section names depend upon the input files. */ + name = bfd_get_section_name (dynobj, s); + strip = false; + + if (strcmp (name, ".plt") == 0) + { + if (s->_raw_size == 0) + { + /* Strip this section if we don't need it; see the + comment below. */ + strip = true; + } + else + { + /* Remember whether there is a PLT. */ + plt = true; + } + } + else if (strncmp (name, ".rela", 5) == 0) + { + if (s->_raw_size == 0) + { + /* If we don't need this section, strip it from the + output file. This is mostly to handle .rela.bss and + .rela.plt. We must create both sections in + create_dynamic_sections, because they must be created + before the linker maps input sections to output + sections. The linker does that before + adjust_dynamic_symbol is called, and it is that + function which decides whether anything needs to go + into these sections. */ + strip = true; + } + else + { + asection *target; + const char *outname; + + /* Remember whether there are any relocation sections. */ + relocs = true; + + /* If this relocation section applies to a read only + section, then we probably need a DT_TEXTREL entry. */ + outname = bfd_get_section_name (output_bfd, + s->output_section); + target = bfd_get_section_by_name (output_bfd, outname + 5); + if (target != NULL + && (target->flags & SEC_READONLY) != 0 + && (target->flags & SEC_ALLOC) != 0) + reltext = true; + + /* We use the reloc_count field as a counter if we need + to copy relocs into the output file. */ + s->reloc_count = 0; + } + } + else if (strcmp (name, ".got") != 0 + && strcmp (name, ".sdata") != 0 + && strcmp (name, ".sdata2") != 0) + { + /* It's not one of our sections, so don't allocate space. */ + continue; + } + + if (strip) + { + asection **spp; + + for (spp = &s->output_section->owner->sections; + *spp != s->output_section; + spp = &(*spp)->next) + ; + *spp = s->output_section->next; + --s->output_section->owner->section_count; + + continue; + } + /* Allocate memory for the section contents. */ + s->contents = (bfd_byte *) bfd_zalloc (dynobj, s->_raw_size); + if (s->contents == NULL && s->_raw_size != 0) + return false; + } + + if (elf_hash_table (info)->dynamic_sections_created) + { + /* Add some entries to the .dynamic section. We fill in the + values later, in i370_elf_finish_dynamic_sections, but we + must add the entries now so that we get the correct size for + the .dynamic section. The DT_DEBUG entry is filled in by the + dynamic linker and used by the debugger. */ + if (! info->shared) + { + if (! bfd_elf32_add_dynamic_entry (info, DT_DEBUG, 0)) + return false; + } + + if (plt) + { + if (! bfd_elf32_add_dynamic_entry (info, DT_PLTGOT, 0) + || ! bfd_elf32_add_dynamic_entry (info, DT_PLTRELSZ, 0) + || ! bfd_elf32_add_dynamic_entry (info, DT_PLTREL, DT_RELA) + || ! bfd_elf32_add_dynamic_entry (info, DT_JMPREL, 0)) + return false; + } + + if (relocs) + { + if (! bfd_elf32_add_dynamic_entry (info, DT_RELA, 0) + || ! bfd_elf32_add_dynamic_entry (info, DT_RELASZ, 0) + || ! bfd_elf32_add_dynamic_entry (info, DT_RELAENT, + sizeof (Elf32_External_Rela))) + return false; + } + + if (reltext) + { + if (! bfd_elf32_add_dynamic_entry (info, DT_TEXTREL, 0)) + return false; + } + } + + /* If we are generating a shared library, we generate a section + symbol for each output section. These are local symbols, which + means that they must come first in the dynamic symbol table. + That means we must increment the dynamic symbol index of every + other dynamic symbol. + + FIXME: We assume that there will never be relocations to + locations in linker-created sections that do not have + externally-visible names. Instead, we should work out precisely + which sections relocations are targetted at. */ + if (info->shared) + { + int c; + + for (c = 0, s = output_bfd->sections; s != NULL; s = s->next) + { + if ((s->flags & SEC_LINKER_CREATED) != 0 + || (s->flags & SEC_ALLOC) == 0) + { + elf_section_data (s)->dynindx = -1; + continue; + } + + /* These symbols will have no names, so we don't need to + fiddle with dynstr_index. */ + + elf_section_data (s)->dynindx = c + 1; + + c++; + } + + elf_link_hash_traverse (elf_hash_table (info), + i370_elf_adjust_dynindx, + (PTR) &c); + elf_hash_table (info)->dynsymcount += c; + } + + return true; +} + + +/* Look through the relocs for a section during the first phase, and + allocate space in the global offset table or procedure linkage + table. */ +/* XXX hack alert bogus This routine is mostly all junk and almost + * certainly does the wrong thing. Its here simply because it does + * just enough to allow glibc-2.1 ld.so to compile & link. + */ + +static boolean +i370_elf_check_relocs (abfd, info, sec, relocs) + bfd *abfd; + struct bfd_link_info *info; + asection *sec; + const Elf_Internal_Rela *relocs; +{ + bfd *dynobj; + Elf_Internal_Shdr *symtab_hdr; + struct elf_link_hash_entry **sym_hashes; + const Elf_Internal_Rela *rel; + const Elf_Internal_Rela *rel_end; + bfd_vma *local_got_offsets; + elf_linker_section_t *sdata; + elf_linker_section_t *sdata2; + asection *sreloc; + asection *sgot; + asection *srelgot = NULL; + + if (info->relocateable) + return true; + +#ifdef DEBUG + fprintf (stderr, "i370_elf_check_relocs called for section %s in %s\n", + bfd_get_section_name (abfd, sec), + bfd_get_filename (abfd)); +#endif + + dynobj = elf_hash_table (info)->dynobj; + symtab_hdr = &elf_tdata (abfd)->symtab_hdr; + sym_hashes = elf_sym_hashes (abfd); + local_got_offsets = elf_local_got_offsets (abfd); + + sreloc = NULL; + + rel_end = relocs + sec->reloc_count; + for (rel = relocs; rel < rel_end; rel++) + { + unsigned long r_symndx; + struct elf_link_hash_entry *h; + + r_symndx = ELF32_R_SYM (rel->r_info); + if (r_symndx < symtab_hdr->sh_info) + h = NULL; + else + h = sym_hashes[r_symndx - symtab_hdr->sh_info]; + + if (info->shared) + { +#ifdef DEBUG + fprintf (stderr, + "i370_elf_check_relocs needs to create relocation for %s\n", + (h && h->root.root.string) + ? h->root.root.string : "<unknown>"); +#endif + if (sreloc == NULL) + { + const char *name; + + name = (bfd_elf_string_from_elf_section + (abfd, + elf_elfheader (abfd)->e_shstrndx, + elf_section_data (sec)->rel_hdr.sh_name)); + if (name == NULL) + return false; + + BFD_ASSERT (strncmp (name, ".rela", 5) == 0 + && strcmp (bfd_get_section_name (abfd, sec), name + 5) == 0); + + sreloc = bfd_get_section_by_name (dynobj, name); + if (sreloc == NULL) + { + flagword flags; + + sreloc = bfd_make_section (dynobj, name); + flags = (SEC_HAS_CONTENTS | SEC_READONLY + | SEC_IN_MEMORY | SEC_LINKER_CREATED); + if ((sec->flags & SEC_ALLOC) != 0) + flags |= SEC_ALLOC | SEC_LOAD; + if (sreloc == NULL + || ! bfd_set_section_flags (dynobj, sreloc, flags) + || ! bfd_set_section_alignment (dynobj, sreloc, 2)) + return false; + } + } + + sreloc->_raw_size += sizeof (Elf32_External_Rela); + + /* FIXME: We should here do what the m68k and i386 + backends do: if the reloc is pc-relative, record it + in case it turns out that the reloc is unnecessary + because the symbol is forced local by versioning or + we are linking with -Bdynamic. Fortunately this + case is not frequent. */ + } + } + + return true; +} + + +/* Finish up the dynamic sections. */ +/* XXX hack alert bogus This routine is mostly all junk and almost + * certainly does the wrong thing. Its here simply because it does + * just enough to allow glibc-2.1 ld.so to compile & link. + */ + +static boolean +i370_elf_finish_dynamic_sections (output_bfd, info) + bfd *output_bfd; + struct bfd_link_info *info; +{ + asection *sdyn; + bfd *dynobj = elf_hash_table (info)->dynobj; + asection *sgot = bfd_get_section_by_name (dynobj, ".got"); + +#ifdef DEBUG + fprintf (stderr, "i370_elf_finish_dynamic_sections called\n"); +#endif + + sdyn = bfd_get_section_by_name (dynobj, ".dynamic"); + + if (elf_hash_table (info)->dynamic_sections_created) + { + asection *splt; + Elf32_External_Dyn *dyncon, *dynconend; + + splt = bfd_get_section_by_name (dynobj, ".plt"); + BFD_ASSERT (splt != NULL && sdyn != NULL); + + dyncon = (Elf32_External_Dyn *) sdyn->contents; + dynconend = (Elf32_External_Dyn *) (sdyn->contents + sdyn->_raw_size); + for (; dyncon < dynconend; dyncon++) + { + Elf_Internal_Dyn dyn; + const char *name; + boolean size; + + bfd_elf32_swap_dyn_in (dynobj, dyncon, &dyn); + + switch (dyn.d_tag) + { + case DT_PLTGOT: name = ".plt"; size = false; break; + case DT_PLTRELSZ: name = ".rela.plt"; size = true; break; + case DT_JMPREL: name = ".rela.plt"; size = false; break; + default: name = NULL; size = false; break; + } + + if (name != NULL) + { + asection *s; + + s = bfd_get_section_by_name (output_bfd, name); + if (s == NULL) + dyn.d_un.d_val = 0; + else + { + if (! size) + dyn.d_un.d_ptr = s->vma; + else + { + if (s->_cooked_size != 0) + dyn.d_un.d_val = s->_cooked_size; + else + dyn.d_un.d_val = s->_raw_size; + } + } + bfd_elf32_swap_dyn_out (output_bfd, &dyn, dyncon); + } + } + } + + /* Add a blrl instruction at _GLOBAL_OFFSET_TABLE_-4 so that a function can + easily find the address of the _GLOBAL_OFFSET_TABLE_. */ +/* XXX this is clearly very wrong for the 370 arch */ + if (sgot) + { + unsigned char *contents = sgot->contents; + bfd_put_32 (output_bfd, 0x4e800021 /* blrl */, contents); + + if (sdyn == NULL) + bfd_put_32 (output_bfd, (bfd_vma) 0, contents+4); + else + bfd_put_32 (output_bfd, + sdyn->output_section->vma + sdyn->output_offset, + contents+4); + + elf_section_data (sgot->output_section)->this_hdr.sh_entsize = 4; + } + + if (info->shared) + { + asection *sdynsym; + asection *s; + Elf_Internal_Sym sym; + int maxdindx = 0; + + /* Set up the section symbols for the output sections. */ + + sdynsym = bfd_get_section_by_name (dynobj, ".dynsym"); + BFD_ASSERT (sdynsym != NULL); + + sym.st_size = 0; + sym.st_name = 0; + sym.st_info = ELF_ST_INFO (STB_LOCAL, STT_SECTION); + sym.st_other = 0; + + for (s = output_bfd->sections; s != NULL; s = s->next) + { + int indx, dindx; + + sym.st_value = s->vma; + + indx = elf_section_data (s)->this_idx; + dindx = elf_section_data (s)->dynindx; + if (dindx != -1) + { + BFD_ASSERT(indx > 0); + BFD_ASSERT(dindx > 0); + + if (dindx > maxdindx) + maxdindx = dindx; + + sym.st_shndx = indx; + + bfd_elf32_swap_symbol_out (output_bfd, &sym, + (PTR) (((Elf32_External_Sym *) + sdynsym->contents) + + dindx)); + } + } + + /* Set the sh_info field of the output .dynsym section to the + index of the first global symbol. */ + elf_section_data (sdynsym->output_section)->this_hdr.sh_info = + maxdindx + 1; + } + + return true; +} + + +/* The RELOCATE_SECTION function is called by the ELF backend linker + to handle the relocations for a section. + + The relocs are always passed as Rela structures; if the section + actually uses Rel structures, the r_addend field will always be + zero. + + This function is responsible for adjust the section contents as + necessary, and (if using Rela relocs and generating a + relocateable output file) adjusting the reloc addend as + necessary. + + This function does not have to worry about setting the reloc + address or the reloc symbol index. + + LOCAL_SYMS is a pointer to the swapped in local symbols. + + LOCAL_SECTIONS is an array giving the section in the input file + corresponding to the st_shndx field of each local symbol. + + The global hash table entry for the global symbols can be found + via elf_sym_hashes (input_bfd). + + When generating relocateable output, this function must handle + STB_LOCAL/STT_SECTION symbols specially. The output symbol is + going to be the section symbol corresponding to the output + section, which means that the addend must be adjusted + accordingly. */ + +static boolean +i370_elf_relocate_section (output_bfd, info, input_bfd, input_section, + contents, relocs, local_syms, local_sections) + bfd *output_bfd; + struct bfd_link_info *info; + bfd *input_bfd; + asection *input_section; + bfd_byte *contents; + Elf_Internal_Rela *relocs; + Elf_Internal_Sym *local_syms; + asection **local_sections; +{ + Elf_Internal_Shdr *symtab_hdr = &elf_tdata (input_bfd)->symtab_hdr; + struct elf_link_hash_entry **sym_hashes = elf_sym_hashes (input_bfd); + bfd *dynobj = elf_hash_table (info)->dynobj; + Elf_Internal_Rela *rel = relocs; + Elf_Internal_Rela *relend = relocs + input_section->reloc_count; + asection *sreloc = NULL; + bfd_vma *local_got_offsets; + boolean ret = true; + +#ifdef DEBUG + fprintf (stderr, "i370_elf_relocate_section called for %s section %s, %ld relocations%s\n", + bfd_get_filename (input_bfd), + bfd_section_name(input_bfd, input_section), + (long)input_section->reloc_count, + (info->relocateable) ? " (relocatable)" : ""); +#endif + + if (!i370_elf_howto_table[ R_I370_ADDR31 ]) /* Initialize howto table if needed */ + i370_elf_howto_init (); + + local_got_offsets = elf_local_got_offsets (input_bfd); + + for (; rel < relend; rel++) + { + enum i370_reloc_type r_type = (enum i370_reloc_type)ELF32_R_TYPE (rel->r_info); + bfd_vma offset = rel->r_offset; + bfd_vma addend = rel->r_addend; + bfd_reloc_status_type r = bfd_reloc_other; + Elf_Internal_Sym *sym = (Elf_Internal_Sym *)0; + asection *sec = (asection *)0; + struct elf_link_hash_entry *h = (struct elf_link_hash_entry *)0; + const char *sym_name = (const char *)0; + reloc_howto_type *howto; + unsigned long r_symndx; + bfd_vma relocation; + + /* Unknown relocation handling */ + if ((unsigned)r_type >= (unsigned)R_I370_max + || !i370_elf_howto_table[(int)r_type]) + { + (*_bfd_error_handler) ("%s: unknown relocation type %d", + bfd_get_filename (input_bfd), + (int)r_type); + + bfd_set_error (bfd_error_bad_value); + ret = false; + continue; + } + + howto = i370_elf_howto_table[(int)r_type]; + r_symndx = ELF32_R_SYM (rel->r_info); + + if (info->relocateable) + { + /* This is a relocateable link. We don't have to change + anything, unless the reloc is against a section symbol, + in which case we have to adjust according to where the + section symbol winds up in the output section. */ + if (r_symndx < symtab_hdr->sh_info) + { + sym = local_syms + r_symndx; + if ((unsigned)ELF_ST_TYPE (sym->st_info) == STT_SECTION) + { + sec = local_sections[r_symndx]; + addend = rel->r_addend += sec->output_offset + sym->st_value; + } + } + +#ifdef DEBUG + fprintf (stderr, "\ttype = %s (%d), symbol index = %ld, offset = %ld, addend = %ld\n", + howto->name, + (int)r_type, + r_symndx, + (long)offset, + (long)addend); +#endif + continue; + } + + /* This is a final link. */ + if (r_symndx < symtab_hdr->sh_info) + { + sym = local_syms + r_symndx; + sec = local_sections[r_symndx]; + sym_name = "<local symbol>"; + + relocation = (sec->output_section->vma + + sec->output_offset + + sym->st_value); + } + else + { + h = sym_hashes[r_symndx - symtab_hdr->sh_info]; + while (h->root.type == bfd_link_hash_indirect + || h->root.type == bfd_link_hash_warning) + h = (struct elf_link_hash_entry *) h->root.u.i.link; + sym_name = h->root.root.string; + if (h->root.type == bfd_link_hash_defined + || h->root.type == bfd_link_hash_defweak) + { + sec = h->root.u.def.section; + if (info->shared + && ((! info->symbolic && h->dynindx != -1) + || (h->elf_link_hash_flags + & ELF_LINK_HASH_DEF_REGULAR) == 0) + && (input_section->flags & SEC_ALLOC) != 0 + && (r_type == R_I370_ADDR31 + || r_type == R_I370_COPY + || r_type == R_I370_ADDR16 + || r_type == R_I370_RELATIVE)) + { + /* In these cases, we don't need the relocation + value. We check specially because in some + obscure cases sec->output_section will be NULL. */ + relocation = 0; + } + else + relocation = (h->root.u.def.value + + sec->output_section->vma + + sec->output_offset); + } + else if (h->root.type == bfd_link_hash_undefweak) + relocation = 0; + else if (info->shared) + relocation = 0; + else + { + (*info->callbacks->undefined_symbol)(info, + h->root.root.string, + input_bfd, + input_section, + rel->r_offset); + ret = false; + continue; + } + } + + switch ((int)r_type) + { + default: + (*_bfd_error_handler) ("%s: unknown relocation type %d for symbol %s", + bfd_get_filename (input_bfd), + (int)r_type, sym_name); + + bfd_set_error (bfd_error_bad_value); + ret = false; + continue; + + /* Relocations that may need to be propagated if this is a shared + object. */ + case (int)R_I370_REL31: + /* If these relocations are not to a named symbol, they can be + handled right here, no need to bother the dynamic linker. */ + if (h == NULL + || strcmp (h->root.root.string, "_GLOBAL_OFFSET_TABLE_") == 0) + break; + /* fall through */ + + /* Relocations that always need to be propagated if this is a shared + object. */ + case (int)R_I370_NONE: + case (int)R_I370_ADDR31: + case (int)R_I370_ADDR16: + if (info->shared) + { + Elf_Internal_Rela outrel; + boolean skip; + +#ifdef DEBUG + fprintf (stderr, + "i370_elf_relocate_section needs to create relocation for %s\n", + (h && h->root.root.string) ? h->root.root.string : "<unknown>"); +#endif + + /* When generating a shared object, these relocations + are copied into the output file to be resolved at run + time. */ + + if (sreloc == NULL) + { + const char *name; + + name = (bfd_elf_string_from_elf_section + (input_bfd, + elf_elfheader (input_bfd)->e_shstrndx, + elf_section_data (input_section)->rel_hdr.sh_name)); + if (name == NULL) + return false; + + BFD_ASSERT (strncmp (name, ".rela", 5) == 0 + && strcmp (bfd_get_section_name (input_bfd, + input_section), + name + 5) == 0); + + sreloc = bfd_get_section_by_name (dynobj, name); + BFD_ASSERT (sreloc != NULL); + } + + skip = false; + + if (elf_section_data (input_section)->stab_info == NULL) + outrel.r_offset = rel->r_offset; + else + { + bfd_vma off; + + off = (_bfd_stab_section_offset + (output_bfd, &elf_hash_table (info)->stab_info, + input_section, + &elf_section_data (input_section)->stab_info, + rel->r_offset)); + if (off == (bfd_vma) -1) + skip = true; + outrel.r_offset = off; + } + + outrel.r_offset += (input_section->output_section->vma + + input_section->output_offset); + + if (skip) + memset (&outrel, 0, sizeof outrel); + /* h->dynindx may be -1 if this symbol was marked to + become local. */ + else if (h != NULL + && ((! info->symbolic && h->dynindx != -1) + || (h->elf_link_hash_flags + & ELF_LINK_HASH_DEF_REGULAR) == 0)) + { + BFD_ASSERT (h->dynindx != -1); + outrel.r_info = ELF32_R_INFO (h->dynindx, r_type); + outrel.r_addend = rel->r_addend; + } + else + { + if (r_type == R_I370_ADDR31) + { + outrel.r_info = ELF32_R_INFO (0, R_I370_RELATIVE); + outrel.r_addend = relocation + rel->r_addend; + } + else + { + long indx; + + if (h == NULL) + sec = local_sections[r_symndx]; + else + { + BFD_ASSERT (h->root.type == bfd_link_hash_defined + || (h->root.type + == bfd_link_hash_defweak)); + sec = h->root.u.def.section; + } + if (sec != NULL && bfd_is_abs_section (sec)) + indx = 0; + else if (sec == NULL || sec->owner == NULL) + { + bfd_set_error (bfd_error_bad_value); + return false; + } + else + { + asection *osec; + + osec = sec->output_section; + indx = elf_section_data (osec)->dynindx; + BFD_ASSERT(indx > 0); +#ifdef DEBUG + if (indx <= 0) + { + printf("indx=%d section=%s flags=%08x name=%s\n", + indx, osec->name, osec->flags, + h->root.root.string); + } +#endif + } + + outrel.r_info = ELF32_R_INFO (indx, r_type); + outrel.r_addend = relocation + rel->r_addend; + } + } + + bfd_elf32_swap_reloca_out (output_bfd, &outrel, + (((Elf32_External_Rela *) + sreloc->contents) + + sreloc->reloc_count)); + ++sreloc->reloc_count; + + /* This reloc will be computed at runtime, so there's no + need to do anything now, unless this is a RELATIVE + reloc in an unallocated section. */ + if (skip + || (input_section->flags & SEC_ALLOC) != 0 + || ELF32_R_TYPE (outrel.r_info) != R_I370_RELATIVE) + continue; + } + break; + + case (int)R_I370_COPY: + case (int)R_I370_RELATIVE: + (*_bfd_error_handler) ("%s: Relocation %s is not yet supported for symbol %s.", + bfd_get_filename (input_bfd), + i370_elf_howto_table[ (int)r_type ]->name, + sym_name); + + bfd_set_error (bfd_error_invalid_operation); + ret = false; + continue; + } + + +#ifdef DEBUG + fprintf (stderr, "\ttype = %s (%d), name = %s, symbol index = %ld, offset = %ld, addend = %ld\n", + howto->name, + (int)r_type, + sym_name, + r_symndx, + (long)offset, + (long)addend); +#endif + + r = _bfd_final_link_relocate (howto, + input_bfd, + input_section, + contents, + offset, + relocation, + addend); + + if (r != bfd_reloc_ok) + { + ret = false; + switch (r) + { + default: + break; + + case bfd_reloc_overflow: + { + const char *name; + + if (h != NULL) + name = h->root.root.string; + else + { + name = bfd_elf_string_from_elf_section (input_bfd, + symtab_hdr->sh_link, + sym->st_name); + if (name == NULL) + break; + + if (*name == '\0') + name = bfd_section_name (input_bfd, sec); + } + + (*info->callbacks->reloc_overflow)(info, + name, + howto->name, + (bfd_vma) 0, + input_bfd, + input_section, + offset); + } + break; + + } + } + } + + +#ifdef DEBUG + fprintf (stderr, "\n"); +#endif + + return ret; +} + +static void +i370_elf_post_process_headers (abfd, link_info) + bfd * abfd; + struct bfd_link_info * link_info ATTRIBUTE_UNUSED; +{ + Elf_Internal_Ehdr * i_ehdrp; /* Elf file header, internal form */ + + i_ehdrp = elf_elfheader (abfd); + i_ehdrp->e_ident[EI_OSABI] = ELFOSABI_LINUX; +} + +#define TARGET_BIG_SYM bfd_elf32_i370_vec +#define TARGET_BIG_NAME "elf32-i370" +#define ELF_ARCH bfd_arch_i370 +#define ELF_MACHINE_CODE EM_S370 +#ifdef EM_I370_OLD +#define ELF_MACHINE_ALT1 EM_I370_OLD +#endif +#define ELF_MAXPAGESIZE 0x1000 +#define elf_info_to_howto i370_elf_info_to_howto + + + +#define elf_backend_plt_not_loaded 1 +#define elf_backend_got_symbol_offset 4 + +#define bfd_elf32_bfd_reloc_type_lookup i370_elf_reloc_type_lookup +#define bfd_elf32_bfd_set_private_flags i370_elf_set_private_flags +#define bfd_elf32_bfd_copy_private_bfd_data i370_elf_copy_private_bfd_data +#define bfd_elf32_bfd_merge_private_bfd_data i370_elf_merge_private_bfd_data +#define elf_backend_relocate_section i370_elf_relocate_section + +/* dynamic loader support is mostly broken; just enough here to be able to + * link glibc's ld.so without errors. + */ +#define elf_backend_create_dynamic_sections i370_elf_create_dynamic_sections +#define elf_backend_size_dynamic_sections i370_elf_size_dynamic_sections +#define elf_backend_finish_dynamic_sections i370_elf_finish_dynamic_sections +#define elf_backend_fake_sections i370_elf_fake_sections +#define elf_backend_section_from_shdr i370_elf_section_from_shdr +#define elf_backend_adjust_dynamic_symbol i370_elf_adjust_dynamic_symbol +#define elf_backend_check_relocs i370_elf_check_relocs + +/* +#define elf_backend_add_symbol_hook i370_elf_add_symbol_hook +#define elf_backend_finish_dynamic_symbol i370_elf_finish_dynamic_symbol +#define elf_backend_additional_program_headers i370_elf_additional_program_headers +#define elf_backend_modify_segment_map i370_elf_modify_segment_map +*/ + +#define elf_backend_post_process_headers i370_elf_post_process_headers + +int i370_noop() +{ + return 1; +} + +/* we need to define these at least as no-ops to link glibc ld.so */ + +#define elf_backend_add_symbol_hook \ + (boolean (*) PARAMS ((bfd *, struct bfd_link_info *, \ + const char *, Elf_Internal_Sym *, \ + asection *))) i370_noop +#define elf_backend_finish_dynamic_symbol \ + (boolean (*) PARAMS ((bfd *, struct bfd_link_info *, \ + struct elf_link_hash_entry *, \ + Elf_Internal_Sym *))) i370_noop +#define elf_backend_additional_program_headers \ + (int (*) PARAMS ((bfd *))) i370_noop +#define elf_backend_modify_segment_map \ + (boolean (*) PARAMS ((bfd *))) i370_noop + +#include "elf32-target.h" diff --git a/bfd/libbfd.h b/bfd/libbfd.h index 26bf7ef..b5163f9 100644 --- a/bfd/libbfd.h +++ b/bfd/libbfd.h @@ -762,6 +762,7 @@ static const char *const bfd_reloc_code_real_names[] = { "@@uninitialized@@", "BFD_RELOC_PPC_EMB_RELST_HA", "BFD_RELOC_PPC_EMB_BIT_FLD", "BFD_RELOC_PPC_EMB_RELSDA", + "BFD_RELOC_I370_D12", "BFD_RELOC_CTOR", "BFD_RELOC_ARM_PCREL_BRANCH", "BFD_RELOC_ARM_IMMEDIATE", diff --git a/bfd/reloc.c b/bfd/reloc.c index 856994b..79d602a 100644 --- a/bfd/reloc.c +++ b/bfd/reloc.c @@ -1,5 +1,5 @@ /* BFD support for handling relocation entries. - Copyright (C) 1990, 91, 92, 93, 94, 95, 96, 97, 98, 1999 + Copyright (C) 1990, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000 Free Software Foundation, Inc. Written by Cygnus Support. @@ -2204,6 +2204,11 @@ ENUMDOC Power(rs6000) and PowerPC relocations. ENUM + BFD_RELOC_I370_D12 +ENUMDOC + IBM 370/390 relocations + +ENUM BFD_RELOC_CTOR ENUMDOC The type of reloc used to build a contructor table - at the moment diff --git a/bfd/targets.c b/bfd/targets.c index c5ec4d4..51c8934 100644 --- a/bfd/targets.c +++ b/bfd/targets.c @@ -1,5 +1,5 @@ /* Generic target-file-type support for the BFD library. - Copyright 1990, 91, 92, 93, 94, 95, 96, 97, 98, 1999 + Copyright 1990, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000 Free Software Foundation, Inc. Written by Cygnus Support. @@ -518,6 +518,7 @@ extern const bfd_target bfd_elf64_bigmips_vec; extern const bfd_target bfd_elf32_d10v_vec; extern const bfd_target bfd_elf32_d30v_vec; extern const bfd_target bfd_elf32_hppa_vec; +extern const bfd_target bfd_elf32_i370_vec; extern const bfd_target bfd_elf32_i386_vec; extern const bfd_target bfd_elf32_i860_vec; extern const bfd_target bfd_elf32_i960_vec; @@ -697,6 +698,7 @@ const bfd_target * const bfd_target_vector[] = { #if 0 &bfd_elf32_hppa_vec, #endif + &bfd_elf32_i370_vec, &bfd_elf32_i386_vec, &bfd_elf32_i860_vec, &bfd_elf32_i960_vec, |