From owner-freebsd-hackers@freebsd.org Tue May 1 17:26:37 2018 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7DCEAFB13B1 for ; Tue, 1 May 2018 17:26:37 +0000 (UTC) (envelope-from leres@freebsd.org) Received: from xse.com (xse.com [IPv6:2607:f2f8:abb8::3]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "xse.com", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 13FD079BBA for ; Tue, 1 May 2018 17:26:37 +0000 (UTC) (envelope-from leres@freebsd.org) Received-SPF: pass (dot.xse.com: authenticated connection) receiver=dot.xse.com; client-ip=2001:558:6045:10:9084:9e0:4b6d:eb99; helo=ice.alameda.xse.com; envelope-from=leres@freebsd.org; x-software=spfmilter 2.001 http://www.acme.com/software/spfmilter/ with libspf2-1.2.10; Received: from ice.alameda.xse.com (ice.xse.com [IPv6:2001:558:6045:10:9084:9e0:4b6d:eb99]) (authenticated bits=0) by dot.xse.com (8.15.2/8.15.2) with ESMTPSA id w41HQW69024199 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NO) for ; Tue, 1 May 2018 10:26:34 -0700 (PDT) (envelope-from leres@freebsd.org) X-Authentication-Warning: dot.xse.com: Host ice.xse.com [IPv6:2001:558:6045:10:9084:9e0:4b6d:eb99] claimed to be ice.alameda.xse.com To: FreeBSD Hackers From: Craig Leres Subject: Porting questions Message-ID: Date: Tue, 1 May 2018 10:26:32 -0700 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="------------3886E7E3D311105AF941B91A" Content-Language: en-US X-Virus-Scanned: clamav-milter 0.100.0 at dot.xse.com X-Virus-Status: Clean X-GBUdb-Analysis: Unknown X-MessageSniffer-Rules: 0-0-0-8611-c X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 May 2018 17:26:37 -0000 This is a multi-part message in MIME format. --------------3886E7E3D311105AF941B91A Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit I'm working a port for the Espressif ESP32 toolchain so I can move development of some projects (FreeRTOS and Arduino) from Ubuntu to FreeBSD. I have a few questions. (1) Naming: The pre-built linux 64 bit toolchain is called: xtensa-esp32-elf-linux64-1.22.0-80-g6c4433a-5.2.0.tar.gz so I thought the port should be called xtensa-esp32-elf; is this a reasonable name? (2) Port version: The toolchain is built from the latest version: https://github.com/espressif/crosstool-NG There is not a release that corresponds to this version; is it legit for me to use: DISTVERSION= 1.22.0-80-g6c4433a5 GH_TUPLE= espressif:crosstool-NG:${DISTVERSION} which apparently gives me 1.22.0.80.g6.c4433.a5 as the PORTVERSION? (3) USES=gcc doesn't provide a binary named gcc: crosstool-NG has the string "gcc" firmly baked into it. When I have USES=gcc (today) I get gcc6 but without patching a ton of files I need gcc to exist when poudriere is building. I solved this by also adding: BUILD_DEPENDS+= gcc:lang/gcc but it seems wrong to me that USES=gcc doesn't provide a binary named gcc. (4) How to handle downloads that shouldn't be extracted: The toolchain uses specific versions of a bunch of things: TARBALLS= \ binutils-2.25.1.tar.bz2 \ expat-2.1.0.tar.gz \ gcc-5.2.0.tar.bz2 \ gdb-7.10.tar.xz \ gmp-6.0.0a.tar.xz \ isl-0.14.tar.xz \ mpc-1.0.3.tar.gz \ mpfr-3.1.3.tar.xz \ ncurses-6.0.tar.gz \ newlib-2.2.0.tar.gz Normally the build process downloads these which doesn't work well with poudriere; you don't want to download these every time you build port. I put copies in my /usr/ports/distfiles and add symlinks to the work tree in post-extract and later the build script correctly skips downloading them when it finds them already there. I'd like to add these to DISTFILES for auto-download and checksums but I don't want them extracted by do-extract. Is my best option to override the do-extract target? I've attached the current version of the Makefile for informal review. Craig --------------3886E7E3D311105AF941B91A Content-Type: text/plain; charset=UTF-8; name="Makefile" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="Makefile" IyBDcmVhdGVkIGJ5OiBDcmFpZyBMZXJlcyA8bGVyZXNAZnJlZWJzZC5vcmc+CiMgJEZyZWVC U0QkCgpQT1JUTkFNRT0JeHRlbnNhLWVzcDMyLWVsZgpESVNUVkVSU0lPTj0JMS4yMi4wLTgw LWc2YzQ0MzNhNQpDQVRFR09SSUVTPQlkZXZlbAojRElTVEZJTEVTPQojTUFTVEVSX1NJVEVT PQlTRgpESVNUX1NVQkRJUj0JeHRlbnNhLWVzcDMyLWVsZgoKTUFJTlRBSU5FUj0JbGVyZXNA ZnJlZWJzZC5vcmcKQ09NTUVOVD0JVG9vbGNoYWluIGZvciB4dGVuc2EtZXNwMzItZWxmCgpM SUNFTlNFPQlHUEx2MiBMR1BMMjEKTElDRU5TRV9DT01CPQltdWx0aQoKQlVJTERfREVQRU5E Uys9CWJhc2g6c2hlbGxzL2Jhc2ggXAoJCWdhd2s6bGFuZy9nYXdrIFwKCQlnY2M6bGFuZy9n Y2MgXAoJCWdpdDpkZXZlbC9naXQgXAoJCWdwYXRjaDpkZXZlbC9wYXRjaCBcCgkJJHtMT0NB TEJBU0V9L2Jpbi9ncmVwOnRleHRwcm9jL2dudWdyZXAgXAoJCWdwZXJmOmRldmVsL2dwZXJm IFwKCQlnc2VkOnRleHRwcm9jL2dzZWQgXAoJCWhlbHAybWFuOm1pc2MvaGVscDJtYW4gXAoJ CW1ha2VpbmZvOnByaW50L3RleGluZm8gXAoJCXdnZXQ6ZnRwL3dnZXQKClVTRVM9CQlhdXRv cmVjb25mOmJ1aWxkIGJpc29uIGdtYWtlIGxpYnRvb2wgcHl0aG9uOmJ1aWxkClVTRV9HSVRI VUI9CXllc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