From patchwork Tue Aug 3 12:07:14 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Fabrice Fontaine X-Patchwork-Id: 1512884 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::133; helo=smtp2.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=A/2r3tEf; dkim-atps=neutral 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 (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4GfDCD4Fmmz9sWS for ; Tue, 3 Aug 2021 22:07:36 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id 84AED4026B; Tue, 3 Aug 2021 12:07:33 +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 V_dXp_TE5XZ0; Tue, 3 Aug 2021 12:07:30 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp2.osuosl.org (Postfix) with ESMTP id B3B714020D; Tue, 3 Aug 2021 12:07:29 +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 486901BF29F for ; Tue, 3 Aug 2021 12:07:28 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 456ED606E9 for ; Tue, 3 Aug 2021 12:07:28 +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 u8bb2ONdBuOG for ; Tue, 3 Aug 2021 12:07:24 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.8.0 Received: from mail-wr1-x432.google.com (mail-wr1-x432.google.com [IPv6:2a00:1450:4864:20::432]) by smtp3.osuosl.org (Postfix) with ESMTPS id 9BAD560639 for ; Tue, 3 Aug 2021 12:07:24 +0000 (UTC) Received: by mail-wr1-x432.google.com with SMTP id c16so25034507wrp.13 for ; Tue, 03 Aug 2021 05:07:24 -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=VXGs+Zz/PRbRYBwASfFU4c3gu8XPMJoTFEJZU+lty1Y=; b=A/2r3tEfbZxunvsvft5wbJH3sS5yWwHpHQqUfw1VqUQdoWIDvZtnpeYeZovjVc1g0P l6EH8mXcWOKSIjfjYcpk4u7WDcn5rPqq2WBvs+qlxOstvb+ldJlDTVXMbtlLPikQ0LmD rbNADC0TIin8vgzzseHfIgRrHcUyvv+aD+kleVfcwk8v9P2ObHsw39k3WpUbqIMjoKqR SvXIGzGuKjgXgWcun+FTOHlbh3N9K1Lre2czyt26Fsryg+kTw1WSFwSvWeZMI8TMwaTv +qRf1ncSIvrl4ftH7PTWMlPf+Ge0KhGWK4UU916QfH+4ECylCEqAbqzJeFHRAn35LkGf DipA== 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=VXGs+Zz/PRbRYBwASfFU4c3gu8XPMJoTFEJZU+lty1Y=; b=pFYcDdy7slLY2pFhFGjYmyQN55k1NB/eIILF8YI6FLoQ7MIFcQXmggCpfmZ4brgj/p xxi737fJ6bNsQ0WkJvE2zdIFjpTOIwL/71j+b0oU7Fz9lnupEEI1fe0kNSCxkU5C8p/g Ry3EjsNvelGjMOZwoMVFGPEqX3JKhCwmySQlYN3Wa3IcU1b2OkHNaBQk0otqaTwSwsXf WPfAq3zkGFJvqf4+ALSDpEAa7+BWRFTAaXhecC9Oep3fAROKcZpBtFldS+lbhJg/AURj +xvKpDmqse6vpu6pDJOHczvxpqT7nDJwAVHsP9Ci0B62HrApN4lqCQUARt18z6bmgM+s D7rg== X-Gm-Message-State: AOAM5339FCxeNlGU3Ww8Nh+eu89J5lG6muaQbMin+RbjzD9wIbXbvYvM t8fDhXuR2hvtvNnrwH537CXk6EMmzP6Meg== X-Google-Smtp-Source: ABdhPJxA6tz/VJBKOC+xk9D4d9JUIRZbrlFdoaR36+PTCHGmYGnsqSjiJKEOcoa4cuyDgGSeACwjwg== X-Received: by 2002:adf:d219:: with SMTP id j25mr22981872wrh.82.1627992442213; Tue, 03 Aug 2021 05:07:22 -0700 (PDT) Received: from kali.home (pop.92-184-97-255.mobile.abo.orange.fr. [92.184.97.255]) by smtp.gmail.com with ESMTPSA id i5sm14015346wrw.13.2021.08.03.05.07.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Aug 2021 05:07:21 -0700 (PDT) From: Fabrice Fontaine To: buildroot@buildroot.org Date: Tue, 3 Aug 2021 14:07:14 +0200 Message-Id: <20210803120714.2797624-1-fontaine.fabrice@gmail.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Subject: [Buildroot] [PATCH v2, 1/1] package/gpsd: fix workaround for gcc bug 68485 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: Bernd Kuhls , Fabrice Fontaine Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Workaround for gcc bug 68485 doesn't work anymore since bump to version 3.21 in commit 5b3e72139952e0c953c8649cca55571cec5f3836 because CXXFLAGS is appended after CFLAGS and does not contain -O0: /tmp/instance-7/output-1/host/bin/microblazeel-linux-gcc -o rtcm2_json.os -c --sysroot=/tmp/instance-7/output-1/host/microblazeel-buildroot-linux-uclibc/sysroot -pthread -Wall -Wcast-align -Wextra -Wimplicit-fallthrough -Wmissing-declarations -Wmissing-prototypes -Wno-missing-field-initializers -Wno-uninitialized -Wpointer-arith -Wreturn-type -Wstrict-prototypes -Wvla -O0 -Os -g0 -pthread -fPIC -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -I/tmp/instance-7/output-1/host/microblazeel-buildroot-linux-uclibc/sysroot/usr/include/dbus-1.0 -I/tmp/instance-7/output-1/host/microblazeel-buildroot-linux-uclibc/sysroot/usr/lib/dbus-1.0/include rtcm2_json.c during RTL pass: reload rtcm2_json.c: In function ‘json_rtcm2_read’: rtcm2_json.c:267:1: internal compiler error: in gen_reg_rtx, at emit-rtl.c:1155 267 | } | ^ It should be noted that GPSD_CXXFLAGS was added 5 years ago with commit b4c050e9afed7a8dc302e6e1014cc4ffb508590d but was not really used since this commit. Fixes: - http://autobuild.buildroot.org/results/fab33f25b08fa218af91640fdbd8c0dcf1d07228 Signed-off-by: Fabrice Fontaine Reviewed-by: Giulio Benetti --- Changes v1 -> v2 (after review of Thomas Petazzoni): - Set -O0 in GPSD_CXXFLAGS instead of filtering out -Os package/gpsd/gpsd.mk | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/package/gpsd/gpsd.mk b/package/gpsd/gpsd.mk index 0fbb5dfa1d..45f6d35ef8 100644 --- a/package/gpsd/gpsd.mk +++ b/package/gpsd/gpsd.mk @@ -16,6 +16,7 @@ GPSD_DEPENDENCIES = host-python3 host-scons host-pkgconf GPSD_LDFLAGS = $(TARGET_LDFLAGS) GPSD_CFLAGS = $(TARGET_CFLAGS) +GPSD_CXXFLAGS = $(TARGET_CXXFLAGS) GPSD_SCONS_ENV = $(TARGET_CONFIGURE_OPTS) @@ -46,6 +47,7 @@ endif ifeq ($(BR2_TOOLCHAIN_HAS_GCC_BUG_68485),y) GPSD_CFLAGS += -O0 +GPSD_CXXFLAGS += -O0 endif # If libusb is available build it before so the package can use it @@ -203,7 +205,8 @@ endif GPSD_SCONS_ENV += \ LDFLAGS="$(GPSD_LDFLAGS)" \ CFLAGS="$(GPSD_CFLAGS)" \ - CCFLAGS="$(GPSD_CFLAGS)" + CCFLAGS="$(GPSD_CFLAGS)" \ + CXXFLAGS="$(GPSD_CXXFLAGS)" define GPSD_BUILD_CMDS (cd $(@D); \