[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Minios-devel] [UNIKRAFT PATCH 05/10] lib/syscall_shim: generate base headers



Simon Kuenzer <simon.kuenzer@xxxxxxxxx> writes:

> On 04.06.19 18:28, Yuri Volchkov wrote:
>> The following headers are generated by the code in this patch:
>>    - syscall_nrs.h - just definitions of all the syscalls with their
>>      numbers
>>    - syscall_map.h  - provides maps from syscall number to a concrete
>>      function in the Unikarft
>>    - syscall_stubs.h - if no library is providing a syscall, it will be
>>      resolved to a stub, defined in this file
>> 
>> Signed-off-by: Yuri Volchkov <yuri.volchkov@xxxxxxxxx>
>> ---
>>   lib/Config.uk                  |  1 +
>>   lib/Makefile.uk                |  1 +
>>   lib/syscall_shim/Config.uk     |  3 +++
>>   lib/syscall_shim/Makefile.uk   | 40 ++++++++++++++++++++++++++++++++++
>>   lib/syscall_shim/gen_stubs.awk |  8 +++++++
>>   5 files changed, 53 insertions(+)
>>   create mode 100644 lib/syscall_shim/Config.uk
>>   create mode 100644 lib/syscall_shim/Makefile.uk
>>   create mode 100644 lib/syscall_shim/gen_stubs.awk
>> 
>> +
>> +__PHONY_GEN_SRC := syscall_map.h syscall_stubs.h syscall_nrs.h
>> +__PHONY_GEN_SRC := $(addprefix $(__GEN_INCLUDES_PATH)/, $(__PHONY_GEN_SRC))
>> +__PHONY_GEN_SRC_NEW := $(addsuffix .new, $(__PHONY_GEN_SRC))
>> +
>> +UK_PREPARE-$(CONFIG_LIBSYSCALL_SHIM) += $(__PHONY_GEN_SRC)
>> +
>> +
>> +__SYSCALL_SHIM_TEMPL := 
>> $(LIBSYSCALL_SHIM_BASE)/arch/$(CONFIG_UK_ARCH)/syscall.h.in
>> +
>> +$(call uk_mk_dir, $(__GEN_INCLUDES_PATH))
>
> Hum, now I understand what you want to do. In this case you are lucky 
> and create a directory under the build directory. Maybe a 
> `mk_lib_sub_dir` would make more sense than a general `uk_mk_dir`. I 
> could imagine the following syntax within this file:
For now I just removed the patch introduction uk_mk_dir, and called the
mkdir directly. Because we already have a function called
'mk_sub_build_dir', but it does not do what we would need. As a time is
pressing I have cut the corner here.

@Simon:
May I ask you to do a follow up patch after this is upstream ed, and do
this right?

Thank you!
>
> $(call mk_lib_sub_dir,libsyscall_shim,include/uk/bits)
>
> Or maybe even:
>
> __GEN_INCLUDES_PATH := $(call lib_sub_dir,libsyscall_shim,include/uk/bits)
>

-- 
Yuri Volchkov
Software Specialist

NEC Europe Ltd
Kurfürsten-Anlage 36
D-69115 Heidelberg

_______________________________________________
Minios-devel mailing list
Minios-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/minios-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.