Re: [PATCH bpf-next 1/3] selftests/bpf: Allow building with extra flags

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

 



On 10/17/24 01:17, Eduard Zingerman wrote:
> On Tue, 2024-10-15 at 08:54 +0200, Viktor Malik wrote:
> 
> Tried this, seems to work as expected, but see below.
> 
> Tested-by: Eduard Zingerman <eddyz87@xxxxxxxxx>
> 
> [...]
> 
>> @@ -388,8 +394,8 @@ $(BPFOBJ): $(wildcard $(BPFDIR)/*.[ch] $(BPFDIR)/Makefile)		       \
>>  	   $(APIDIR)/linux/bpf.h					       \
>>  	   | $(BUILD_DIR)/libbpf
>>  	$(Q)$(MAKE) $(submake_extras) -C $(BPFDIR) OUTPUT=$(BUILD_DIR)/libbpf/ \
>> -		    EXTRA_CFLAGS='-g $(OPT_FLAGS) $(SAN_CFLAGS)'	       \
>> -		    EXTRA_LDFLAGS='$(SAN_LDFLAGS)'			       \
>> +		    EXTRA_CFLAGS='-g $(OPT_FLAGS) $(SAN_CFLAGS) $(EXTRA_CFLAGS)' \
>> +		    EXTRA_LDFLAGS='$(SAN_LDFLAGS) $(EXTRA_LDFLAGS)'	       \
>>  		    DESTDIR=$(SCRATCH_DIR) prefix= all install_headers
>>  
>>  ifneq ($(BPFOBJ),$(HOST_BPFOBJ))
> 
> Note, that there is also the following code just below this hunk:
> 
> ifneq ($(BPFOBJ),$(HOST_BPFOBJ))
> $(HOST_BPFOBJ): $(wildcard $(BPFDIR)/*.[ch] $(BPFDIR)/Makefile)		       \
> 		$(APIDIR)/linux/bpf.h					       \
> 		| $(HOST_BUILD_DIR)/libbpf
> 	$(Q)$(MAKE) $(submake_extras) -C $(BPFDIR)                             \
> 		    EXTRA_CFLAGS='-g $(OPT_FLAGS)' ARCH= CROSS_COMPILE=	       \
>                     ^^^^^^^^^^^^
>                     needs an update?

Yes, good catch, I'll add it.

Thanks!

>                     
> 		    OUTPUT=$(HOST_BUILD_DIR)/libbpf/			       \
> 		    CC="$(HOSTCC)" LD="$(HOSTLD)"			       \
> 		    DESTDIR=$(HOST_SCRATCH_DIR)/ prefix= all install_headers
> endif
> 
> 





[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux