From owner-freebsd-ports@FreeBSD.ORG Tue Jul 9 21:17:09 2013 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id F383AFA4 for ; Tue, 9 Jul 2013 21:17:08 +0000 (UTC) (envelope-from lev@FreeBSD.org) Received: from onlyone.friendlyhosting.spb.ru (onlyone.friendlyhosting.spb.ru [46.4.40.135]) by mx1.freebsd.org (Postfix) with ESMTP id B96A11D1A for ; Tue, 9 Jul 2013 21:17:08 +0000 (UTC) Received: from lion.home.serebryakov.spb.ru (unknown [IPv6:2001:470:923f:1:d1e6:17e6:7b26:3ee6]) (Authenticated sender: lev@serebryakov.spb.ru) by onlyone.friendlyhosting.spb.ru (Postfix) with ESMTPSA id 8C2104AC58 for ; Wed, 10 Jul 2013 01:17:05 +0400 (MSK) Date: Wed, 10 Jul 2013 01:17:01 +0400 From: Lev Serebryakov Organization: FreeBSD X-Priority: 3 (Normal) Message-ID: <381114808.20130710011701@serebryakov.spb.ru> To: freebsd-ports@freebsd.org Subject: Multiversioned packages (proposal, without any code) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: lev@FreeBSD.org List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Jul 2013 21:17:09 -0000 Hello, Freebsd-ports. I (as msp430-* ports maintainer, MSP430 is 16 bit microcontroller from TI) had interesting discussion with one of new MSP430 binutils/ports authors (RedHad/TI employee). He claims, that now no system (FreeBSD included) has proper support for msp430 (or any other embedded[1], for the matter) toolchain. In embedded world "proper support" means that user could have several versions of toolchains installed AT ONCE. And "several" means here not only major versions, like "gcc47 and "gcc48" but different PATCHLEVELS of same version, differs, maybe, in one or two LD scripts or header files, or. may be, one bugfix in compiler, backported from trunk. It is customary in embedded world to stick to one toolchain version for one project and din't migrate to newer versions (but start new projects with new version of toolchain, maybe). Of course, in this world nobody installs such tools, libraries and headers to system FS hierarchy. It is normal to have "/opt/msp430-toolchain-4.7.12.20130115/*", "/opt/msp430-toolchain-4.7.14.20130420/*", etc. and use full paths in Makefiles (via defining CC, CPP, LD and other variables). Now it is impossible to have such scheme under FreeBSD package management (pkg). We solve this for major versions of gcc, with different ports for different versions, for example, but it is not enough for embedded toolchains (which contains of binutils, gcc, newlib and headers), as I mention above. My proposal is to support installing multiple versions of SAME package (port) in system if each version has its own unique PREFIX. In such case, installing of new PORTREVISION should replace old one, and installing of new PORTVERSION should add new version! Now it is impossible to support such thing, as far as I understand. What do you think? Is it possible to support such scheme in pkgs and ports? [1] "embedded" in context of this message means "no OS, bare hardware, like AVR 8 bit, MSP430 16 bit or Arm Cortex-M3 32 bit" and not "SOHO router on ARM/MIPS with proper OS, MMU, etc". -- // Black Lion AKA Lev Serebryakov