Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 1 May 2018 22:21:50 +0300
From:      Gleb Popov <6yearold@gmail.com>
To:        Craig Leres <leres@freebsd.org>
Cc:        FreeBSD Hackers <freebsd-hackers@freebsd.org>
Subject:   Re: Porting questions
Message-ID:  <CALH631mMdrCenWUJeJF6RAgwhnrDfsj2r9bLF%2BqJiw7q6QFy8g@mail.gmail.com>
In-Reply-To: <fe5ac958-441b-054f-3a6b-1146bcad6a41@freebsd.org>
References:  <fe5ac958-441b-054f-3a6b-1146bcad6a41@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, May 1, 2018 at 8:26 PM, Craig Leres <leres@freebsd.org> wrote:

> 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.
>

You can add
BINARY_ALIAS=   gcc=gcc6
line to work around this.


> (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
>
> _______________________________________________
> freebsd-hackers@freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-hackers
> To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"
>
>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CALH631mMdrCenWUJeJF6RAgwhnrDfsj2r9bLF%2BqJiw7q6QFy8g>