egcs-971016 on BSD/OS 3.0

Shigeya Suzuki shigeya@foretune.co.jp
Sun Oct 19 05:22:00 GMT 1997


Hi, I have tried egcs-971016 on BSD/OS 3.0.

First, the gcc/config/bsd386.h need following minor mod to use with
default 'as'

------------------------------
*** bsd386.h.FCS	Tue Aug 12 00:57:16 1997
--- bsd386.h	Sat Oct 18 08:24:07 1997
***************
*** 16,18 ****
--- 16,21 ----
  
  #undef WCHAR_TYPE_SIZE
  #define WCHAR_TYPE_SIZE 32
+ 
+ #undef ASM_COMMENT_START
+ #define ASM_COMMENT_START "#"
------------------------------ 


Next, I tried my code. I can't catch exception, even simple one. The
following test program illustlates the problem.  I tested same program
on egcs-971016 on Solaris and ran without problem. Thus I know this is 
platform specific problem.

At this moment, I don't have enough time to track down this
problem. (If I have FreeBSD or Linux machine handy, I could try, but
none avaiable at this moment.)

Do you have any idea on this problem?

# I'm not on egcs-bugs or egcs list yet.

Shigeya Suzuki						shigeya@foretune.co.jp
Foretune Co., Ltd.		     http://www.foretune.co.jp/people/shigeya/


------------------------------
#include <iostream.h>

class X {
public:
    X() {};
};

class Y : public X {
public:
    Y() : X() {};
};

main()
{
    cerr << "start" << endl;
    try {
	throw Y();
    }
    catch (Y& y) {
	cerr << "Cought Y\n";
    }

    cerr << "end" << endl;
}
------------------------------

stack trace of core dump show uncaught exception..

(gdb) bt
#0  0x15bb9 in kill ()
#1  0x15b18 in abort ()
#2  0xbf08 in __terminate ()
#3  0xbf12 in __terminate ()
#4  0xc345 in __throw ()
#5  0x1147 in main () at esample.cpp:17


------------------------------

my current gcc/config.status

#! /bin/sh
# Generated automatically by configure.
# Run this file to recreate the current configuration.
# This directory was configured as follows,
# on host pooh.foretune.co.jp:
#
# ./configure  --host=i386-pc-bsdi3.0 --target=i386-pc-bsdi3.0 --prefix=/usr/local/egcs --cache-file=../config.cache
#
# Compiler output produced by configure, useful for debugging
# configure, is in ./config.log if it exists.

ac_cs_usage="Usage: ./config.status [--recheck] [--version] [--help]"
for ac_option
do
  case "$ac_option" in
  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
    echo "running ${CONFIG_SHELL-/bin/sh} ./configure  --host=i386-pc-bsdi3.0 --target=i386-pc-bsdi3.0 --prefix=/usr/local/egcs --cache-file=../config.cache --no-create --no-recursion"
    exec ${CONFIG_SHELL-/bin/sh} ./configure  --host=i386-pc-bsdi3.0 --target=i386-pc-bsdi3.0 --prefix=/usr/local/egcs --cache-file=../config.cache --no-create --no-recursion ;;
  -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
    echo "./config.status generated by autoconf version 2.12.1"
    exit 0 ;;
  -help | --help | --hel | --he | --h)
    echo "$ac_cs_usage"; exit 0 ;;
  *) echo "$ac_cs_usage"; exit 1 ;;
  esac
done

ac_given_srcdir=.

trap 'rm -fr Makefile cp/Makefile   config.h conftest*; exit 1' 1 2 15

# Protect against being on the right side of a sed subst in config.status.
sed 's/%@/@@/; s/@%/@@/; s/%g$/@g/; /@g$/s/[\\&%]/\\&/g;
 s/@@/%@/; s/@@/@%/; s/@g$/%g/' > conftest.subs <<\CEOF
/^[ 	]*VPATH[ 	]*=[^:]*$/d

s%@SHELL@%/bin/sh%g
s%@CFLAGS@%-g -O2%g
s%@CPPFLAGS@%%g
s%@CXXFLAGS@%-g -O2%g
s%@DEFS@%-DHAVE_CONFIG_H%g
s%@LDFLAGS@%%g
s%@LIBS@%%g
s%@exec_prefix@%${prefix}%g
s%@prefix@%/usr/local/egcs%g
s%@program_transform_name@%s,x,x,%g
s%@bindir@%${exec_prefix}/bin%g
s%@sbindir@%${exec_prefix}/sbin%g
s%@libexecdir@%${exec_prefix}/libexec%g
s%@datadir@%${prefix}/share%g
s%@sysconfdir@%${prefix}/etc%g
s%@sharedstatedir@%${prefix}/com%g
s%@localstatedir@%${prefix}/var%g
s%@libdir@%${exec_prefix}/lib%g
s%@includedir@%${prefix}/include%g
s%@oldincludedir@%/usr/include%g
s%@infodir@%${prefix}/info%g
s%@mandir@%${prefix}/man%g
s%@host@%i386-pc-bsdi3.0%g
s%@host_alias@%i386-pc-bsdi3.0%g
s%@host_cpu@%i386%g
s%@host_vendor@%pc%g
s%@host_os@%bsdi3.0%g
s%@target@%i386-pc-bsdi3.0%g
s%@target_alias@%i386-pc-bsdi3.0%g
s%@target_cpu@%i386%g
s%@target_vendor@%pc%g
s%@target_os@%bsdi3.0%g
s%@build@%i386-pc-bsdi3.0%g
s%@build_alias@%i386-pc-bsdi3.0%g
s%@build_cpu@%i386%g
s%@build_vendor@%pc%g
s%@build_os@%bsdi3.0%g
s%@AWK@%gawk%g
s%@LEX@%flex%g
s%@LEXLIB@%-lfl%g
s%@LN@%ln%g
s%@LN_S@%ln -s%g
s%@RANLIB@%ranlib%g
s%@YACC@%bison -y%g
s%@INSTALL@%/usr/bin/install -c%g
s%@INSTALL_PROGRAM@%${INSTALL}%g
s%@INSTALL_DATA@%${INSTALL} -m 644%g
s%@CC@%gcc%g
s%@SET_MAKE@%%g
s%@CPP@%gcc -E%g
s%@manext@%.1%g
s%@objext@%.o%g
s%@inhibit_libc@%%g
s%@sched_prefix@%%g
s%@sched_cflags@%%g
s%@subdirs@% cp f objc%g
s%@all_languages@% c++ f77 objc%g
s%@all_boot_languages@%%g
s%@all_compilers@% cc1plus$(exeext) f771$(exeext) cc1obj$(exeext)%g
s%@all_lang_makefiles@% ./cp/Make-lang.in ./cp/Makefile.in ./f/Make-lang.in ./f/Makefile.in ./objc/Make-lang.in ./objc/Makefile.in%g
s%@all_stagestuff@% g++$(exeext) g++-cross$(exeext) cc1plus$(exeext) g77$(exeext) g77-cross$(exeext) f771$(exeext) libf2c.a %g
s%@all_diff_excludes@% -x cp/parse.c -x cp/parse.h -x "f/g77.info*" %g
s%@all_lib2funcs@% cplib2.txt  %g
s%@all_headers@% $(CXX_EXTRA_HEADERS)  %g
s%@extra_passes@%%g
s%@extra_programs@%%g
s%@extra_parts@%%g
s%@extra_c_objs@%%g
s%@extra_c_flags@%%g
s%@extra_objs@% %g
s%@host_extra_gcc_objs@%%g
s%@extra_headers_list@%%g
s%@dep_host_xmake_file@%%g
s%@dep_tmake_file@%%g
s%@out_file@%i386/i386.c%g
s%@out_object_file@%i386.o%g
s%@md_file@%i386/i386.md%g
s%@tm_file_list@% $(srcdir)/config/i386/bsd386.h%g
s%@build_xm_file_list@% $(srcdir)/config/i386/xm-bsd386.h%g
s%@host_xm_file_list@% $(srcdir)/config/i386/xm-bsd386.h%g
s%@lang_specs_files@% ./cp/lang-specs.h ./f/lang-specs.h%g
s%@lang_options_files@% ./cp/lang-options.h ./f/lang-options.h%g
s%@thread_file@%single%g
s%@version@%egcs-2.90.13%g
s%@local_prefix@%/usr/local%g
s%@gxx_include_dir@%${prefix}/include/g++%g
s%@fixincludes@%fixincludes%g
s%@build_install_headers_dir@%install-headers-tar%g
s%@build_exeext@%%g
s%@float_format@%i64%g
s%@will_use_collect2@%%g
s%@maybe_use_collect2@%%g
s%@cc_set_by_configure@%$(CC)%g
s%@stage_prefix_set_by_configure@%$(STAGE_PREFIX)%g
s%@install@%%g
/@target_overrides@/r Make-target
s%@target_overrides@%%g
/@host_overrides@/r Make-host
s%@host_overrides@%%g
s%@cross_defines@%%g
/@cross_overrides@/r /dev/null
s%@cross_overrides@%%g
/@build_overrides@/r /dev/null
s%@build_overrides@%%g
/@language_fragments@/r Make-lang
s%@language_fragments@%%g
/@language_hooks@/r Make-hooks
s%@language_hooks@%%g

CEOF

# Split the substitutions into bite-sized pieces for seds with
# small command number limits, like on Digital OSF/1 and HP-UX.
ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
ac_file=1 # Number of current file.
ac_beg=1 # First line for current file.
ac_end=$ac_max_sed_cmds # Line after last line for current file.
ac_more_lines=:
ac_sed_cmds=""
while $ac_more_lines; do
  if test $ac_beg -gt 1; then
    sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
  else
    sed "${ac_end}q" conftest.subs > conftest.s$ac_file
  fi
  if test ! -s conftest.s$ac_file; then
    ac_more_lines=false
    rm -f conftest.s$ac_file
  else
    if test -z "$ac_sed_cmds"; then
      ac_sed_cmds="sed -f conftest.s$ac_file"
    else
      ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
    fi
    ac_file=`expr $ac_file + 1`
    ac_beg=$ac_end
    ac_end=`expr $ac_end + $ac_max_sed_cmds`
  fi
done
if test -z "$ac_sed_cmds"; then
  ac_sed_cmds=cat
fi

CONFIG_FILES=${CONFIG_FILES-"Makefile cp/Makefile  "}
for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
  case "$ac_file" in
  *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
  *) ac_file_in="${ac_file}.in" ;;
  esac

  # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.

  # Remove last slash and all that follows it.  Not all systems have dirname.
  ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
  if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
    # The file is in a subdirectory.
    test ! -d "$ac_dir" && mkdir "$ac_dir"
    ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
    # A "../" for each directory in $ac_dir_suffix.
    ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
  else
    ac_dir_suffix= ac_dots=
  fi

  case "$ac_given_srcdir" in
  .)  srcdir=.
      if test -z "$ac_dots"; then top_srcdir=.
      else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
  /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
  *) # Relative path.
    srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
    top_srcdir="$ac_dots$ac_given_srcdir" ;;
  esac


  echo creating "$ac_file"
  rm -f "$ac_file"
  configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
  case "$ac_file" in
  *Makefile*) ac_comsub="1i\\
# $configure_input" ;;
  *) ac_comsub= ;;
  esac

  ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
  sed -e "$ac_comsub
s%@configure_input@%$configure_input%g
s%@srcdir@%$srcdir%g
s%@top_srcdir@%$top_srcdir%g
" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
fi; done
rm -f conftest.s*

# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
# NAME is the cpp macro being defined and VALUE is the value it is being given.
#
# ac_d sets the value in "#define NAME VALUE" lines.
ac_dA='s%^\([ 	]*\)#\([ 	]*define[ 	][ 	]*\)'
ac_dB='\([ 	][ 	]*\)[^ 	]*%\1#\2'
ac_dC='\3'
ac_dD='%g'
# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
ac_uA='s%^\([ 	]*\)#\([ 	]*\)undef\([ 	][ 	]*\)'
ac_uB='\([ 	]\)%\1#\2define\3'
ac_uC=' '
ac_uD='\4%g'
# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
ac_eA='s%^\([ 	]*\)#\([ 	]*\)undef\([ 	][ 	]*\)'
ac_eB='$%\1#\2define\3'
ac_eC=' '
ac_eD='%g'

if test "${CONFIG_HEADERS+set}" != set; then
  CONFIG_HEADERS="config.h:config.in"
fi
for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
  case "$ac_file" in
  *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
  *) ac_file_in="${ac_file}.in" ;;
  esac

  echo creating $ac_file

  rm -f conftest.frag conftest.in conftest.out
  ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
  cat $ac_file_inputs > conftest.in

  cat > conftest.frag <<CEOF
${ac_dA}HAVE_STDDEF_H${ac_dB}HAVE_STDDEF_H${ac_dC}1${ac_dD}
${ac_uA}HAVE_STDDEF_H${ac_uB}HAVE_STDDEF_H${ac_uC}1${ac_uD}
${ac_eA}HAVE_STDDEF_H${ac_eB}HAVE_STDDEF_H${ac_eC}1${ac_eD}
${ac_dA}HAVE_STRING_H${ac_dB}HAVE_STRING_H${ac_dC}1${ac_dD}
${ac_uA}HAVE_STRING_H${ac_uB}HAVE_STRING_H${ac_uC}1${ac_uD}
${ac_eA}HAVE_STRING_H${ac_eB}HAVE_STRING_H${ac_eC}1${ac_eD}
${ac_dA}HAVE_STRINGS_H${ac_dB}HAVE_STRINGS_H${ac_dC}1${ac_dD}
${ac_uA}HAVE_STRINGS_H${ac_uB}HAVE_STRINGS_H${ac_uC}1${ac_uD}
${ac_eA}HAVE_STRINGS_H${ac_eB}HAVE_STRINGS_H${ac_eC}1${ac_eD}
${ac_dA}HAVE_STDLIB_H${ac_dB}HAVE_STDLIB_H${ac_dC}1${ac_dD}
${ac_uA}HAVE_STDLIB_H${ac_uB}HAVE_STDLIB_H${ac_uC}1${ac_uD}
${ac_eA}HAVE_STDLIB_H${ac_eB}HAVE_STDLIB_H${ac_eC}1${ac_eD}
CEOF
  sed -f conftest.frag conftest.in > conftest.out
  rm -f conftest.in
  mv conftest.out conftest.in

  cat > conftest.frag <<CEOF
${ac_dA}HAVE_TIME_H${ac_dB}HAVE_TIME_H${ac_dC}1${ac_dD}
${ac_uA}HAVE_TIME_H${ac_uB}HAVE_TIME_H${ac_uC}1${ac_uD}
${ac_eA}HAVE_TIME_H${ac_eB}HAVE_TIME_H${ac_eC}1${ac_eD}
${ac_dA}HAVE_UNISTD_H${ac_dB}HAVE_UNISTD_H${ac_dC}1${ac_dD}
${ac_uA}HAVE_UNISTD_H${ac_uB}HAVE_UNISTD_H${ac_uC}1${ac_uD}
${ac_eA}HAVE_UNISTD_H${ac_eB}HAVE_UNISTD_H${ac_eC}1${ac_eD}
${ac_dA}HAVE_VARARGS_H${ac_dB}HAVE_VARARGS_H${ac_dC}1${ac_dD}
${ac_uA}HAVE_VARARGS_H${ac_uB}HAVE_VARARGS_H${ac_uC}1${ac_uD}
${ac_eA}HAVE_VARARGS_H${ac_eB}HAVE_VARARGS_H${ac_eC}1${ac_eD}
${ac_dA}SYS_SIGLIST_DECLARED${ac_dB}SYS_SIGLIST_DECLARED${ac_dC}1${ac_dD}
${ac_uA}SYS_SIGLIST_DECLARED${ac_uB}SYS_SIGLIST_DECLARED${ac_uC}1${ac_uD}
${ac_eA}SYS_SIGLIST_DECLARED${ac_eB}SYS_SIGLIST_DECLARED${ac_eC}1${ac_eD}
CEOF
  sed -f conftest.frag conftest.in > conftest.out
  rm -f conftest.in
  mv conftest.out conftest.in

  cat > conftest.frag <<CEOF
${ac_dA}HAVE_STRERROR${ac_dB}HAVE_STRERROR${ac_dC}1${ac_dD}
${ac_uA}HAVE_STRERROR${ac_uB}HAVE_STRERROR${ac_uC}1${ac_uD}
${ac_eA}HAVE_STRERROR${ac_eB}HAVE_STRERROR${ac_eC}1${ac_eD}
${ac_dA}HAVE_STRTOUL${ac_dB}HAVE_STRTOUL${ac_dC}1${ac_dD}
${ac_uA}HAVE_STRTOUL${ac_uB}HAVE_STRTOUL${ac_uC}1${ac_uD}
${ac_eA}HAVE_STRTOUL${ac_eB}HAVE_STRTOUL${ac_eC}1${ac_eD}
${ac_dA}HAVE_BSEARCH${ac_dB}HAVE_BSEARCH${ac_dC}1${ac_dD}
${ac_uA}HAVE_BSEARCH${ac_uB}HAVE_BSEARCH${ac_uC}1${ac_uD}
${ac_eA}HAVE_BSEARCH${ac_eB}HAVE_BSEARCH${ac_eC}1${ac_eD}
s%^[ 	]*#[ 	]*undef[ 	][ 	]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
CEOF
  sed -f conftest.frag conftest.in > conftest.out
  rm -f conftest.in
  mv conftest.out conftest.in

  rm -f conftest.frag conftest.h
  echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
  cat conftest.in >> conftest.h
  rm -f conftest.in
  if cmp -s $ac_file conftest.h 2>/dev/null; then
    echo "$ac_file is unchanged"
    rm -f conftest.h
  else
    # Remove last slash and all that follows it.  Not all systems have dirname.
      ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
      if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
      # The file is in a subdirectory.
      test ! -d "$ac_dir" && mkdir "$ac_dir"
    fi
    rm -f $ac_file
    mv conftest.h $ac_file
  fi
fi; done


host='i386-pc-bsdi3.0'
build='i386-pc-bsdi3.0'
target='i386-pc-bsdi3.0'
target_alias='i386-pc-bsdi3.0'
srcdir='.'
subdirs=' cp f objc'
oldstyle_subdirs=' f objc'
symbolic_link='ln -s'
program_transform_set=''
program_transform_name='s,x,x,'
dep_host_xmake_file=''
host_xmake_file='i386/x-i386'
dep_tmake_file=''
tmake_file='i386/t-i386'
thread_file='single'
version='egcs-2.90.13'
local_prefix='/usr/local'
build_install_headers_dir='install-headers-tar'
build_exeext=''
out_file='i386/i386.c'
gdb_needs_out_file_path=''
SET_MAKE=''
target_list='all.build all.cross start.encap rest.encap 	info dvi 	install-normal install-common install-info install-man 	uninstall distdir 	mostlyclean clean distclean extraclean maintainer-clean 	stage1 stage2 stage3 stage4'
target_overrides='Make-target'
host_overrides='Make-host'
cross_defines=''
cross_overrides='/dev/null'
build_overrides='/dev/null'


. $srcdir/configure.lang
case x$CONFIG_HEADERS in
xconfig.h:config.in)
echo > cstamp-h ;;
esac
# If the host supports symlinks, point stage[1234] at ../stage[1234] so
# bootstrapping and the installation procedure can still use
# CC="stage1/xgcc -Bstage1/".  If the host doesn't support symlinks,
# FLAGS_TO_PASS has been modified to solve the problem there.
# This is virtually a duplicate of what happens in configure.lang; we do
# an extra check to make sure this only happens if ln -s can be used.
if [ "$symbolic_link" = "ln -s" ]; then
 for d in .. ${subdirs} ; do
   if [ $d != .. ]; then
	STARTDIR=`pwd`
	cd $d
	for t in stage1 stage2 stage3 stage4 include
	do
		rm -f $t
		$symbolic_link ../$t $t 2>/dev/null
	done
	cd $STARTDIR
   fi
 done
else true ; fi

exit 0



More information about the Gcc-bugs mailing list