Saturday, May 25, 2019

Re: Move lang/pcc to lang/pcc/pcc, update to 20190521 and add lang/pcc/pcc-libs

On 5/25/19 2:01 PM, Leonid Bobrov wrote:
> On Sat, May 25, 2019 at 01:12:06PM -0400, Brian Callahan wrote:
>> On 5/25/19 11:58 AM, Leonid Bobrov wrote:
>>> Index: Makefile.inc
>>> ===================================================================
>>> RCS file: Makefile.inc
>>> diff -N Makefile.inc
>>> --- /dev/null 1 Jan 1970 00:00:00 -0000
>>> +++ Makefile.inc 25 May 2019 15:51:13 -0000
>>> @@ -0,0 +1,17 @@
>>> +# $OpenBSD: Makefile,v 1.17 2019/05/03 16:59:10 danj Exp $
>>> +
>>> +ONLY_FOR_ARCHS = i386 amd64 sparc64 mips64 mips64el powerpc
>> How did you come up with this list? Either it should be all archs with
>> backend code in pcc (in which case you're missing some archs) or it should
>> be all archs that are known to build (that would be amd64 i386 mips64
>> mips64el) or it should be all archs that are known to build and actually
>> work (amd64 i386). You should use the build and actually work list.
>>
> This list comes from configure scripts (and pkgsrc don't even have this
> list in lang/pcc-current, while in lang/pcc they set it to arm*, i386,
> mips*, powerpc, sparc64, vax and x86_64):
> pcc configure (NetBSD has longer list)
> ```
> openbsd*)
> targos=openbsd
> abi=elf
> stabs=yes
> case "$target_cpu" in
> i?86) targmach=i386 ;;
> vax) targmach=vax ;;
> mips64el) targmach=mips64 ;;
> mips64) targmach=mips64 endian=big ;;
> powerpc) targmach=powerpc endian=big ;;
> sparc64) targmach=sparc64 endian=big ;;
> m68k) targmach=m68k endian=big ;;
> x86_64) targmach=amd64 ;;
> esac
> ;;
> ```
> pcc-libs configure (NetBSD has longer list)
> ```
> openbsd*)
> targos=openbsd
> case "$target_cpu" in
> i?86) targmach=i386 ;;
> mips64el) targmach=mips ;;
> mips64) targmach=mips endian=big ;;
> powerpc) targmach=powerpc endian=big ;;
> sparc64) targmach=sparc64 endian=big ;;
> vax) targmach=vax ;;
> x86_64) targmach=amd64 ;;
> esac
> ;;
> ```
>
> I didn't add m68k and vax to this list because OpenBSD doesn't support
> them (however OpenBSD supports m88k, but I don't know is it compatible
> with m68k or not).
>
> I didn't actually test that because I either need exotic hardwares or
> need to setup virtual machines, so I choose to trust configure script
> and to trust what NetBSD/pkgsrc already do.

The configure scripts are outdated. *shrug*
You should keep to ONLY_FOR_ARCHS=amd64 i386 with the comment explaining
why (which you also removed).

>>> Index: pcc/Makefile
>>> ===================================================================
>>> RCS file: pcc/Makefile
>>> diff -N pcc/Makefile
>>> --- /dev/null 1 Jan 1970 00:00:00 -0000
>>> +++ pcc/Makefile 25 May 2019 15:51:13 -0000
>>> @@ -0,0 +1,21 @@
>>> +# $OpenBSD: Makefile,v 1.17 2019/05/03 16:59:10 danj Exp $
>>> +
>>> +COMMENT = portable C compiler
>>> +
>>> +DISTNAME = pcc-${V}
>> This would make PKGNAME=pcc-${V}, which isn't ok. Likewise, the PKGNAME for
>> pcc-libs is pcc-libs-${V} which also isn't ok.
>>
>> ~Brian
>>
> That's what I was asking in the start of this topic: should I use
> versioning like PKGNAME=pcc=1.1.0.${V}?

`pcc --version' will return 1.2.0.DEVEL ${V}. Which also isn't great.
1.1.0.${V} is certainly better.

~Brian

No comments:

Post a Comment