Hi! On 2023-06-03T21:32:57+0100, "Maciej W. Rozycki" wrote: >> Will you, Maciej, please test that this doesn't break your setting? > > Umm, this was implemented for my Western Digital development environment, > which I don't have access to anymore. I'll see what I can do, but it may > be neither easy nor quick. It's been long ago and I don't have a setup > with multilibs enabled anymore. And neither I remember the thorough > problem analysis I went through that has led me to the conclusions. I see. I've therefore myself now done a quick hack to replicate the original requirement, to verify that given '--with-build-sysroot=', build-tree testing must have '--sysroot=[...]' appear for every driver invocation: --- gcc/gcc.cc +++ gcc/gcc.cc @@ -8190,6 +8190,10 @@ driver::main (int argc, char **argv) if (!maybe_print_and_exit ()) return 0; + if (!env.get ("SKIP_VERIFY_SYSROOT")) + if (!(target_system_root && !strcmp (target_system_root, "/boot/.."))) + internal_error ("MISSING SYSROOT"); + early_exit = prepare_infiles (); if (early_exit) return get_exit_code (); With that, build GCC with '--with-build-sysroot=/boot/..' and with the environment variable 'SKIP_VERIFY_SYSROOT' set (to ignore any build-time issues, not relevant to this discussion here), and test without the 'SKIP_VERIFY_SYSROOT' environment variable set (meaning the checking is active). I observe that with current (un-altered) GCC sources, '--sysroot=[...]' doesn't actually appear for all compiler test suites; the following ones FAIL: - 'ada/acats/acats.sum' - 'testsuite/g++/g++.sum': 'g++.dg/plugin/plugin.exp' only - 'testsuite/gcc/gcc.sum': 'gcc.dg/plugin/plugin.exp' only - 'gm2/gm2.sum' - 'gnat/gnat.sum' - 'obj-c++/obj-c++.sum': 'obj-c++.dg/plugin/plugin.exp' only - 'objc/objc.sum': 'objc.dg/plugin/plugin.exp' only Additionally, the following target library test suite also FAILs: 'libitm/testsuite/libitm.sum' (Resolving these is not my objective right now; I suppose these were not relevant in Maciej's original scenario.) Otherwise, I observe that my proposed re-work does still achieve the desired outcome re '--sysroot=[...]', and Iain has long ago confirmed that it does resolve "libgomp, testsuite: non-native multilib c++ tests fail on Darwin", so pushed to master branch commit fb5d27be272b71fb9026224535fc73f125ce3be7 "libgomp: Consider '--with-build-sysroot=[...]' for target libraries' build-tree testing (instead of build-time 'CC' etc.) [PR91884, PR109951]", see attached. Grüße Thomas ----------------- Siemens Electronic Design Automation GmbH; Anschrift: Arnulfstraße 201, 80634 München; Gesellschaft mit beschränkter Haftung; Geschäftsführer: Thomas Heurung, Frank Thürauf; Sitz der Gesellschaft: München; Registergericht München, HRB 106955