Hello, Even if we consider using specs file, the files still needs to be built in order to run the test cases or do you think of using the specs file in order to build the extra glue code at the link stage of each test case?
When we run the test suite, we have the following expectations: 1. The target binary should be executable in both QEMU (system mode) and on a physical board 2. The extra glue code should not be optimized (-O0), even if the test case have strong optimization 3. The extra glue code should have full GDB symbols (-ggdb) 4. The extra glue code should be built once per test target 5. The extra glue code shall not be part of the toolchain sources, only to be used in conjunction with DejaGNU for testing! To be able to run on a physical board, special vector, start code and syscalls are needed. Up until recently, the files were compiled before the test suite was launched, but that have the side effect of maybe using the wrong object file for the target and wasting a lot of testing time before it's discovered. This is the main reason why we created the hook in our DejaGNU installation to make sure that the object files are built with the right multilib flags. The support code is also compiled with -O0 and -ggdb to make it easier to debug what's happening. The test case code is still compiled without this and that is fine since we only want to be able to see where the call to abort() or similar glue functions were done. If the entire testcase was to be compiled with -ggdb, we guess there would be more of an impact on the test cases than our way. Our glue code does not have a strict need for the DejaGNU wrapper code, although we always run DejaGNU in wrapper mode, so there might be a better way to hook this in. The point is that the files need to be compiled with the right multilib flags in order for execution tests be runnable. Can the above be accomplished with a specs file? If so, how would that look like? Kind regards, Torbjörn -----Original Message----- From: Rob Savoye <r...@senecass.com> Sent: den 14 september 2020 18:23 To: Christophe Lyon <christophe.l...@linaro.org>; dejagnu@gnu.org Cc: Torbjorn SVENSSON <torbjorn.svens...@st.com> Subject: Re: [PATCH] build_wrapper: Call customization hook On 9/14/20 6:02 AM, Christophe Lyon wrote: > It can be useful to customize the build wrapper for local needs: for > instance, one may need to compile additional objects to add > initialization code depending on the target board or multilibs in use. That shouldn't be necessary if you're using a specs file. What other initialization code is needed ? - rob -