forked from mirrors/linux
		
	samples/bpf: Use llc in PATH, rather than a hardcoded value
While at it, remove the generation of .s files and fix some typos in the related comment. Cc: Alexei Starovoitov <ast@fb.com> Cc: David S. Miller <davem@davemloft.net> Cc: Daniel Borkmann <daniel@iogearbox.net> Cc: Ananth N Mavinakayanahalli <ananth@in.ibm.com> Cc: Michael Ellerman <mpe@ellerman.id.au> Signed-off-by: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com> Acked-by: Alexei Starovoitov <ast@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
		
							parent
							
								
									77e63534d6
								
							
						
					
					
						commit
						128d1514be
					
				
					 1 changed files with 3 additions and 9 deletions
				
			
		| 
						 | 
					@ -76,16 +76,10 @@ HOSTLOADLIBES_offwaketime += -lelf
 | 
				
			||||||
HOSTLOADLIBES_spintest += -lelf
 | 
					HOSTLOADLIBES_spintest += -lelf
 | 
				
			||||||
HOSTLOADLIBES_map_perf_test += -lelf -lrt
 | 
					HOSTLOADLIBES_map_perf_test += -lelf -lrt
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# point this to your LLVM backend with bpf support
 | 
					# asm/sysreg.h - inline assembly used by it is incompatible with llvm.
 | 
				
			||||||
LLC=$(srctree)/tools/bpf/llvm/bld/Debug+Asserts/bin/llc
 | 
					# But, there is no easy way to fix it, so just exclude it since it is
 | 
				
			||||||
 | 
					 | 
				
			||||||
# asm/sysreg.h inline assmbly used by it is incompatible with llvm.
 | 
					 | 
				
			||||||
# But, ehere is not easy way to fix it, so just exclude it since it is
 | 
					 | 
				
			||||||
# useless for BPF samples.
 | 
					# useless for BPF samples.
 | 
				
			||||||
$(obj)/%.o: $(src)/%.c
 | 
					$(obj)/%.o: $(src)/%.c
 | 
				
			||||||
	clang $(NOSTDINC_FLAGS) $(LINUXINCLUDE) $(EXTRA_CFLAGS) \
 | 
						clang $(NOSTDINC_FLAGS) $(LINUXINCLUDE) $(EXTRA_CFLAGS) \
 | 
				
			||||||
		-D__KERNEL__ -D__ASM_SYSREG_H -Wno-unused-value -Wno-pointer-sign \
 | 
							-D__KERNEL__ -D__ASM_SYSREG_H -Wno-unused-value -Wno-pointer-sign \
 | 
				
			||||||
		-O2 -emit-llvm -c $< -o -| $(LLC) -march=bpf -filetype=obj -o $@
 | 
							-O2 -emit-llvm -c $< -o -| llc -march=bpf -filetype=obj -o $@
 | 
				
			||||||
	clang $(NOSTDINC_FLAGS) $(LINUXINCLUDE) $(EXTRA_CFLAGS) \
 | 
					 | 
				
			||||||
		-D__KERNEL__ -D__ASM_SYSREG_H -Wno-unused-value -Wno-pointer-sign \
 | 
					 | 
				
			||||||
		-O2 -emit-llvm -c $< -o -| $(LLC) -march=bpf -filetype=asm -o $@.s
 | 
					 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in a new issue