mirror of
				https://github.com/torvalds/linux.git
				synced 2025-11-04 02:30:34 +02:00 
			
		
		
		
	selftests/bpf: get rid of -D__x86_64__
-D__x86_64__ workaround was used to make /usr/include/features.h
to follow expected path through the system include headers.
This is not portable.
Instead define dummy stubs.h which is used by 'clang -target bpf'
Fixes: 6882804c91 ("selftests/bpf: add a test for overlapping packet range checks")
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
			
			
This commit is contained in:
		
							parent
							
								
									6ead18fb18
								
							
						
					
					
						commit
						1c2dd16add
					
				
					 2 changed files with 3 additions and 2 deletions
				
			
		| 
						 | 
				
			
			@ -34,6 +34,6 @@ $(BPFOBJ): force
 | 
			
		|||
CLANG ?= clang
 | 
			
		||||
 | 
			
		||||
%.o: %.c
 | 
			
		||||
	$(CLANG) -I../../../include/uapi -I../../../../samples/bpf/ \
 | 
			
		||||
		-D__x86_64__ -Wno-compare-distinct-pointer-types \
 | 
			
		||||
	$(CLANG) -I. -I../../../include/uapi -I../../../../samples/bpf/ \
 | 
			
		||||
		-Wno-compare-distinct-pointer-types \
 | 
			
		||||
		-O2 -target bpf -c $< -o $@
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										1
									
								
								tools/testing/selftests/bpf/gnu/stubs.h
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								tools/testing/selftests/bpf/gnu/stubs.h
									
									
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1 @@
 | 
			
		|||
/* dummy .h to trick /usr/include/features.h to work with 'clang -target bpf' */
 | 
			
		||||
		Loading…
	
		Reference in a new issue