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: [PATCH] Fix fortran install rule


Andreas Schwab wrote:
> The fortran install rule for the gfortran frontend hasn't been updated
> since program_transform_cross_name was removed.  This patch makes it agree
> with current practice, which also makes sure that a cross compiler is
> installed as $(bindir)/$(target_alias)-gfortran instead of
> $(bindir)/gfortran.

Can a build maintainer please review this?

Thanks,
- Tobi

> Tested natively on ia64-suse-linux and as cross on powerpc-suse-linux.
> 
> Andreas.
> 
> 2005-07-25  Andreas Schwab  <schwab@suse.de>
> 
> 	* Make-lang.in (GFORTRAN_TARGET_INSTALL_NAME): Define.
> 	(GFORTRAN_CROSS_NAME): Delete.
> 	(f95.install-common): No longer use GFORTRAN_CROSS_NAME.
> 
> Index: gcc/fortran/Make-lang.in
> ===================================================================
> RCS file: /cvs/gcc/gcc/gcc/fortran/Make-lang.in,v
> retrieving revision 1.20
> diff -u -a -p -u -p -a -r1.20 gcc/fortran/Make-lang.in
> --- gcc/fortran/Make-lang.in	13 Jul 2005 13:33:31 -0000	1.20
> +++ gcc/fortran/Make-lang.in	25 Jul 2005 20:53:08 -0000
> @@ -42,9 +42,7 @@
>  
>  # Actual name to use when installing a native compiler.
>  GFORTRAN_INSTALL_NAME := $(shell echo gfortran|sed '$(program_transform_name)')
> -
> -# Actual name to use when installing a cross-compiler.
> -GFORTRAN_CROSS_NAME := $(shell echo gfortran|sed '$(program_transform_cross_name)')
> +GFORTRAN_TARGET_INSTALL_NAME := $(target_noncanonical)-$(shell echo gfortran|sed '$(program_transform_name)')
>  
>  #^L
>  
> @@ -188,18 +186,15 @@ f95.install-normal:
>  # and also as either gfortran (if native) or $(tooldir)/bin/gfortran.
>  f95.install-common: installdirs
>  	-if [ -f f951$(exeext) ] ; then \
> +	  rm -f $(DESTDIR)$(bindir)/$(GFORTRAN_INSTALL_NAME)$(exeext); \
> +	  $(INSTALL_PROGRAM) gfortran$(exeext) $(DESTDIR)$(bindir)/$(GFORTRAN_INSTALL_NAME)$(exeext); \
> +	  chmod a+x $(DESTDIR)$(bindir)/$(GFORTRAN_INSTALL_NAME)$(exeext); \
>  	  if [ -f gfortran-cross$(exeext) ] ; then \
> -	    rm -f $(DESTDIR)$(bindir)/$(GFORTRAN_CROSS_NAME)$(exeext); \
> -	    $(INSTALL_PROGRAM) gfortran-cross$(exeext) $(DESTDIR)$(bindir)/$(GFORTRAN_CROSS_NAME)$(exeext); \
> -	    chmod a+x $(DESTDIR)$(bindir)/$(GFORTRAN_CROSS_NAME)$(exeext); \
>  	    if [ -d $(DESTDIR)$(gcc_tooldir)/bin/. ] ; then \
>  	      rm -f $(DESTDIR)$(gcc_tooldir)/bin/gfortran$(exeext); \
>  	      $(INSTALL_PROGRAM) gfortran-cross$(exeext) $(DESTDIR)$(gcc_tooldir)/bin/gfortran$(exeext); \
>  	    else true; fi; \
>  	  else \
> -	    rm -f $(DESTDIR)$(bindir)/$(GFORTRAN_INSTALL_NAME)$(exeext); \
> -	    $(INSTALL_PROGRAM) gfortran$(exeext) $(DESTDIR)$(bindir)/$(GFORTRAN_INSTALL_NAME)$(exeext); \
> -	    chmod a+x $(DESTDIR)$(bindir)/$(GFORTRAN_INSTALL_NAME)$(exeext); \
>  	    rm -f $(DESTDIR)$(bindir)/$(GFORTRAN_TARGET_INSTALL_NAME)$(exeext); \
>  	    $(LN) $(DESTDIR)$(bindir)/$(GFORTRAN_INSTALL_NAME)$(exeext) $(DESTDIR)$(bindir)/$(GFORTRAN_TARGET_INSTALL_NAME)$(exeext); \
>  	  fi ; \
> 


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