linux-xfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Eric Sandeen <esandeen@redhat.com>
To: "Darrick J. Wong" <djwong@kernel.org>, sandeen@sandeen.net
Cc: Helmut Grohne <helmut@subdivi.de>,
	Bastian Germann <bage@debian.org>,
	Dave Chinner <david@fromorbit.com>,
	linux-xfs@vger.kernel.org
Subject: Re: [PATCH 1/2] libfrog: fix crc32c self test code on cross builds
Date: Tue, 23 Nov 2021 17:32:18 -0600	[thread overview]
Message-ID: <2e68b35a-3c83-dacc-e9fa-a3770675c0f8@redhat.com> (raw)
In-Reply-To: <163769723396.871940.2874954467689580625.stgit@magnolia>

On 11/23/21 1:53 PM, Darrick J. Wong wrote:
> From: Darrick J. Wong <djwong@kernel.org>
> 
> Helmut Grohne reported that the crc32c self test program fails to cross
> build on 5.14.0 if the build host doesn't have liburcu installed.  We
> don't need userspace RCU functionality to test crc32 on the build host,
> so twiddle the header files to include only the two header files that we
> actually need.
> 
> Note: Build-time testing of crc32c is useful for upstream developers so
> that we can check that we haven't broken the checksum code, but we
> really ought to be testing this in mkfs and repair on the user's system
> so that they don't end up with garbage filesystems.  A future patch will
> introduce that.
> 
> Reported-by: Helmut Grohne <helmut@subdivi.de>
> Cc: Bastian Germann <bage@debian.org>
> Suggested-by: Dave Chinner <david@fromorbit.com>
> Signed-off-by: Darrick J. Wong <djwong@kernel.org>

LGTM, thanks.  Helmut, can you confirm that this solves all cross-build problems?
(It must, but confirmation that the cross build is completely functional now
would be nice.)

Reviewed-by: Eric Sandeen <sandeen@redhat.com>

> ---
>   libfrog/crc32.c |    7 ++++++-
>   1 file changed, 6 insertions(+), 1 deletion(-)
> 
> 
> diff --git a/libfrog/crc32.c b/libfrog/crc32.c
> index 526ce950..6a273b71 100644
> --- a/libfrog/crc32.c
> +++ b/libfrog/crc32.c
> @@ -29,10 +29,15 @@
>    * match the hardware acceleration available on Intel CPUs.
>    */
>   
> +/*
> + * Do not include platform_defs.h here; this will break cross builds if the
> + * build host does not have liburcu-dev installed.
> + */
> +#include <stdio.h>
> +#include <sys/types.h>
>   #include <inttypes.h>
>   #include <asm/types.h>
>   #include <sys/time.h>
> -#include "platform_defs.h"
>   /* For endian conversion routines */
>   #include "xfs_arch.h"
>   #include "crc32defs.h"
> 
> 


  reply	other threads:[~2021-11-23 23:32 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-23 19:53 [PATCHSET 0/2] xfs: fixes for 5.14.1 Darrick J. Wong
2021-11-23 19:53 ` [PATCH 1/2] libfrog: fix crc32c self test code on cross builds Darrick J. Wong
2021-11-23 23:32   ` Eric Sandeen [this message]
2021-11-23 19:53 ` [PATCH 2/2] libxfs: fix atomic64_t poorly for 32-bit architectures Darrick J. Wong
2021-11-24  2:21   ` Darrick J. Wong
2021-11-24 22:03   ` Eric Sandeen

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=2e68b35a-3c83-dacc-e9fa-a3770675c0f8@redhat.com \
    --to=esandeen@redhat.com \
    --cc=bage@debian.org \
    --cc=david@fromorbit.com \
    --cc=djwong@kernel.org \
    --cc=helmut@subdivi.de \
    --cc=linux-xfs@vger.kernel.org \
    --cc=sandeen@sandeen.net \
    /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).