From: Willy Tarreau <w@1wt.eu>
To: Mark Rutland <mark.rutland@arm.com>
Cc: "Paul E. McKenney" <paulmck@kernel.org>,
linux-kernel@vger.kernel.org, valentin.schneider@arm.com
Subject: Re: rcutorture initrd/nolibc build on ARMv8?
Date: Tue, 19 Jan 2021 18:16:37 +0100 [thread overview]
Message-ID: <20210119171637.GA14704@1wt.eu> (raw)
In-Reply-To: <20210119170238.GA5603@C02TD0UTHF1T.local>
Hi Mark,
On Tue, Jan 19, 2021 at 05:02:38PM +0000, Mark Rutland wrote:
> > I can't spot from the report above the original C file that was attempted
> > to be built, it makes me think we tried to compile directly the .h file.
>
> That was the inline snippet in
> tools/testing/selftests/rcutorture/bin/mkinitrd.sh:
>
> | #ifndef NOLIBC
> | #include <unistd.h>
> | #include <sys/time.h>
> | #endif
> |
> | volatile unsigned long delaycount;
> |
> | int main(int argc, int argv[])
> | {
> | int i;
> | struct timeval tv;
> | struct timeval tvb;
> |
> | for (;;) {
> | sleep(1);
> | /* Need some userspace time. */
> | if (gettimeofday(&tvb, NULL))
> | continue;
> | do {
> | for (i = 0; i < 1000 * 100; i++)
> | delaycount = i * i;
> | if (gettimeofday(&tv, NULL))
> | break;
> | tv.tv_sec -= tvb.tv_sec;
> | if (tv.tv_sec > 1)
> | break;
> | tv.tv_usec += tv.tv_sec * 1000 * 1000;
> | tv.tv_usec -= tvb.tv_usec;
> | } while (tv.tv_usec < 1000);
> | }
> | return 0;
> | }
>
> ... which gets written to a file called init.c, and then built with:
>
> | ${CROSS_COMPILE}gcc -fno-asynchronous-unwind-tables -fno-ident \
> | -nostdlib -include ../../../../include/nolibc/nolibc.h \
> | -lgcc -s -static -Os -o init init.c
OK I'll retry this, thank you!
> I was building natively on an arm64 box:
>
> | ./tools/testing/selftests/rcutorture/bin/kvm.sh \
> | --cpus 250 --trust-make --configs "TREE03" \
> | --kmake-arg "CROSS_COMPILE=aarch64-linux-gnu- ARCH=arm64"
>
> > Having it run through sh -x would help me try to locate the root cause or
> > possibly even attempt to reproduce it.
>
> I ran with sh -x, but it didn't log the compiler invocation; hopefully
> the above is sufficient?
I guess so, yes. I'm pretty sure I'll come back with new questions
soon :-)
Thanks,
Willy
next prev parent reply other threads:[~2021-01-19 18:28 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-19 15:31 rcutorture initrd/nolibc build on ARMv8? Paul E. McKenney
2021-01-19 16:19 ` Willy Tarreau
2021-01-19 17:02 ` Mark Rutland
2021-01-19 17:16 ` Willy Tarreau [this message]
2021-01-19 17:43 ` Willy Tarreau
2021-01-20 12:07 ` Mark Rutland
2021-01-20 12:43 ` Willy Tarreau
2021-01-20 13:45 ` Mark Rutland
2021-01-20 14:25 ` Willy Tarreau
2021-01-20 14:37 ` Mark Rutland
2021-01-20 14:54 ` Mark Rutland
2021-01-20 15:02 ` Willy Tarreau
2021-01-21 3:50 ` Willy Tarreau
2021-02-12 12:37 ` [tip: core/rcu] tools/nolibc: Remove incorrect definitions of __ARCH_WANT_* tip-bot2 for Willy Tarreau
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=20210119171637.GA14704@1wt.eu \
--to=w@1wt.eu \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=paulmck@kernel.org \
--cc=valentin.schneider@arm.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