bpf.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jiri Olsa <jolsa@redhat.com>
To: Nathan Chancellor <nathan@kernel.org>
Cc: Jiri Olsa <jolsa@kernel.org>,
	Arnaldo Carvalho de Melo <acme@kernel.org>,
	Andrii Nakryiko <andriin@fb.com>,
	dwarves@vger.kernel.org, netdev@vger.kernel.org,
	bpf@vger.kernel.org, Alexei Starovoitov <ast@kernel.org>,
	Yonghong Song <yhs@fb.com>, Hao Luo <haoluo@google.com>,
	Martin KaFai Lau <kafai@fb.com>, Song Liu <songliubraving@fb.com>,
	John Fastabend <john.fastabend@gmail.com>,
	KP Singh <kpsingh@chromium.org>,
	Sedat Dilek <sedat.dilek@gmail.com>
Subject: Re: [RFC] dwarves/pahole: Add test scripts
Date: Thu, 25 Feb 2021 23:15:55 +0100	[thread overview]
Message-ID: <YDghm2BMSjcgDfPe@krava> (raw)
In-Reply-To: <20210224173045.GA51663@24bbad8f3778>

On Wed, Feb 24, 2021 at 10:30:45AM -0700, Nathan Chancellor wrote:

SNIP

> > +
> > +build()
> > +{
> > +	local name=$1
> > +	local opts=$2
> 
> A more robust way to handle this might be
> 
> shift
> local opts=$@
> 
> > +
> > +	echo "build ${name} (${OUTPUT}/output)"
> > +
> > +	mkdir -p ${OBJECTS}/${name}
> > +	mkdir -p ${OUTPUT}
> > +
> > +	pushd ${KDIR}
> > +	make ${opts} -j"$(nproc)" O=${OUTPUT} olddefconfig > ${OUTPUT}/output 2>&1
> 
> Then change this to
> 
> make "${opts[@]}"
> 
> shellcheck complains about implicit word splitting (and finds some other
> things in the other script).

I have no doutbs ;-) ok

SNIP

> > +
> > +	PAHOLE=$(realpath ${PAHOLE})
> > +	OBJECTS=$(realpath ${OBJECTS})
> > +
> > +	echo "output:  ${OUTPUT}"
> > +	echo "kdir:    ${KDIR}"
> > +	echo "pahole:  ${PAHOLE}"
> > +	echo "objects: ${OBJECTS}"
> > +	echo
> > +
> > +	mkdir -p ${OBJECTS}
> > +
> > +	echo "cleanup ${KDIR}"
> > +	make -C ${KDIR} mrproper
> > +
> > +
> > +	build x86-clang     "LLVM=1"
> 
> With that change above, you could unquote these options and just pass
> them in as regular parameters.

ok I see, that'd be easier and better looking, I'll change this

> 
> > +	build x86-gcc       ""
> > +
> > +	build aarch64-clang "ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- LLVM=1"
> > +	build aarch64-gcc   "ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu-"
> > +
> > +#	build powerpc-clang "ARCH=powerpc CROSS_COMPILE=powerpc64-linux-gnu- LLVM=1"
> > +	build powerpc-gcc   "ARCH=powerpc CROSS_COMPILE=powerpc64-linux-gnu-"
> > +
> > +#	build powerpcle-clang "ARCH=powerpc CROSS_COMPILE=powerpc64le-linux-gnu- LLVM=1"
> > +	build powerpcle-gcc   "ARCH=powerpc CROSS_COMPILE=powerpc64le-linux-gnu-"
> > +
> > +#	build s390x-clang   "ARCH=s390 CROSS_COMPILE=s390x-linux-gnu- LLVM=1"
> 
> powerpc64le and s390 can build with CC=clang, instead of LLVM=1.

I got some strange error when building ppc and s390 with LLVM=1,
but I did not check it deeply.. I'll try with CC=clang then, great

> 
> I will see if I can give this a run locally over the next week or so.

thanks,
jirka


  reply	other threads:[~2021-02-25 22:19 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-23 13:23 [RFC] dwarves/pahole: Add test scripts Jiri Olsa
2021-02-24 17:30 ` Nathan Chancellor
2021-02-25 22:15   ` Jiri Olsa [this message]
2021-08-20 20:39 ` Arnaldo Carvalho de Melo
2021-08-20 21:02   ` Arnaldo Carvalho de Melo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YDghm2BMSjcgDfPe@krava \
    --to=jolsa@redhat.com \
    --cc=acme@kernel.org \
    --cc=andriin@fb.com \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=dwarves@vger.kernel.org \
    --cc=haoluo@google.com \
    --cc=john.fastabend@gmail.com \
    --cc=jolsa@kernel.org \
    --cc=kafai@fb.com \
    --cc=kpsingh@chromium.org \
    --cc=nathan@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=sedat.dilek@gmail.com \
    --cc=songliubraving@fb.com \
    --cc=yhs@fb.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).