|
|
0b9bbe |
From 16694079a3f415f5e5683b0afe6978810ac259b1 Mon Sep 17 00:00:00 2001
|
|
|
0b9bbe |
From: David Malcolm <dmalcolm@redhat.com>
|
|
|
0b9bbe |
Date: Tue, 31 Aug 2021 17:01:05 -0400
|
|
|
0b9bbe |
Subject: [PATCH 08/17] testsuite: build plugins with -std=c++11
|
|
|
0b9bbe |
|
|
|
0b9bbe |
Various testsuite plugins fail when built within DTS with e.g.:
|
|
|
0b9bbe |
cc1: error: cannot load plugin ./diagnostic_plugin_test_paths.so: /builddir/build/BUILD/gcc-11.1.1-20210623/obj-x86_64-redhat-linux/x86_64-redhat-linux/libstdc++-v3/src/.libs/libstdc++.so.6: version `CXXABI_1.3.9' not found (required by ./diagnostic_plugin_test_paths.so)
|
|
|
0b9bbe |
|
|
|
0b9bbe |
These turn out to C++14's sized deletion
|
|
|
0b9bbe |
(see https://en.cppreference.com/w/cpp/memory/new/operator_delete):
|
|
|
0b9bbe |
|
|
|
0b9bbe |
14: 0000000000000000 0 FUNC GLOBAL DEFAULT UNDEF _ZdlPvm@CXXABI_1.3.9 (4)
|
|
|
0b9bbe |
48: 0000000000000000 0 FUNC GLOBAL DEFAULT UNDEF _ZdlPvm@CXXABI_1.3.9
|
|
|
0b9bbe |
14: 0000000000000000 0 FUNC GLOBAL DEFAULT UNDEF operator delete(void*, unsigned long)@CXXABI_1.3.9 (4)
|
|
|
0b9bbe |
48: 0000000000000000 0 FUNC GLOBAL DEFAULT UNDEF operator delete(void*, unsigned long)@CXXABI_1.3.9
|
|
|
0b9bbe |
|
|
|
0b9bbe |
Looks like plugin.exp is building the test plugins against the
|
|
|
0b9bbe |
freshly-built libstdc++, and then trying to dynamically load them
|
|
|
0b9bbe |
against the system libstdc++.
|
|
|
0b9bbe |
|
|
|
0b9bbe |
This patch forces the use of -std=c++11 when building these test plugins,
|
|
|
0b9bbe |
to sidestep the problem.
|
|
|
0b9bbe |
---
|
|
|
0b9bbe |
gcc/testsuite/lib/plugin-support.exp | 2 +-
|
|
|
0b9bbe |
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
0b9bbe |
|
|
|
0b9bbe |
diff --git a/gcc/testsuite/lib/plugin-support.exp b/gcc/testsuite/lib/plugin-support.exp
|
|
|
0b9bbe |
index 6d651901e..9943dbb37 100644
|
|
|
0b9bbe |
--- a/gcc/testsuite/lib/plugin-support.exp
|
|
|
0b9bbe |
+++ b/gcc/testsuite/lib/plugin-support.exp
|
|
|
0b9bbe |
@@ -103,7 +103,7 @@ proc plugin-test-execute { plugin_src plugin_tests } {
|
|
|
0b9bbe |
}
|
|
|
0b9bbe |
set optstr [concat $optstr "-DIN_GCC -fPIC -shared -fno-rtti -undefined dynamic_lookup"]
|
|
|
0b9bbe |
} else {
|
|
|
0b9bbe |
- set plug_cflags $PLUGINCFLAGS
|
|
|
0b9bbe |
+ set plug_cflags "$PLUGINCFLAGS -std=c++11"
|
|
|
0b9bbe |
set optstr "$includes $extra_flags -DIN_GCC -fPIC -shared -fno-rtti"
|
|
|
0b9bbe |
}
|
|
|
0b9bbe |
|
|
|
0b9bbe |
--
|
|
|
0b9bbe |
2.31.1
|
|
|
0b9bbe |
|