This is the mail archive of the gcc-bugs@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]

[Bug libfortran/87856] New: Use subdir-objects in libgfortran automake


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87856

            Bug ID: 87856
           Summary: Use subdir-objects in libgfortran automake
           Product: gcc
           Version: 9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libfortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: jb at gcc dot gnu.org
  Target Milestone: ---

Following the recent upgrade to autoconf 2.69 and automake 1.15.1, we should
switch libgfortran to use the "subdir-objects" option for automake. However,
the patch

diff --git a/libgfortran/configure.ac b/libgfortran/configure.ac
index 76007d38f6f..5f18834bacc 100644
--- a/libgfortran/configure.ac
+++ b/libgfortran/configure.ac
@@ -57,7 +57,7 @@ AC_SUBST(target_alias)

 # Sets up automake.  Must come after AC_CANONICAL_SYSTEM.  Each of the
 # following is magically included in AUTOMAKE_OPTIONS in each Makefile.am.
-#  1.9.6:  minimum required version
+#  subdir-objects:  Put objects in subdirs per source path.
 #  no-define:  PACKAGE and VERSION will not be #define'd in config.h (a bunch
 #              of other PACKAGE_* variables will, however, and there's nothing
 #              we can do about that; they come from AC_INIT).
@@ -66,7 +66,7 @@ AC_SUBST(target_alias)
 #  no-dist:  we don't want 'dist' and related rules.
 #  -Wall:  turns on all automake warnings...
 #  -Wno-portability:  ...except this one, since GNU make is required.
-AM_INIT_AUTOMAKE([1.9.6 no-define foreign no-dist -Wall -Wno-portability])
+AM_INIT_AUTOMAKE([subdir-objects no-define foreign no-dist -Wall
-Wno-portability])

 AM_MAINTAINER_MODE
 AM_ENABLE_MULTILIB(, ..)


and then running autoreconf, and trying to build libgfortran results on lots of
failures like:

Makefile:3910: ../../../trunk-git/libgfortran/generated/.deps/all_l1.Plo: No
such file or directory         
Makefile:3911: ../../../trunk-git/libgfortran/generated/.deps/all_l16.Plo: No
such file or directory      
Makefile:3912: ../../../trunk-git/libgfortran/generated/.deps/all_l2.Plo: No
such file or directory        
...

Per
https://stackoverflow.com/questions/21609580/autotools-build-fails-due-to-subdir-objects-option-in-am-init-automake
this is likely due to the paths to the generated objects in libgfortran being
specified relative to $(srcdir) in Makefile.am, like

i_all_c= \
$(srcdir)/generated/all_l1.c \
$(srcdir)/generated/all_l2.c \
...


However, removing the $(srcdir) would likely break regenerating these files
from the M4 sources, since they would then be regenerated in the build tree,
and not the source tree.

So some rethinking of the libgfortran build is most likely in order.

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