From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2153) id B4F383858C39; Fri, 14 Jan 2022 11:19:57 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B4F383858C39 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" From: Jakub Jelinek To: gcc-cvs@gcc.gnu.org Subject: [gcc r12-6580] libgfortran: Partly revert my r12-6498 change to fix Solaris build [PR104006] X-Act-Checkin: gcc X-Git-Author: Jakub Jelinek X-Git-Refname: refs/heads/master X-Git-Oldrev: cbf06187d5f246634272e3d2892501563bff3d99 X-Git-Newrev: ac6a1181209b756882f89cdba6128565fad1a56e Message-Id: <20220114111957.B4F383858C39@sourceware.org> Date: Fri, 14 Jan 2022 11:19:57 +0000 (GMT) X-BeenThere: gcc-cvs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Jan 2022 11:19:57 -0000 https://gcc.gnu.org/g:ac6a1181209b756882f89cdba6128565fad1a56e commit r12-6580-gac6a1181209b756882f89cdba6128565fad1a56e Author: Jakub Jelinek Date: Fri Jan 14 12:11:00 2022 +0100 libgfortran: Partly revert my r12-6498 change to fix Solaris build [PR104006] In r12-6498 I've added $(version_dep) to BUILT_SOURCES, previously version_dep on Linux used to be a file in $(srcdir), but with my changes it is a generated file in the object directory (preprocessed version of the $(srcdir) file) and I thought generated files belong to BUILT_SOURCES so that they are cleaned up etc. For Linux that is fine, but it broke parallel builds on Solaris. BUILT_SOURCES is a special variable for automake where automake ensures that for make all, make check and make install all those $(BUILT_SOURCES) are generated before actually starting building in parallel the various object files. That way we can avoid hacks like: $(patsubst %.F90,%.lo,$(notdir $(filter %.F90,$(prereq_SRC)))): kinds.inc c99_protos.inc $(patsubst %.c,%.lo,$(notdir $(filter %.c,$(prereq_SRC)))): kinds.h $(patsubst %.f90,%.lo,selected_real_kind.f90): selected_real_kind.inc $(patsubst %.f90,%.lo,selected_int_kind.f90): selected_int_kind.inc $(patsubst %.F90,%.lo,ieee_exceptions.F90): fpu-target.inc $(patsubst %.F90,%.lo,ieee_arithmetic.F90): fpu-target.inc ieee_exceptions.lo $(patsubst %.c,%.lo,fpu.c): fpu-target.h which makes those dependencies explicit but hides it from automake, so that it doesn't throw away its rules for those object files. On Solaris, $(version_dep) contains gfortran.ver and gfortran.ver-sun. gfortran.ver is like on Linux, it can be in $(BUILT_SOURCES), but unfortunately gfortran.ver-sun depends on all the object files being compiled already, so if gfortran.ver-sun appears in $(BUILT_SOURCES), the BUILT_SOURCES function of ensuring the generated files are generated before building object files is gone, almost everything is built before all-am is entered and there are no explicit dependencies that e.g. *.F90 files depend on kinds.inc etc. So, this change reverts that mistake and instead adds $(version_dep) to what is removed during make clean (clean-local in particular). 2022-01-14 Jakub Jelinek PR libfortran/104006 * Makefile.am (BUILT_SOURCES): Don't include $(version_dep). (clean-local): Remove $(version_dep). * Makefile.in: Regenerated. Diff: --- libgfortran/Makefile.am | 4 ++-- libgfortran/Makefile.in | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/libgfortran/Makefile.am b/libgfortran/Makefile.am index 43f91d5bbf5..5ce0cd7cd05 100644 --- a/libgfortran/Makefile.am +++ b/libgfortran/Makefile.am @@ -1118,7 +1118,7 @@ ieee_arithmetic.mod: ieee_arithmetic.lo : BUILT_SOURCES=$(gfor_built_src) $(gfor_built_specific_src) \ - $(gfor_built_specific2_src) $(gfor_misc_specifics) $(version_dep) + $(gfor_built_specific2_src) $(gfor_misc_specifics) prereq_SRC = $(gfor_src) $(gfor_built_src) $(gfor_io_src) \ $(gfor_helper_src) $(gfor_ieee_src) $(gfor_io_headers) $(gfor_specific_src) @@ -1356,7 +1356,7 @@ $(gfor_misc_specifics): m4/misc_specifics.m4 m4/head.m4 endif clean-local: - -rm -rf include + -rm -rf include $(version_dep) EXTRA_DIST = $(m4_files) diff --git a/libgfortran/Makefile.in b/libgfortran/Makefile.in index fc44ab53a19..7ac6bfba657 100644 --- a/libgfortran/Makefile.in +++ b/libgfortran/Makefile.in @@ -1652,7 +1652,7 @@ intrinsics/random_init.f90 BUILT_SOURCES = $(gfor_built_src) $(gfor_built_specific_src) \ $(gfor_built_specific2_src) $(gfor_misc_specifics) \ - $(version_dep) $(am__append_7) + $(am__append_7) prereq_SRC = $(gfor_src) $(gfor_built_src) $(gfor_io_src) \ $(gfor_helper_src) $(gfor_ieee_src) $(gfor_io_headers) $(gfor_specific_src) @@ -7857,7 +7857,7 @@ include/ISO_Fortran_binding.h: $(srcdir)/ISO_Fortran_binding.h @MAINTAINER_MODE_TRUE@ $(M4) -Dfile=$@ -I$(srcdir)/m4 misc_specifics.m4 > $@ clean-local: - -rm -rf include + -rm -rf include $(version_dep) # target overrides -include $(tmake_file)