On Donnerstag, 17. Dezember 2020 14:10:51 CET Jonathan Wakely wrote: > On 16/12/20 12:58 +0100, Matthias Kretz wrote: > >+ $srcdir/testsuite/experimental/simd/generate_makefile.sh \ > >+ --destination="$testdir/$subdir" $CXX $INCLUDES $CXXFLAGS -static > > Is the -static here to avoid needing LD_LIBRARY_PATH to find > libstdc++.so? > > If you don't have libc.a installed it won't work. How about > using -static-libgcc -static-libstdc++ instead? I need the -static for qemu and simple remote execution (copy binary via scp, execute via ssh). And yes, -static makes it much easier to avoid the LD_LIBRARY_PATH issue. I'll make -static optional, and default to -static-libgcc -static-libstdc++. The latter should still work for most remote execution setups (works for me, at least). > >--- /dev/null > >+++ b/libstdc++-v3/testsuite/experimental/simd/tests/abs.cc > >@@ -0,0 +1,24 @@ > >+#include "bits/verify.h" > >+#include "bits/metahelpers.h" > > We'd usually put these testsuite helper files in testsuite/util, maybe > in a testsuite/util/simd sub-dir, but I suppose keeping them local to > the tests is OK too. At this point the simd testsuite is very close to being usable for other Parallelism TS 2 implementations. That's a feature I'd support if there's interest outside of libstdc++. > >--- /dev/null > >+++ b/libstdc++-v3/testsuite/experimental/simd/tests/bits/conversions.h > >@@ -0,0 +1,167 @@ > >+#include > >+ > >+// is_conversion_undefined > >+/* implementation-defined > >+ * ====================== > >+ * §4.7 p3 (integral conversions) > > These section signs will cause errors if the testsuite is run with > something like -finput-charset=ascii, but I suppose we can say "don't > do that". We have tests that use that option and include all the > libstdc++ headers, so there should be no need to run the entire > testsuite with that option. So it's OK. Ah, but good point. I have comments in simd_math.h (i.e. the other patch) like: "Fold @p x into [-¼π, ¼π] and [...]". These comments are not in the testsuite. I guess I need to replace all non-ASCII chars there? Attached is the diff to the previous patch. In addition to the -static change I added license headers (as noted on IRC) and I improved the Makefile generator: Instead of only passing TESTFLAGS and GCC_TEST_SIMULATOR as environment variables, place the initial values into the generated Makefile. This makes it much easier to work on tests or fixes for failures. I'll top-post the squashed simd patches. -- ────────────────────────────────────────────────────────────────────────── Dr. Matthias Kretz https://mattkretz.github.io GSI Helmholtz Centre for Heavy Ion Research https://gsi.de std::experimental::simd https://github.com/VcDevel/std-simd ──────────────────────────────────────────────────────────────────────────