Received: by 2002:a05:7412:e794:b0:fa:551:50a7 with SMTP id o20csp777823rdd; Tue, 9 Jan 2024 22:00:19 -0800 (PST) X-Google-Smtp-Source: AGHT+IGbL0fenKv924K0T7lAoYiYKtl4DqwXpt9st+PAm3hWQMDsRD5HnoBBUAmVyJs+cFukK6hm X-Received: by 2002:a05:6830:104a:b0:6dc:6702:6aa8 with SMTP id b10-20020a056830104a00b006dc67026aa8mr222357otp.33.1704866418792; Tue, 09 Jan 2024 22:00:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704866418; cv=none; d=google.com; s=arc-20160816; b=d0X7+CT7x6nhlmLpu9IPos7XvX2KjZfsbspcntLtbp2tjlwAkdMrlMbXhLCy0J48jD N30rMZ8o4U+oh/FElXZqWcxucbAKYLmn5gY/CWihSF14yt7Q24xs2W5NombsK44kzPVV ACS/QvLyKaqbsY82oYESx7vxp/MgXF6eIwdLrdc83EE/Q4XzaCzHIj01FD6U4C9sXP1l wtHXiVIF6mETWqsAoh3hrsyoWMNhNQdk1fl8Olzuww+fnJAHcVZjSo0Aj4HhZhM8Y5C9 ZyKB19iBH1/KaOWIu7hSYKTEpq2abnhbcFE8XknangaA0GQXTztqoClkSGHAdvPFk2fR pRaw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :dkim-signature; bh=kPeXYoAmCLYf1j8ahUbrM6AOYKYmAzDrbvQF6GEOMok=; fh=a/vmL6y1hAdZHDfAFxjnfhM0W5oIvmLCCNQgoFXVbZ4=; b=VUHjF8xwkKILr3JdAq/W9WCfcHdy/j9OhMocECHjXW1ZpcHOOlz6dJ7u6XVUoo8tJE XpNzums/lii/YDmhADJPpNkF4WQ6DklvCMI/rSsUEWtzmnUnStw/SkdaqCRcbUZXzie0 RMGXPBJ/ezRbhd4ZVL10HbetLqJCJldEWSMpJcVZLD3Ib+Sg5eqSEuNFjEJoST1YpSuP UMM2K8Yx73/1ZpZhH+d7kWnaKzun3q8g1OybKHkpo/RqHjyn40y/rSQa2kCfedIGAeXQ 4EA6juVM0UrMKPNJAr3NV38JL+YxLkTd2ii7QBnmthqAgTzPv9wgI6URIa/k8vVBhEMx wD8Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=eloBkqhq; spf=pass (google.com: domain of linux-kernel+bounces-21736-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-21736-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id n187-20020a6327c4000000b005acb3613ba9si2858204pgn.432.2024.01.09.22.00.18 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Jan 2024 22:00:18 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-21736-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=eloBkqhq; spf=pass (google.com: domain of linux-kernel+bounces-21736-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-21736-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 816AC2817D8 for ; Wed, 10 Jan 2024 06:00:14 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8F1A32A1D3; Wed, 10 Jan 2024 06:00:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="eloBkqhq" Received: from mail-wr1-f46.google.com (mail-wr1-f46.google.com [209.85.221.46]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4FFA62F37 for ; Wed, 10 Jan 2024 06:00:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-wr1-f46.google.com with SMTP id ffacd0b85a97d-336c8ab0b20so3461759f8f.1 for ; Tue, 09 Jan 2024 22:00:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1704866405; x=1705471205; darn=vger.kernel.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=kPeXYoAmCLYf1j8ahUbrM6AOYKYmAzDrbvQF6GEOMok=; b=eloBkqhqW+5Upu0ryviMYl5V2rwTI1PwBJwdcpTjXdoHjGzzmenuUdE/VnJ6++gpDA tIJBQvIeGdX/n/K5Zy+JjkQTIxR7OCHKmvyw87WsdBWs3W/Scm+OQXS67bdWS7mc3Mou s9a4NU60aDbObZi+JJb+277Lz98KM4Up5kKyFtQ3NezhEY3EPTVKa12sO/AdK5mcUis2 eIolvCIY2tujxszRmGuVBrKwIjU1ANa5xoCMqhFFXpxWKamht9MKgkJZAFtgQOrPXTp6 dYI1aHQkJ1feFSasecRQwFHN+C7daXvDQsQDAbE65GHbTtjgocbQTPsuzYyd+ITKJFbT MNzg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704866405; x=1705471205; h=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=kPeXYoAmCLYf1j8ahUbrM6AOYKYmAzDrbvQF6GEOMok=; b=AL2D0hGDl8xMGsiczNulvPhWg+QkD8hbqfuqWOwp+jcjKrvjDEPGqOoFvy0HGepY/4 UvIyvdsQ27fTCfNcS+4ng2IW+P2rTvSy3BYdhD36JplKyJ4/ki8cD5nMrBDBm5syZrxi c8X8SHyBVhBtf7oNFQWK/NmvZ+ZDSJkHOswro4vvFDjtD9zcqKnIAqpHt7ekH9gqb4l8 AcQaoN2gFwltL+9yP6Xlt4GMpyyY8j5aypUloyd5hdIAQXMzcXYabShXzC61znUk0zFH dPVitxj7f7xzpNgrKWPsRdlRyyVojHvNh8e9+35w8WxgnTWsAMLJaekt4hIOlMcbf2oJ jZlw== X-Gm-Message-State: AOJu0YwaTfR3jhboimn/2zSyKVz1kU0/m759MAFI2uAU8bs8orwEu2oS TbgMTCoO1OMymrw0KdSIlrC/TazFRnWVYJyQocu6EN2eAxk= X-Received: by 2002:a5d:4602:0:b0:337:61b1:68d4 with SMTP id t2-20020a5d4602000000b0033761b168d4mr219120wrq.35.1704866405170; Tue, 09 Jan 2024 22:00:05 -0800 (PST) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <9aef98eed96ed32962ce90499291cb30ad5e3e14.camel@xry111.site> <20240109074843.GI19790@gate.crashing.org> <4ee8067e72028b070d92e10fa33ddde3a498cb48.camel@xry111.site> <20240109082647.GJ19790@gate.crashing.org> In-Reply-To: <20240109082647.GJ19790@gate.crashing.org> From: richard clark Date: Wed, 10 Jan 2024 13:59:53 +0800 Message-ID: Subject: Re: undefined reference to `__aarch64_cas4_sync' error on arm64 native build To: Segher Boessenkool Cc: Xi Ruoyao , Mark Rutland , gcc-help@gcc.gnu.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="UTF-8" Hi Segher, A ported driver in linux kernel calls '__sync_val_compare_and_swap', the cross-compiler 'aarch64-linux-gnu-gcc' doesn't complain '__aarch64_cas1_sync' undefined reference, but the native compiler will complain. As Mark mentioned, I double check that both cross and native compiler should have ''-moutline-atomics' option enabled, do you know the reason for that?