From 0bdf06278f28c8cfe60c0ac7ef47e4ba9defbe2e Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Tue, 2 Apr 2019 08:31:14 +0100 Subject: [PATCH] isl: rename all.{c,h} to all_headers.{c,h} This change is a workaround of gcc bug https://gcc.gnu.org/PR89896: isl build fails on LDFLAGS=-flto=2: $ ./configure CFLAGS=-flto=2 LDFLAGS=-flto=2 ... configure:3856: gcc -flto=2 -flto=2 conftest.c >&5 cc: error trying to exec '/usr/libexec/gcc/x86_64-pc-linux-gnu/8.3.0/collect2': execv: Argument list too long make[7]: *** [: all] Error 1 Here all.c gives rise to an implicit 'all.c' -> 'all' rule generated by -flto=N. The workaround is to rename 'all.c' to 'all_headers.c'. Reported-by: Fabio Coatti Bug: https://bugs.gentoo.org/682018 Bug: https://gcc.gnu.org/PR89896 Signed-off-by: Sergei Trofimovich --- Makefile.am | 16 ++++++++-------- all.c | 1 - all_headers.c | 1 + all.h => all_headers.h | 0 4 files changed, 9 insertions(+), 9 deletions(-) delete mode 100644 all.c create mode 100644 all_headers.c rename all.h => all_headers.h (100%) diff --git a/Makefile.am b/Makefile.am index d1c9b2ec..e7e9c1f9 100644 --- a/Makefile.am +++ b/Makefile.am @@ -317,7 +317,7 @@ isl_test_cpp_checked_conversion_LDADD = libisl.la @MP_LIBS@ # dummy library that captures the dependencies on all headers # that are relevant for the bindings noinst_LIBRARIES = libdep.a -libdep_a_SOURCES = all.c +libdep_a_SOURCES = all_headers.c if HAVE_CLANG interface/isldlname.py: libisl.la @@ -326,27 +326,27 @@ interface/isl.py: interface/extract_interface libdep.a python/isl.py.top \ interface/isldlname.py (cat interface/isldlname.py $(srcdir)/python/isl.py.top && \ interface/extract_interface$(EXEEXT) --language=python \ - $(includes) $(srcdir)/all.h) \ + $(includes) $(srcdir)/all_headers.h) \ > $@ || (rm $@ && false) include/isl/cpp.h: interface/extract_interface libdep.a \ cpp/cpp.h.top cpp/cpp.h.pre cpp/cpp.h.bot $(MKDIR_P) "include/isl/cpp" && \ - (cat $(srcdir)/cpp/cpp.h.top $(srcdir)/all.h \ + (cat $(srcdir)/cpp/cpp.h.top $(srcdir)/all_headers.h \ $(srcdir)/cpp/cpp.h.pre && \ interface/extract_interface$(EXEEXT) --language=cpp \ - $(includes) $(srcdir)/all.h && \ + $(includes) $(srcdir)/all_headers.h && \ cat $(srcdir)/cpp/cpp.h.bot) \ > $@ || (rm $@ && false) include/isl/cpp-checked.h: interface/extract_interface libdep.a \ cpp/cpp-checked.h.top \ cpp/cpp-checked.h.pre cpp/cpp-checked.h.bot - (cat $(srcdir)/cpp/cpp-checked.h.top $(srcdir)/all.h \ + (cat $(srcdir)/cpp/cpp-checked.h.top $(srcdir)/all_headers.h \ $(srcdir)/cpp/cpp-checked.h.pre && \ interface/extract_interface$(EXEEXT) \ --language=cpp-checked \ - $(includes) $(srcdir)/all.h && \ + $(includes) $(srcdir)/all_headers.h && \ cat $(srcdir)/cpp/cpp-checked.h.bot) \ > $@ || (rm $@ && false) @@ -356,7 +356,7 @@ include/isl/cpp-checked-conversion.h: interface/extract_interface libdep.a \ (cat $(srcdir)/cpp/cpp-checked-conversion.h.top && \ interface/extract_interface$(EXEEXT) \ --language=cpp-checked-conversion \ - $(includes) $(srcdir)/all.h && \ + $(includes) $(srcdir)/all_headers.h && \ cat $(srcdir)/cpp/cpp-checked-conversion.h.bot) \ > $@ || (rm $@ && false) endif @@ -526,7 +526,7 @@ EXTRA_DIST = \ imath/imath.h \ imath/imrat.c \ imath/imrat.h \ - all.h \ + all_headers.h \ cpp \ python \ isl_test_cpp-generic.cc \ diff --git a/all.c b/all.c deleted file mode 100644 index 3344a3cb..00000000 --- a/all.c +++ /dev/null @@ -1 +0,0 @@ -#include "all.h" diff --git a/all_headers.c b/all_headers.c new file mode 100644 index 00000000..44df0044 --- /dev/null +++ b/all_headers.c @@ -0,0 +1 @@ +#include "all_headers.h" diff --git a/all.h b/all_headers.h similarity index 100% rename from all.h rename to all_headers.h -- 2.21.0