Просмотр исходного кода

Fix parallel build issues in LTO mode

In LTO mode is used -flto=jobserver to facilitate slow LTO process
on SMP systems, but this requires jobserver and unfortunately
automake doesn't generate rules properly, so we need to patch them.

This solution is somewhat ugly, but works fine and the best we can
do.
Andrew Savchenko лет назад: 3
Родитель
Сommit
b655d0203c
2 измененных файлов с 5 добавлено и 1 удалено
  1. 1 1
      Makefile.am
  2. 4 0
      configure.ac

+ 1 - 1
Makefile.am

@@ -96,7 +96,7 @@ compilerflags.h: gencompilerflags
 	./gencompilerflags > compilerflags.h
 
 gencompilerflags:
-	$(CC) $(gencompilerflags_CFLAGS) gencompilerflags.c -o gencompilerflags
+	+$(CC) $(gencompilerflags_CFLAGS) gencompilerflags.c -o gencompilerflags
 
 dist_man_MANS = man/man1/clsync.1
 endif

+ 4 - 0
configure.ac

@@ -538,3 +538,7 @@ AC_SUBST(PACKAGE_URL)
 
 AC_CONFIG_FILES([Makefile examples/Makefile pkgconfig/libclsync.pc program.h])
 AC_OUTPUT
+
+# workaround automake bug with "jobserver unavailable" in lto mode
+m4_pattern_allow(AM_V_CCLD)
+[sed -i 's/$(AM_V_CCLD)/+$(AM_V_CCLD)/' Makefile]