Skip to content

Conversation

@ddiss
Copy link

@ddiss ddiss commented Sep 3, 2025

This is a minor follow up atop #612 , to use the same build-prerequisite approach (instead of .WAIT) for parallel builds.

This is a follow up change for commit 3c97822 ("lkl: add tests
build barrier") tracked via lkl#558.
The hijack and zpoline libraries also share object files, so need extra
logic to avoid parallel build failures.

Add a new intermediate libhijack-priv-in.o prerequisite for the hijack
libraries, avoiding the .WAIT target which breaks make libraries_install
on older (e.g. 4.2.1) versions of make.
The existing liblkl$(SOSUF) target is currently unmatched, so fix it and
use it as a linker target which omits libhijack-priv-in.o.

Signed-off-by: David Disseldorp <ddiss@suse.de>
This effectively reverts commit 3c97822 ("lkl: add tests build
barrier"), replacing the tests .WAIT barrier with a common-object
prerequisite to keep parallel builds working.

Prerequisites are preferable to explicit .WAIT barriers, as they better
allow for build concurrency and also avoid install target breakage
described in the previous commit.

One minor drawback is that some of the test binaries don't use any
cla.o symbols, but get linked nevertheless. E.g. Before:
   text    data     bss     dec     hex filename
7878818 4851995  885880 13616693	 cfc635 tools/lkl/tests/boot

After:
   text	   data	    bss	    dec	    hex	filename
7880494	4852094	 885856	13618444	 cfcd0c	tools/lkl/tests/boot

I don't see it as a problem, but if it is then we could split up the
prerequisites.

Signed-off-by: David Disseldorp <ddiss@suse.de>
@ddiss ddiss changed the title Fix hijack zpoline parallel build and drop wait from tests Fix hijack and zpoline parallel build and drop .WAIT from test targets Sep 3, 2025
Copy link
Member

@tavip tavip left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome, thank you @ddiss !

@tavip tavip merged commit e183e40 into lkl:master Sep 4, 2025
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants