From patchwork Thu May 13 11:46:33 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabrice Fontaine X-Patchwork-Id: 1478039 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=2605:bc80:3010::136; helo=smtp3.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) 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=dQjM6Y15; dkim-atps=neutral Received: from smtp3.osuosl.org (smtp3.osuosl.org [IPv6:2605:bc80:3010::136]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4FgqdJ6rcLz9sWP for ; Thu, 13 May 2021 21:46:58 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id CA8176063E; Thu, 13 May 2021 11:46:51 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org 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 LCSjik0rRSM2; Thu, 13 May 2021 11:46:47 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp3.osuosl.org (Postfix) with ESMTP id AC2DE6070D; Thu, 13 May 2021 11:46:46 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from smtp2.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id 532F31BF408 for ; Thu, 13 May 2021 11:46:45 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id 41CEB401C3 for ; Thu, 13 May 2021 11:46:45 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Authentication-Results: smtp2.osuosl.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com 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 K5wCJSYWfzer for ; Thu, 13 May 2021 11:46:44 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.8.0 Received: from mail-wm1-x330.google.com (mail-wm1-x330.google.com [IPv6:2a00:1450:4864:20::330]) by smtp2.osuosl.org (Postfix) with ESMTPS id 2DCE640385 for ; Thu, 13 May 2021 11:46:44 +0000 (UTC) Received: by mail-wm1-x330.google.com with SMTP id s82so14442389wmf.3 for ; Thu, 13 May 2021 04:46:44 -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=DnkolomdjLK092R2MsDvJ4/pb47xBQy4LfEqd28Fc3s=; b=dQjM6Y15cRQhv9GsarB3X1n5yTtllsE9VeZFroKBQWWMnsXOaurGLM7SjyFAOxseF3 /WQ39cAkQmYSaVeetR46EIPX4lvy9u9kzjZkT7LNtWuYPPZuu95ywu4Id0b/wJE+AiDk mxcfPuRAporkmi0K6w2mjNDUvfBfMRDQCWWLV5bfhM0ICRVJJEiWdAcxeAVQymWO4+vK fMZPAN+S4Gmg7o1AvH5vcDHLrScg1ZTItAqGF85JHohBo++XURHshsM7BHkIScnLA6Fo tzZP5lJSYjmqOHUJykCugKcLAZQ6shT2OjNi3Cwt+yW7bJVBU48UIN8gZgVfWKyauYyk XVFw== 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=DnkolomdjLK092R2MsDvJ4/pb47xBQy4LfEqd28Fc3s=; b=XDryt4iO4/WcJHFBeFq+6jZNPfEqyd3ohpdE7OZwbhPSsZI2k5aium/9rJj01NIcIn eNiPukKhWYTiNpGDCPLg8Z8rpD3g6svvqE2VwNOUVdDlLZF8u5poHnjP8MSXwQX3fkDv wJgLWdWuQz6VbbVYPm7nS//3+A4HWHVHe+4o49LJRvtLJJDMttTenW/q3R13sfqnji/L Mw+pocBJOFBLY+4iYhj8gjsTrvKq5oQmrAu7n+I4DLHYdvKdPZ9EUfuvwL+JGO729bqN AFEVf7fGq5j2CmwrhV3TCT2nl8DY0Un5AnKpdURMmSscaO2XqaSuKc/0FNsk9nT3tdo2 Rv6A== X-Gm-Message-State: AOAM533dx1FMUHMMGC+BJ78iZNGA7fOWmSqybiHXC9c/r5etd7wKbICx m2om4+1VCXAYaz5kutd5ABtmn8BeuSYzVQ== X-Google-Smtp-Source: ABdhPJwaG8tUGeRS0UaKeRtXZxZ58SaUSJFLDHlf92xgoZ8FaC2lABWedOBSGAVDatDhJCO8JDYn2g== X-Received: by 2002:a1c:7205:: with SMTP id n5mr3430842wmc.131.1620906402126; Thu, 13 May 2021 04:46:42 -0700 (PDT) Received: from kali.home (lfbn-ren-1-1383-171.w86-229.abo.wanadoo.fr. [86.229.230.171]) by smtp.gmail.com with ESMTPSA id s83sm2044485wms.16.2021.05.13.04.46.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 May 2021 04:46:41 -0700 (PDT) From: Fabrice Fontaine To: buildroot@buildroot.org Date: Thu, 13 May 2021 13:46:33 +0200 Message-Id: <20210513114633.1926431-1-fontaine.fabrice@gmail.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Subject: [Buildroot] [PATCH 1/1] package/gerbera: fix build with -Os and gcc 9 or 10 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: Fabrice Fontaine Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" For an unknown reason, gerbera fails to build with -Os and gcc 9 or 10 since bump to version 1.8.0 in commit 8974596836945eada8e162844fb87f88adec9100: [100%] Linking CXX executable gerbera /home/giuliobenetti/autobuild/run/instance-3/output-1/host/opt/ext-toolchain/bin/../lib/gcc/x86_64-buildroot-linux-gnu/10.2.0/../../../../x86_64-buildroot-linux-gnu/bin/ld: liblibgerbera.a(content_manager.cc.o): in function `ContentManager::_rescanDirectory(std::shared_ptr&, int, std::shared_ptr const&)': content_manager.cc:(.text+0xb53b): undefined reference to `std::__shared_ptr::swap(std::__shared_ptr&)' collect2: error: ld returned 1 exit status A similar build failure has been reported as gcc bug 91067: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91067 But this bug has been fixed since gcc 9.3 and 10.1 and build failures are raised with gcc 10.2 To fix this build failure, set optimisation to -O2 if needed Fixes: - http://autobuild.buildroot.org/results/a4ee8ad7ff93939716673b611c7cc3f68dafa3d0 Signed-off-by: Fabrice Fontaine --- package/gerbera/gerbera.mk | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/package/gerbera/gerbera.mk b/package/gerbera/gerbera.mk index 73917c7721..9627209d60 100644 --- a/package/gerbera/gerbera.mk +++ b/package/gerbera/gerbera.mk @@ -18,6 +18,10 @@ GERBERA_DEPENDENCIES = \ zlib GERBERA_CONF_OPTS = -DWITH_DEBUG=OFF +ifeq ($(BR2_TOOLCHAIN_GCC_AT_LEAST_9)$(BR2_OPTIMIZE_S),yy) +GERBERA_CONF_OPTS += -DCMAKE_CXX_FLAGS="$(TARGET_CXXFLAGS) -O2" +endif + # Uses __atomic_fetch_add_4 ifeq ($(BR2_TOOLCHAIN_HAS_LIBATOMIC),y) GERBERA_CONF_OPTS += -DCMAKE_EXE_LINKER_FLAGS=-latomic