From patchwork Sun May 29 13:18:03 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Romain Naour X-Patchwork-Id: 1636672 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20210112 header.b=d/0Yy5x0; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=buildroot.org (client-ip=2605:bc80:3010::133; helo=smtp2.osuosl.org; envelope-from=buildroot-bounces@buildroot.org; receiver=) Received: from smtp2.osuosl.org (smtp2.osuosl.org [IPv6:2605:bc80:3010::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4L9zdk4dsBz9sBB for ; Sun, 29 May 2022 23:19:06 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id 3522D40B38; Sun, 29 May 2022 13:19:04 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ng-Gf4nELygX; Sun, 29 May 2022 13:19:03 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp2.osuosl.org (Postfix) with ESMTP id 1D0AF40BD6; Sun, 29 May 2022 13:19:02 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id 7606B1BF969 for ; Sun, 29 May 2022 13:18:27 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 735E461100 for ; Sun, 29 May 2022 13:18:27 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Authentication-Results: smtp3.osuosl.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id grBPVMb1SLri for ; Sun, 29 May 2022 13:18:23 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.8.0 Received: from mail-wr1-x433.google.com (mail-wr1-x433.google.com [IPv6:2a00:1450:4864:20::433]) by smtp3.osuosl.org (Postfix) with ESMTPS id 5EB1B60F08 for ; Sun, 29 May 2022 13:18:23 +0000 (UTC) Received: by mail-wr1-x433.google.com with SMTP id k16so7133282wrg.7 for ; Sun, 29 May 2022 06:18:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=XqsN3C4F0QpxMIra+6Qeg1nthpYjZXfae0IsDKoivB0=; b=d/0Yy5x0VH5RflYeIX7oj2AVYAHAR6SyLDyeQECQbpxSdWK40ruiix/qKVe6BRG0So CDcYhMn/ubl3T/QO7RjTBXahWEhQW71duZnT+znW3lpHv0IpOGXVuTs2USfyNMqDdpvU 4ZQmBGJ0jUkojOgesU9StTga3s9W1//NAtqc5NIxL+1ioAGAXMDJE9wfUU2J+0SaJDAK nvkTWaEkJR4hTDEa0LABOMzu8zImtp/imr/Ae80N82lfK5ZMy7fL0GzD82hayJ7EDh5c 0ikDPeceEamedu9G9P2HL2k4O+PBYFdh2hmXQaMG1uCpLwxRCLBuc13TmNk5ewyXN0iX stdQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=XqsN3C4F0QpxMIra+6Qeg1nthpYjZXfae0IsDKoivB0=; b=zO1hWN/lpjhtbeUsTeislzYvJ69i/TuGaihITNKTsut127C8IvyTKxCNWiSpcdPEQ5 CyhbHFtGdlsrmIrphFbHOs9IIXLq7q2iakqb+6cVm0EGVjdDuXvzMRdH9dg47EtOawS0 idbAqG17+xSn1KUTPpPLqK9t1LrTl32ZHmgPFr5nW52emHbCHIbgYsyqJP7wghSp/hpe HQHO9o846XJvxmpzOSeYw5aW3VH1q8xAnZHmBXP+ByvarIeMemNtHPxy+Bkv0ij76bdT lOJKxHw0Ovprv0b8CUkYg4geifjHksSEssNsNlOAv+TIm+siZeVJKUQKvIJIy0iDdM4u tjuA== X-Gm-Message-State: AOAM530HduKEsX2ihbhqiTYKQUUrRPLtt5H8TjRzCabTkCIKIXK0krVS zghqegQolIDosE9/nGy6Q0rUtZAv9Ww= X-Google-Smtp-Source: ABdhPJyNwf/onAeEMIX8SQtd6BccsmVJGx1IIbhKlj4SD1S8Y5MshsG4hpNOVIkcSkN9DUH4rLlG/A== X-Received: by 2002:a5d:4ccc:0:b0:210:179c:e503 with SMTP id c12-20020a5d4ccc000000b00210179ce503mr10141851wrt.151.1653830301613; Sun, 29 May 2022 06:18:21 -0700 (PDT) Received: from atlas.home (2a01cb058f8a18003dbee9eed79eb521.ipv6.abo.wanadoo.fr. [2a01:cb05:8f8a:1800:3dbe:e9ee:d79e:b521]) by smtp.gmail.com with ESMTPSA id d15-20020a05600c34cf00b003949dbc3790sm7492562wmq.18.2022.05.29.06.18.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 29 May 2022 06:18:21 -0700 (PDT) From: Romain Naour To: buildroot@buildroot.org Date: Sun, 29 May 2022 15:18:03 +0200 Message-Id: <20220529131811.481017-3-romain.naour@gmail.com> X-Mailer: git-send-email 2.35.3 In-Reply-To: <20220529131811.481017-1-romain.naour@gmail.com> References: <20220529131811.481017-1-romain.naour@gmail.com> MIME-Version: 1.0 Subject: [Buildroot] [PATCH for-next 03/11] package/gcc: disable libsanitizer for mips64{el} w/ n32 ABI X-BeenThere: buildroot@buildroot.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Romain Naour Errors-To: buildroot-bounces@buildroot.org Sender: "buildroot" libsanitizer has been enabled for mips64{el} in gcc 12 [1] but it fail to build when n32 ABI is used: In file included from output/mips64el-buildroot-linux-gnu/sysroot/usr/include/bits/stat.h:25, from output/mips64el-buildroot-linux-gnu/sysroot/usr/include/fcntl.h:78, from ../../../../libsanitizer/sanitizer_common/sanitizer_linux.cpp:55: output/mips64el-buildroot-linux-gnu/sysroot/usr/include/bits/struct_stat.h:190:8: error: redefinition of ‘struct stat64’ 190 | struct stat64 | ^~~~~~ In file included from ../../../../libsanitizer/sanitizer_common/sanitizer_linux.cpp:49: output/mips64el-buildroot-linux-gnu/sysroot/usr/include/asm/stat.h:52:8: note: previous definition of ‘struct stat64’ 52 | struct stat64 { | ^~~~~~ Disable libsanitizer for mips64 with n32 ABI. Note: Only glibc toolchains are affected since libsanitizer is disabled for musl and uClibc-ng toolchains [2]. Fixes: https://gitlab.com/kubu93/toolchains-builder/-/jobs/2510178651 [1] https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff;h=344e6f9f2abcff9b2bb4b26b693be4a599272f43 [2] https://git.buildroot.net/buildroot/commit/?id=5f4d658d888b539de9a6247ae5b1a0999de5d4ec Signed-off-by: Romain Naour --- package/gcc/gcc.mk | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/package/gcc/gcc.mk b/package/gcc/gcc.mk index b940327c83..e1f3935e56 100644 --- a/package/gcc/gcc.mk +++ b/package/gcc/gcc.mk @@ -138,6 +138,13 @@ ifeq ($(BR2_sparc)$(BR2_sparc64),y) HOST_GCC_COMMON_CONF_OPTS += --disable-libsanitizer endif +# libsanitizer is available for mips64{el} since gcc 12 but fail to build +# with n32 ABI due to struct stat64 definition clash due to mixing +# kernel and user headers. +ifeq ($(BR2_mips64)$(BR2_mips64el)$(BR2_MIPS_NABI32),yy) +HOST_GCC_COMMON_CONF_OPTS += --disable-libsanitizer +endif + # The logic in libbacktrace/configure.ac to detect if __sync builtins # are available assumes they are as soon as target_subdir is not # empty, i.e when cross-compiling. However, some platforms do not have