From patchwork Fri Sep 25 09:04:51 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Romain Naour X-Patchwork-Id: 1371101 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=busybox.net (client-ip=140.211.166.136; helo=silver.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: 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=20161025 header.b=oBOyuu8l; dkim-atps=neutral Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4ByQwd4JpFz9s1t for ; Fri, 25 Sep 2020 19:05:05 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 53F082038A; Fri, 25 Sep 2020 09:05:03 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id GYjkimhknfMx; Fri, 25 Sep 2020 09:05:00 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id B6A8A2040F; Fri, 25 Sep 2020 09:05:00 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id 412C01BF2A9 for ; Fri, 25 Sep 2020 09:04:59 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 36A6A2040F for ; Fri, 25 Sep 2020 09:04:59 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id qpE4MJ+njvQ1 for ; Fri, 25 Sep 2020 09:04:56 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wr1-f68.google.com (mail-wr1-f68.google.com [209.85.221.68]) by silver.osuosl.org (Postfix) with ESMTPS id E36112038A for ; Fri, 25 Sep 2020 09:04:55 +0000 (UTC) Received: by mail-wr1-f68.google.com with SMTP id z4so2744060wrr.4 for ; Fri, 25 Sep 2020 02:04:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=3OnG0z6BwPR8lffyxE4kp+506OwCwu2JBQn59O181wc=; b=oBOyuu8lcJ4yuxJTUm7e0gOudOWzT+YXvCMDAJ93Te7gGh2uF77akS4RPFyXaMUxPm NQyJTDjVWxNCgZ5nQtuFkoOTJKTUmWTmTjL9gF6+sfh2Xlu1vbiUzGZojA5BqzlUTOIk sw/1gfuAOnnxEcR+BamHQYzpLuNMbv69puO8pPl7Dx0W7pZNMqm2lbjvIIvLbBCBr8/f eJ0O5mCFs3mAQ5TJclYo87e543aAVbQym6Rap+28YXOejtzWr/ih0oPPA855RWoXQuiK rq2oqcrYZv715AY92QL4KnLQu0WRvqtr0hrrde4pQpzqMEd6fB+nBu2j+oNh1OBBWoh5 0GJQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=3OnG0z6BwPR8lffyxE4kp+506OwCwu2JBQn59O181wc=; b=B2HadcV90G76iT3j13s+kw7rmEeBpLH6l4xunHVgDTTUS4GaWzlN5BAtxbyjH4mKgW uLa4FdtdtcSsXhCGwCrDjDM+rOvvAALTQ1R9tKU4jzbWxTGE/FmWYqxOicNOF8taejhk wHFMBJwQMNjh30AXYCgnVrVhQlEBoBISjWf/E4Z9DY9Bs/cnJHY5/teF1gNDhj33K29g iNhF+kqFEJKDwhJ1J6Tt0QcjhFCrqWbptJf0ni9HwRWLI407x3OHpkzmIwXw94E/wsNo X7KMkt9Um+MVb/xb6+hfQizVjhwKwUUvmy5Ngej0rodFg2tsNG2C47kzJju3tkn3PKkw kqnA== X-Gm-Message-State: AOAM53223N8yqEZKzu9V1zW1ICe7yTyopICfY78d8mjXJ1G3HdQObCyI P5q3rfE1oPk/zm20X55T8lD5SRiAxNI= X-Google-Smtp-Source: ABdhPJzDLrKtJmkHwGX4Bkku7b3P39gizmafe0+ufZ3zi72U52+KH+XkAGIlvaMaRIk0zztOUUt9Ow== X-Received: by 2002:a5d:568d:: with SMTP id f13mr3280559wrv.303.1601024694097; Fri, 25 Sep 2020 02:04:54 -0700 (PDT) Received: from localhost.localdomain (2a01cb058f8a18003dbee9eed79eb521.ipv6.abo.wanadoo.fr. [2a01:cb05:8f8a:1800:3dbe:e9ee:d79e:b521]) by smtp.gmail.com with ESMTPSA id 63sm2502744wrc.63.2020.09.25.02.04.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Sep 2020 02:04:53 -0700 (PDT) From: Romain Naour To: buildroot@buildroot.org Date: Fri, 25 Sep 2020 11:04:51 +0200 Message-Id: <20200925090451.1407258-1-romain.naour@gmail.com> X-Mailer: git-send-email 2.25.4 MIME-Version: 1.0 Subject: [Buildroot] [PATCH] package/gcc: help libbacktrace detection of sync builtins X-BeenThere: buildroot@busybox.net 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 , Thomas Petazzoni Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" From: Thomas Petazzoni 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 __sync builtins, so help the configure script a bit. "libbacktrace_cv_sys_sync=no" is lost when it is added to HOST_GCC_COMMON_CONF_ENV because the environment is not exported when executing the libbacktrace configure script. Use target_configargs to force "libbacktrace_cv_sys_sync=no" when executiong the libbacktrace configure script. Fixes: https://gitlab.com/bootlin/toolchains-builder/-/jobs/729359681 Signed-off-by: Thomas Petazzoni [Romain: use target_configargs="libbacktrace_cv_sys_sync=no"] Signed-off-by: Romain Naour --- package/gcc/gcc.mk | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/package/gcc/gcc.mk b/package/gcc/gcc.mk index b834269adc..6e60ea9980 100644 --- a/package/gcc/gcc.mk +++ b/package/gcc/gcc.mk @@ -141,6 +141,14 @@ ifeq ($(BR2_sparc)$(BR2_sparc64),y) 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 +# __sync builtins, so help the configure script a bit. +ifeq ($(BR2_TOOLCHAIN_HAS_SYNC_4),) +HOST_GCC_COMMON_CONF_ENV += target_configargs="libbacktrace_cv_sys_sync=no" +endif + # TLS support is not needed on uClibc/no-thread and # uClibc/linux-threads, otherwise, for all other situations (glibc, # musl and uClibc/NPTL), we need it.