[DTrace-devel] [PATCH] build: add a 'make native' target

Kris Van Hees kris.van.hees at oracle.com
Tue Sep 12 04:27:41 UTC 2023


On Wed, Aug 02, 2023 at 02:27:57PM +0100, Nick Alcock via DTrace-devel wrote:
> This trivial target makes only those portions of DTrace that don't
> need a BPF cross-compiler.
> 
> (The resulting program won't work very well unless you do a full make,
> but for some uses -- like wrapping the compilation on a machine that
> doesn't have such a compiler, for compilation databases -- it's useful.)

I don't really like the notion of adding such a specific patch because it only
really serves a single person (you).  Also, why do you need to have a target
that disables the compilation of BPF code?  Since all BPF code is compiled
using the cross compiler which is entirely separate from the compilation of the
actual code, there shouldn't be a conflict.  As far as I understand you use
this to construct a compilation database using llvm for the non-BPF code.  Why
is the compilation of the BPF code then an issue?  The cross compiler (gcc)
should still be able to compile the BPF code, and wouldn't that get ignored by
whatever creates the compilation database anyway?

> Signed-off-by: Nick Alcock <nick.alcock at oracle.com>
> ---
>  Maketargets | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/Maketargets b/Maketargets
> index 830c16467389..246529c4238d 100644
> --- a/Maketargets
> +++ b/Maketargets
> @@ -1,7 +1,7 @@
>  # Miscellaneous targets.
>  #
>  # Oracle Linux DTrace.
> -# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
> +# Copyright (c) 2011, 2023, Oracle and/or its affiliates. All rights reserved.
>  # Licensed under the Universal Permissive License v 1.0 as shown at
>  # http://oss.oracle.com/licenses/upl.
>  
> @@ -19,6 +19,8 @@ help::
>  
>  all:: $(TARGETS)
>  
> +native:: $(filter-out bpflibs,$(TARGETS))
> +
>  clean::
>  	$(call describe-target,CLEAN,$(objdir) test/log)
>  	-rm -rf $(objdir) test/log
> 
> base-commit: 42f15d3235bcf816ed814b88d64492a63fc5f0f0
> prerequisite-patch-id: 52ce11c079ec2f65353146f18303b24fa9ff62e2
> prerequisite-patch-id: 9bc8cfafabd7ab0579f0a27e30a87b3587bb5f9f
> prerequisite-patch-id: 36029942b8e0fb4863721accb514d53199c3cc15
> prerequisite-patch-id: 311784758ab15c7f1bb41ad1c054b9b28aa7f8a3
> prerequisite-patch-id: 6dae9b2a704bdf47b0c5fe33419c6192a90022e6
> -- 
> 2.41.0.270.g68fa1d84b5
> 
> 



More information about the DTrace-devel mailing list