From owner-freebsd-ports@freebsd.org Thu Apr 14 00:21:48 2016 Return-Path: Delivered-To: freebsd-ports@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7B724B0F7BD for ; Thu, 14 Apr 2016 00:21:48 +0000 (UTC) (envelope-from ben.wiederhake@gmail.com) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id 5C6861DCF for ; Thu, 14 Apr 2016 00:21:48 +0000 (UTC) (envelope-from ben.wiederhake@gmail.com) Received: by mailman.ysv.freebsd.org (Postfix) id 5BCABB0F7BB; Thu, 14 Apr 2016 00:21:48 +0000 (UTC) Delivered-To: ports@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5B758B0F7BA for ; Thu, 14 Apr 2016 00:21:48 +0000 (UTC) (envelope-from ben.wiederhake@gmail.com) Received: from mail-wm0-x244.google.com (mail-wm0-x244.google.com [IPv6:2a00:1450:400c:c09::244]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E607D1DCD for ; Thu, 14 Apr 2016 00:21:47 +0000 (UTC) (envelope-from ben.wiederhake@gmail.com) Received: by mail-wm0-x244.google.com with SMTP id n3so18376840wmn.1 for ; Wed, 13 Apr 2016 17:21:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:subject:cc:message-id:date:user-agent:mime-version :content-transfer-encoding; bh=iFd9XN4j5RL8TxfYzBmOL5YhPjxOcZTuckkEiDDVZ+Q=; b=BUqDMBRe6eJ0L33HfPc2jiQfP2LLOgiwSLP+W5CgTQC2XzA3atXcEaFNzSDkP2OOyb YY3W35u9V7vzGG3N+LcQo5jJbDkOordby5T7W/FvjX53Q2sJcJouQwptJg3dmkL+5gVG Mvk3Dc48K9kgZq5kqfgHyCf6D/m7xsGhq1T9X5ysqdaYeY90+fCqudKgTIbvaAylfXby 4/esHO1ZZSkD486yGuXdJvWrPQuJ77DD2WGGda8zfGWMPQ6LAaxwDqJtXfpOLT02I3lc TvecamZikFPtZCdenjWVkWDzP5a9zS+HNE/YEV0YFccenw00CCOReB7jqK9uBLrfuJpp b1Aw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:subject:cc:message-id:date:user-agent :mime-version:content-transfer-encoding; bh=iFd9XN4j5RL8TxfYzBmOL5YhPjxOcZTuckkEiDDVZ+Q=; b=l4q9Ht9ISKNAVTWpHtFJJ/Akgg4bOu7Se6SPGr67ACrgB8HG0Iv2/kfmw0SnBEYiUP /aUb513qWOlL6MOGBeN3EB5g5U2lWMwk3ZKnTmnNnxUAt/bDh7eTkRsoOUaGlRtIIzaA EaSnS0dE30lYT03nLeZota9XIaTwDDL/IEnfIYWkcDSLXuH43t+u8oO1XWFCgTq9f1ne ZHwmWg5JmzEm1l4vp5ykK6WJcxUwgXtTDLt6Nr4wm/3SJGwbcxNTo662ETH/ONI6Qmym dsBWdb8r1ihSP0PdST7F7V1I4k2P456xczUlHngPSE0UJ769myFmkvS7x1lH/pOcBFL7 Y/Uw== X-Gm-Message-State: AOPr4FUFbVDjUZQwjHjD40/0bclHQqSL8ldKQNIw6hX4bDbrDAHu7DXAZgcozl59SC5xnA== X-Received: by 10.28.101.213 with SMTP id z204mr13752710wmb.22.1460593306298; Wed, 13 Apr 2016 17:21:46 -0700 (PDT) Received: from [192.168.2.198] (dslb-094-219-003-026.094.219.pools.vodafone-ip.de. [94.219.3.26]) by smtp.googlemail.com with ESMTPSA id d131sm3655523wmd.12.2016.04.13.17.21.45 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 13 Apr 2016 17:21:45 -0700 (PDT) From: Ben Wiederhake X-Google-Original-From: Ben Wiederhake To: cpm@fbsd.es Subject: FreeBSD Port: tcc-0.9.26_3 Cc: ports@FreeBSD.org Message-ID: <570EE298.401@gmail.com> Date: Thu, 14 Apr 2016 02:21:44 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Icedove/38.6.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Apr 2016 00:21:48 -0000 Hello, "#include " seems to be impossible with tcc on FreeBSD. Steps to reproduce: Try to compile the following program: """ #include #include int main(void){printf("Hello world\n");} """ Excepted results: Compilation finishes with no errors. Actual results: """ In file included from foo.c:1: In file included from /usr/include/stdint.h:33: In file included from /usr/include/sys/_types.h:33: In file included from /usr/include/machine/_types.h:6: /usr/include/x86/_types.h:161: error: too many basic types """ And compilation fails. In a real life project, it fails at exactly the same spot [2] Diagnostics from the meatbag (hello!): - Using gcc and clang instead works fine. This must be tcc's fault, not system-headers'. - On Ubuntu and Debian, tcc 0.9.26 works fine, too. This must be some fault in the compilation, environment, or libraries of tcc, not tcc's code itself. - The error message stems from line 2510 in tccgen.c [1]. However, I don't understand how it got there and where it "counts". - This might also be due to a forgotten semicolon [3], which I deem inlikely for a system header. - Note that tcc is one-pass, so it doesn't even know anything except the first line of foo.c. Thus, tcc is currently unusable for me. Versions, as far as I can tell: - 'tcc -dumpversion' says '0.9.26'. - `pkg upgrade` says 'Your packages are up to date.' - `uname -a` says 'FreeBSD 10.3-RELEASE FreeBSD 10.3-RELEASE #0 r297264: Fri Mar 25 02:10:02 UTC 2016' Regards, Ben Wiederhake [1] https://github.com/search?utf8=%E2%9C%93&q=%22too+many+basic+types%22&type=Code&ref=searchresults [2] https://gitlab.com/BenWiederhake/endian-ci/builds/1077867 [3] https://lists.gnu.org/archive/html/tinycc-devel/2008-09/msg00033.html