This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Enable -fomit-frame-pointer on i386


> Jan Hubicka writes:
>  > Perhaps we can simply replace use of backtrace() in libjava by
>  > the Jakub's unwind based implementation to break the dependency on
>  > targets where unwind info shall be available (ia-64/x86-64/i386/s390 at
>  > least)
> 
> That's a good idea.  Bryce is working on such a patch, I believe.
> 
> In the meantime, this is what we do with x86-64 
> 
> in configure.in:
> 
> BACKTRACESPEC=
> case "${host}" in
>  x86_64*-*-linux*)
>     BACKTRACESPEC=-fno-omit-frame-pointer
>     ;;
> esac
> 
> And configure.host:
> 
>   x86_64-*)
> 	CHECKREFSPEC="%{m32:-fcheck-references}"
> 	sysdeps_dir=x86-64
> 	libgcj_flags="${libgcj_flags} -ffloat-store -fno-omit-frame-pointer"
> 
> Andrew.
Does the attached patch look fine then?
I tested it together with patch disabling fomit-frame-pointer by default
and it seems to keep libjava happy.

Honza

2004-02-11  Jan Hubicka  <jh@suse.cz>
	* configure.host: Pass -fno-omit-frame-pointer for i386.
	* configure.in: Likewise.
Index: configure.host
===================================================================
RCS file: /cvs/gcc/gcc/libjava/configure.host,v
retrieving revision 1.55
diff -c -3 -p -r1.55 configure.host
*** configure.host	23 Jan 2004 17:32:12 -0000	1.55
--- configure.host	11 Feb 2004 20:13:26 -0000
*************** case "${host}" in
*** 90,96 ****
  	;;
    i686-*|i586-*|i486-*|i386-*)
  	sysdeps_dir=i386
! 	libgcj_flags="${libgcj_flags} -ffloat-store"
  	libgcj_interpreter=yes
  	libgcj_cxxflags=
  	libgcj_cflags=
--- 90,96 ----
  	;;
    i686-*|i586-*|i486-*|i386-*)
  	sysdeps_dir=i386
! 	libgcj_flags="${libgcj_flags} -ffloat-store -fno-omit-frame-pointer"
  	libgcj_interpreter=yes
  	libgcj_cxxflags=
  	libgcj_cflags=
Index: configure.in
===================================================================
RCS file: /cvs/gcc/gcc/libjava/configure.in,v
retrieving revision 1.181
diff -c -3 -p -r1.181 configure.in
*** configure.in	2 Feb 2004 02:18:33 -0000	1.181
--- configure.in	11 Feb 2004 20:13:27 -0000
*************** fi
*** 1189,1195 ****
  # Define here any compiler flags that you need in order to make backtrace() work.
  BACKTRACESPEC=
  case "${host}" in
!  x86_64*-*-linux*)
      BACKTRACESPEC=-fno-omit-frame-pointer
      ;;
  esac
--- 1189,1195 ----
  # Define here any compiler flags that you need in order to make backtrace() work.
  BACKTRACESPEC=
  case "${host}" in
!  x86_64*-*-linux*|i?86-*)
      BACKTRACESPEC=-fno-omit-frame-pointer
      ;;
  esac


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]