This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix fortran install rule
- From: Tobias Schlüter <tobias dot schlueter at physik dot uni-muenchen dot de>
- To: Andreas Schwab <schwab at suse dot de>
- Cc: fortran at gcc dot gnu dot org, gcc-patches at gcc dot gnu dot org
- Date: Thu, 08 Sep 2005 22:03:46 +0200
- Subject: Re: [PATCH] Fix fortran install rule
- References: <jer7dmmtoo.fsf@sykes.suse.de>
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 ; \
>