Page MenuHomeFreeBSD

build: Add missing dependencies when building kernel for amd64.
Needs ReviewPublic

Authored by hselasky on May 21 2023, 4:14 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Dec 9, 1:33 AM
Unknown Object (File)
Mon, Dec 2, 9:51 PM
Unknown Object (File)
Oct 23 2024, 10:03 AM
Unknown Object (File)
Oct 11 2024, 8:35 AM
Unknown Object (File)
Oct 11 2024, 8:34 AM
Unknown Object (File)
Oct 11 2024, 8:16 AM
Unknown Object (File)
Oct 2 2024, 10:37 AM
Unknown Object (File)
Sep 19 2024, 1:40 PM
Subscribers
None

Details

Reviewers
imp
kib
Summary

The elf-vdso32.so.o and elf-vdso.so.o targets build some header files
needed when building some other targets. Add the missing dependencies
to avoid compilation errors.

MFC after: 1 week
Sponsored by: NVIDIA Networking

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

hselasky created this revision.

It would be better if we depended on the header files directly... but if these really are files otherwise not mentioned in the build system and are purely a side effect of the o creation then this is goid.

In D40192#915023, @imp wrote:

It would be better if we depended on the header files directly... but if these really are files otherwise not mentioned in the build system and are purely a side effect of the o creation then this is goid.

Yes, I know, but there is no separate target for the header file at the moment. The .sh files in question do a lot of stuff.

So I thought I would just depend on the object file being there, implying all the other files are generated too.

Does config(8) allow to specify that a build step produces more than one file? This is the problem causing the use of elf-vdso.so.o as a build indicator.

Perhaps you could add vdso_offset.h as a file to files.amd64, and there specify a dependency on .o together with empty build rule.

In D40192#915080, @kib wrote:

Does config(8) allow to specify that a build step produces more than one file? This is the problem causing the use of elf-vdso.so.o as a build indicator.

I will double check config(8), but I suspect it is quite simple in that regards.

Perhaps you could add vdso_offset.h as a file to files.amd64, and there specify a dependency on .o together with empty build rule.

That's possible, but you still need the dependency keyword for the C-files in question. Either you depend on the "elf-vdso.so.o" or you depend on "vdso_offset.h". I don't know which is better.

In D40192#915080, @kib wrote:

Perhaps you could add vdso_offset.h as a file to files.amd64, and there specify a dependency on .o together with empty build rule.

That's possible, but you still need the dependency keyword for the C-files in question. Either you depend on the "elf-vdso.so.o" or you depend on "vdso_offset.h". I don't know which is better.

Yes, vdso_offset.h would depend on the vdso. My point is that .c sources depend on vdso_offset.h, which would be a more correct dep edge, than vdso->.c (if possible to express).

In D40192#915712, @kib wrote:
In D40192#915080, @kib wrote:

Perhaps you could add vdso_offset.h as a file to files.amd64, and there specify a dependency on .o together with empty build rule.

That's possible, but you still need the dependency keyword for the C-files in question. Either you depend on the "elf-vdso.so.o" or you depend on "vdso_offset.h". I don't know which is better.

Yes, vdso_offset.h would depend on the vdso. My point is that .c sources depend on vdso_offset.h, which would be a more correct dep edge, than vdso->.c (if possible to express).

In both cases you will need to add a manual dependency for those C-files in files.amd64 - right?

It is just the formality. C-files depend on H-files.

So I'll add a new dummy target for the header file, and use that as a dependency.

--HPS