From patchwork Thu Jul 2 10:14:15 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexey Brodkin X-Patchwork-Id: 490561 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ozlabs.org (Postfix) with ESMTP id 0CF6414029E for ; Thu, 2 Jul 2015 20:14:27 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id C398F923D7; Thu, 2 Jul 2015 10:14:25 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id A9+QHx9GYWkn; Thu, 2 Jul 2015 10:14:24 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id CE96C923C6; Thu, 2 Jul 2015 10:14:23 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 160351C1083 for ; Thu, 2 Jul 2015 10:14:22 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 11B34923C5 for ; Thu, 2 Jul 2015 10:14:22 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 9QA2eTxKN5Mw for ; Thu, 2 Jul 2015 10:14:21 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from smtprelay.synopsys.com (smtprelay4.synopsys.com [198.182.47.9]) by whitealder.osuosl.org (Postfix) with ESMTPS id 12A5C923C6 for ; Thu, 2 Jul 2015 10:14:21 +0000 (UTC) Received: from dc8secmta1.synopsys.com (dc8secmta1.synopsys.com [10.13.218.200]) by smtprelay.synopsys.com (Postfix) with ESMTP id 85A9824E0FFE; Thu, 2 Jul 2015 03:14:20 -0700 (PDT) Received: from dc8secmta1.internal.synopsys.com (dc8secmta1.internal.synopsys.com [127.0.0.1]) by dc8secmta1.internal.synopsys.com (Service) with ESMTP id 79D3527113; Thu, 2 Jul 2015 03:14:20 -0700 (PDT) Received: from mailhost.synopsys.com (unknown [10.13.184.66]) by dc8secmta1.internal.synopsys.com (Service) with ESMTP id 5393B27102; Thu, 2 Jul 2015 03:14:20 -0700 (PDT) Received: from mailhost.synopsys.com (localhost [127.0.0.1]) by mailhost.synopsys.com (Postfix) with ESMTP id 44C9CE39; Thu, 2 Jul 2015 03:14:20 -0700 (PDT) Received: from abrodkin-e7440l.internal.synopsys.com (abrodkin-e7440l.internal.synopsys.com [10.121.8.55]) by mailhost.synopsys.com (Postfix) with ESMTP id 13814E32; Thu, 2 Jul 2015 03:14:18 -0700 (PDT) From: Alexey Brodkin To: buildroot@busybox.net Date: Thu, 2 Jul 2015 13:14:15 +0300 Message-Id: <1435832055-11204-1-git-send-email-abrodkin@synopsys.com> X-Mailer: git-send-email 2.4.3 Cc: Thomas Petazzoni , Alexey Brodkin Subject: [Buildroot] [PATCH] tor: fix building if GCC's C standard is not gnu99 X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Up to date tor (at least starting from 0.2.6) requires compiler with C99 plus some extensions support. If default GCC's C standard < c99 (that's the case at least for ARC) you'll see this on attempt to build tor: ----------------------->8-------------------- src/common/address.c: In function ''tor_addr_parse_PTR_name': src/common/address.c:502:5: error: 'for' loop initial declarations are only allowed in C99 mode for (int i = 0; i < 16; ++i) { ^ src/common/address.c:502:5: note: use option -std=c99 or -std=gnu99 to compile your code ----------------------->8-------------------- Once you follow compiler advice and enable c99 support with "-std=c99" you'll pass that failure but will see tons of other errors, see https://www.mail-archive.com/tor-dev@lists.torproject.org/msg06273.html And only g99 resolves all problems at once. Signed-off-by: Alexey Brodkin Cc: Thomas Petazzoni Cc: Vicente Olivert Riera --- package/tor/tor.mk | 2 ++ 1 file changed, 2 insertions(+) diff --git a/package/tor/tor.mk b/package/tor/tor.mk index 9cca011..f6d3b7f 100644 --- a/package/tor/tor.mk +++ b/package/tor/tor.mk @@ -32,4 +32,6 @@ else TOR_CONF_OPTS += --disable-seccomp endif +TOR_CONF_ENV = ac_cv_prog_cc_c99='-std=gnu99' + $(eval $(autotools-package))