From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qk1-x72b.google.com (mail-qk1-x72b.google.com [IPv6:2607:f8b0:4864:20::72b]) by sourceware.org (Postfix) with ESMTPS id 63B1B3858D32 for ; Mon, 15 Apr 2024 20:06:05 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 63B1B3858D32 Authentication-Results: sourceware.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=google.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 63B1B3858D32 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::72b ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1713211567; cv=none; b=Dwcx59sjiiu/ECzSzQN6M2KXaTKJCcmWGJaAYcpbig1W2gG8BBxd+pLR9Hn9hTxGRHpBSCYr217JgZNYBAp5ck6a06mwwrfjeUdSlhrLTvCCR3kFtouw6cc9hHd5d6/p4OMz9EN9fob3rX2vv+5rlzeUA+Uez4elyM0Te2R+Sp0= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1713211567; c=relaxed/simple; bh=hEdTW144aqU+eR+1Fjehv6b8jnvRytEYUhOIKHmU0/s=; h=DKIM-Signature:MIME-Version:From:Date:Message-ID:Subject:To; b=xv1JYWRAS5nd/W+CYKy4GQFntNmjKKge0Zk7A0SFvxu6ev2UId3M5HuRdp4UHDuC10LVQEaIhTgc3eLkDxSfYzfJT8PCd78AKHjr2kVWFWcAC/n+OfyQmlfxofhOhqfvWGqGisF6iyguIwDvgtK2DPXgVbzGKzol+opvfUWd/4U= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-qk1-x72b.google.com with SMTP id af79cd13be357-78d57bd5781so267242085a.3 for ; Mon, 15 Apr 2024 13:06:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1713211564; x=1713816364; darn=sourceware.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=IZiZxd2niSkX1yO0uZ+MPEYo8uolQ99m4jFmrZzP0zM=; b=N+UBXFedLd/33sWzJrd8xj85KHS83+veJnE2M2yoB7jsNZMAqJsGw1GvsB2hhA/fm7 Vt25cMVQTKWPBv1kV6Bc3HDN4GgMihi4biR7uUKkVV3Ld+qYD0XlsZapXZ/83fHcYs1Q IaLuJQ0bQDYhG2secGJrM9X3J0hjAqtqMPXG/BzCFlITZ9mFnqcXzzACrQOOHmH5rGEc 7juQFbmzx4TTwO/YJO3BLu/na6pnoxfzTNZoBetdgmZ++EtEvbBqlKNrNNd4ltH5j9Q0 8WX6CzJptQ+8uLLHz2f6DKDRgW9x6CMoCnFXYBTExxc6YdONJNFkuGm2p2IMIs1EeZkL vvVg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713211565; x=1713816365; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=IZiZxd2niSkX1yO0uZ+MPEYo8uolQ99m4jFmrZzP0zM=; b=ChgicATnC+RmnDkpHfl4mYnJcpNL3pb2cBLGFS9h8k7rsaoWRBcM82Kg1vPmkVYi0i IJBClmoJDcuD0osVAMXa3myVkuCmsvQD2bAwAO09MFJusvOKKMK31AUD1k+Hba+lCd5r +ApNhzDBjAne14u2i7ZRRkfl/Z0KEbLp+JJNe0AvMPexi5ddCKbEcp5RbiRZzq72ED2N sAM4+84kyn++a66Dw56CpoaiKD6t3JiSXElgQ+7LEQww8fp/IJpDVDMqiDeI52JFpHEx Y9rY3MoMg+vE6As+TsZ/4ImHXHxeHAdCctYeN20FkzOoxHkhWnPuehP47YZ0Tg6fadPM AH2w== X-Gm-Message-State: AOJu0Yxepg1mi+SfsPVdO6zzTQap58zqA8rAhh+zcwhjaHd5JiX4gGPD EkXjnGAbblvwFM96FQnWsgMqi2P0GeL3B2tYIwF5L+iWfiUNVfTnwzbdq3VQEbGD3ubhcTn1+Jo w3X0tMVOcTu+sBvAE5RzcWUkcX4uJ7fz1yKzr8/5OiRlHUDyz5Eky X-Google-Smtp-Source: AGHT+IHF/3CKYaSs7f6swvoMIkNSqgNgvtQtqsx/u9aqXPbfMQVvwlWXMpYUy9Yyf2FQ6cNwowVao4Q55opzrTly8jM= X-Received: by 2002:a05:6214:852:b0:699:101f:c86 with SMTP id dg18-20020a056214085200b00699101f0c86mr11683950qvb.25.1713211564437; Mon, 15 Apr 2024 13:06:04 -0700 (PDT) MIME-Version: 1.0 References: <20240415192414.14155-2-palmer@rivosinc.com> In-Reply-To: <20240415192414.14155-2-palmer@rivosinc.com> From: enh Date: Mon, 15 Apr 2024 13:05:53 -0700 Message-ID: Subject: Re: [RFC] build-many-glibcs: Add a rv64gcbv-on-rv64gc/lp64d sub-variant To: Palmer Dabbelt Cc: libc-alpha@sourceware.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-23.9 required=5.0 tests=BAYES_00,DKIMWL_WL_MED,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,ENV_AND_HDR_SPF_MATCH,GIT_PATCH_0,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP,USER_IN_DEF_DKIM_WL,USER_IN_DEF_SPF_WL autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On Mon, Apr 15, 2024 at 12:27=E2=80=AFPM Palmer Dabbelt wrote: > > Signed-off-by: Palmer Dabbelt > --- > So this is very much an RFC. I had written a commit message as > > This will hopefully be a widely used configuration in the future, but > it's not all that common right now. That said, let's be proactive an= d > at start testing it. > > but I even that's kind of a strong statement here so I'm just stashing > it off to the side to be sure. > > A few of us were talking about the GCC meeting last week, but I figured > I'd send a glibc patch to at least start some discussion on the lists as > something similar had come up in the TLSDESC thread and a while ago when > we talked about glibc-hwcaps. > > I'm not really sure what the right thing to do here is: we don't have > broadly available hardware that supports these new extensions, but > they're pretty much table stakes for hardware that's competitive with > arm64/x86. Without B and V we're going to end up piling up a ton of > IFUNC-based routines to try and work around the base ISA, but those > extensions are so fundamental to good codegen that it doesn't feel like > we're going to get where we want with just IFUNCs. > > Unfortunately I don't think we can drop support for the other base ISAs: > the distros appear to be targeting rv64gc and that's the only common > base for most hardware that's out there. I guess we could drop support > for the rv*ima-based base ISAs, but I'm not sure that buys us much: > we've got a lot of embedded users so we won't be able to drop the GCC > support for soft float, and dropping the glibc support puts us in a > clunky spot for testing. > > So we're probably stuck in a bit of a performance hole for a while. > That said, we could at least put a stake in the ground and start testing > some target with some newer extensions. That way distros that want to > try a larger base than rv64gc have something that's getting tested and > is thus likely to work. For GCC we ended up adding some test targets > with pretty much all the non-embedded, but at least B and V seem like > the bare minimum. > > I'm not sure if all that is worth the extra build/test resource burden > for everyone, though, particularly given the lack of hardware. for Android -- which is in a similar situation -- having the build system enable these extensions been pretty useful for finding toolchain and qemu bugs, which seems useful in its own right, if only for CI purposes... > --- > scripts/build-many-glibcs.py | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/scripts/build-many-glibcs.py b/scripts/build-many-glibcs.py > index ecc743e672..21da46dc4a 100755 > --- a/scripts/build-many-glibcs.py > +++ b/scripts/build-many-glibcs.py > @@ -411,7 +411,9 @@ class Context(object): > os_name=3D'linux-gnu', > variant=3D'rv64imafdc-lp64d', > gcc_cfg=3D['--with-arch=3Drv64imafdc', '--with-a= bi=3Dlp64d', > - '--disable-multilib']) > + '--disable-multilib']), > + extra_glibcs=3D[{'variant': 'rv64gcbv-rv64gc-lp6= 4d', > + 'ccopts': '-march=3Drv64gcv_zba_z= bb_zbs'}] > self.add_config(arch=3D's390x', > os_name=3D'linux-gnu', > glibcs=3D[{}, > -- > 2.44.0 >