PR lto/86004
* doc/sourcebuild.texi (lto_incremental): Document new effective
target.
* lib/target-supports.exp (check_effective_target_lto_incremental):
New.
* g++.dg/lto/pr69137_0.C: Require lto_incremental effective target.
* g++.dg/lto/pr65316_0.C: Likewise.
* g++.dg/lto/pr85176_0.C: Likewise.
* g++.dg/lto/pr79000_0.C: Likewise.
* g++.dg/lto/pr66180_0.C: Likewise.
* g++.dg/lto/pr65193_0.C: Likewise.
* g++.dg/lto/pr69077_0.C: Likewise.
* g++.dg/lto/pr68057_0.C: Likewise.
* g++.dg/lto/pr66705_0.C: Likewise.
* g++.dg/lto/pr65302_0.C: Likewise.
* g++.dg/lto/
20091002-1_0.C: Likewise.
* g++.dg/lto/pr81940_0.C: Likewise.
* g++.dg/lto/pr64043_0.C: Likewise.
* g++.dg/lto/pr65549_0.C: Likewise.
* g++.dg/lto/pr69133_0.C: Likewise.
* gfortran.dg/lto/pr79108_0.f90: Likewise.
From-SVN: r266974
+2018-12-11 Jakub Jelinek <jakub@redhat.com>
+
+ PR lto/86004
+ * doc/sourcebuild.texi (lto_incremental): Document new effective
+ target.
+
2018-12-11 Segher Boessenkool <segher@kernel.crashing.org>
PR target/88145
@item lto
Compiler has been configured to support link-time optimization (LTO).
+@item lto_incremental
+Compiler and linker support link-time optimization relocatable linking
+with @option{-r} and @option{-flto} options.
+
@item naked_functions
Target supports the @code{naked} function attribute.
+2018-12-11 Jakub Jelinek <jakub@redhat.com>
+
+ PR lto/86004
+ * lib/target-supports.exp (check_effective_target_lto_incremental):
+ New.
+ * g++.dg/lto/pr69137_0.C: Require lto_incremental effective target.
+ * g++.dg/lto/pr65316_0.C: Likewise.
+ * g++.dg/lto/pr85176_0.C: Likewise.
+ * g++.dg/lto/pr79000_0.C: Likewise.
+ * g++.dg/lto/pr66180_0.C: Likewise.
+ * g++.dg/lto/pr65193_0.C: Likewise.
+ * g++.dg/lto/pr69077_0.C: Likewise.
+ * g++.dg/lto/pr68057_0.C: Likewise.
+ * g++.dg/lto/pr66705_0.C: Likewise.
+ * g++.dg/lto/pr65302_0.C: Likewise.
+ * g++.dg/lto/20091002-1_0.C: Likewise.
+ * g++.dg/lto/pr81940_0.C: Likewise.
+ * g++.dg/lto/pr64043_0.C: Likewise.
+ * g++.dg/lto/pr65549_0.C: Likewise.
+ * g++.dg/lto/pr69133_0.C: Likewise.
+ * gfortran.dg/lto/pr79108_0.f90: Likewise.
+
2018-12-10 Jeff Law <law@redhat.com>
PR tree-optimization/80520
// { dg-lto-do link }
// { dg-require-effective-target fpic }
+// { dg-require-effective-target lto_incremental }
// { dg-lto-options {{-fPIC -flto -Wno-return-type}} }
// { dg-extra-ld-options "-fPIC -r -nostdlib" }
// { dg-lto-do link }
+// { dg-require-effective-target lto_incremental }
// { dg-lto-options { { -flto -std=c++11 } } }
// { dg-extra-ld-options "-r -nostdlib -O2" }
class Validator
/* { dg-lto-do link } */
/* { dg-require-effective-target fpic } */
+/* { dg-require-effective-target lto_incremental } */
/* { dg-lto-options {{-fPIC -r -nostdlib -flto -O2 -g -Wno-return-type}} } */
void frexp (int, int *);
// { dg-lto-do link }
+// { dg-require-effective-target lto_incremental }
// { dg-lto-options { { -flto -O2 -Wno-return-type } } }
// { dg-extra-ld-options "-r -nostdlib -O0" }
// { dg-lto-do link }
+// { dg-require-effective-target lto_incremental }
// { dg-lto-options { { -flto -std=c++11 -g2 -fno-lto-odr-type-merging -O2 -Wno-return-type } } }
// { dg-extra-ld-options "-r -nostdlib -O2 -fno-lto-odr-type-merging" }
// { dg-lto-do link }
+// { dg-require-effective-target lto_incremental }
// { dg-lto-options { { -std=gnu++14 -flto -g -Wno-return-type } { -std=gnu++14 -flto -g -O2 -fno-inline -flto-partition=max -Wno-return-type } } }
// { dg-extra-ld-options "-r -nostdlib" }
// { dg-lto-do link }
+// { dg-require-effective-target lto_incremental }
// { dg-lto-options { { -flto -std=c++14 -r -nostdlib } } }
#include <memory>
namespace {
// { dg-lto-do link }
+// { dg-require-effective-target lto_incremental }
// { dg-lto-options { { -O2 -flto -flto-partition=max -fipa-pta } } }
// { dg-extra-ld-options "-r -nostdlib" }
// { dg-lto-do link }
+// { dg-require-effective-target lto_incremental }
/* { dg-extra-ld-options { -O2 -Wno-odr -r -nostdlib } } */
struct SPxPricer;
struct SoPlex {
// { dg-lto-do link }
+// { dg-require-effective-target lto_incremental }
// { dg-lto-options { { -O3 -g -flto } } }
// { dg-extra-ld-options "-r -nostdlib" }
// { dg-lto-do link }
+// { dg-require-effective-target lto_incremental }
// { dg-lto-options { { -flto -O2 } } }
// { dg-extra-ld-options "-r -nostdlib -flto -flto-partition=none -O2" }
namespace xercesc_3_1 {
// { dg-lto-do link }
+// { dg-require-effective-target lto_incremental }
// { dg-lto-options { { -std=c++11 -g -flto } } }
// { dg-extra-ld-options "-r -nostdlib" }
// { dg-lto-do link }
+// { dg-require-effective-target lto_incremental }
// { dg-lto-options { "-flto -g" } }
// { dg-extra-ld-options "-r -nostdlib" }
// { dg-lto-do link }
+// { dg-require-effective-target lto_incremental }
// { dg-lto-options { { -O -flto } } }
// { dg-extra-ld-options "-r -nostdlib -g" }
// { dg-lto-do link }
+// { dg-require-effective-target lto_incremental }
// { dg-lto-options { { -flto -g1 } } }
// { dg-extra-ld-options "-r -nostdlib" }
namespace a {
! { dg-lto-do link }
+! { dg-require-effective-target lto_incremental }
! { dg-lto-options {{ -Ofast -flto --param ggc-min-expand=0 --param ggc-min-heapsize=0 }} }
! { dg-extra-ld-options "-r" }
} "-flto"]
}
+# Return 1 if the compiler and linker support incremental link-time
+# optimization.
+
+proc check_effective_target_lto_incremental { } {
+ if ![check_effective_target_lto] {
+ return 0
+ }
+ return [check_no_compiler_messages lto_incremental executable {
+ int main () { return 0; }
+ } "-flto -r -nostdlib"]
+}
+
# Return 1 if -mx32 -maddress-mode=short can compile, 0 otherwise.
proc check_effective_target_maybe_x32 { } {