tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Fixing MACHINE_ARCH



The patch looks good to me. +1.

On Thu, Jan 21, 2016 at 1:33 PM, Jonathan Perkin <jperkin%joyent.com@localhost> wrote:
> * On 2016-01-18 at 14:46 GMT, Jonathan Perkin wrote:
>
>> * On 2016-01-17 at 08:20 GMT, Ian D. Leroux wrote:
>>
>> > On Sat, 16 Jan 2016 09:08:48 +0000 Jonathan Perkin <jperkin%joyent.com@localhost>
>> > wrote:
>> > > [...]
>> > > I have a patch to fix this and move to a single source of truth,
>> > > namely the bootstrap script.  This encodes the correct value of
>> > > MACHINE_ARCH directly into bmake during bootstrap based on the host
>> > > machine and the requested ABI, and that is then used as the single
>> > > source for this variable.
>> >
>> > Speaking as an uninformed observer: does this play nicely with the
>> > existing support for cross-compilation in pkgsrc?  It sounds as though
>> > it would break the mechanisms described in
>> >
>> > https://www.netbsd.org/gallery/presentations/riastradh/asiabsdcon2015/pkgsrc-cross-paper.pdf
>> >
>> > unless special care was taken.
>>
>> It shouldn't affect the cross compilation support, I'm only
>> rationalising the default setting of MACHINE_ARCH, it's still possible
>> to override it if necessary.
>>
>> I don't have a cross build environment set up, if someone does then
>> I'd appreciate testing to ensure I didn't miss anything.
>
> FWIW I set up an evbppc cross-compile environment to test this, and it
> still works as expected, i.e.:
>
>   # uname -a
>   NetBSD netbsd.local 6.1.5 NetBSD 6.1.5 (GENERIC) amd64
>
>   # pkg_info -Q MACHINE_ARCH /usr/pkgsrc/pkgtools/digest/work.powerpc/.packages/digest-20121220.tgz
>   powerpc
>
>   # pkg_info -K /usr/obj/destdir.evbppc/var/db/pkg
>   digest-20121220     Message digest wrapper utility
>
>   # file /usr/obj/destdir.evbppc/usr/pkg/bin/digest
>   /usr/obj/destdir.evbppc/usr/pkg/bin/digest: ELF 32-bit MSB executable, PowerPC or cisco 4500, (SYSV), dynamically linked (uses shared libs), for NetBSD 6.1.5, with unknown capability 0x41000000 = 0x13676e75, with unknown capability 0x10000 = 0xb0401, stripped
>
> I've pushed a couple of additional fixes to the branch, and tested it
> on OpenBSD which was previously a problematic OS due to defining
> MACHINE_ARCH in public headers.  The latest patch is available here:
>
>   https://github.com/jsonn/pkgsrc/compare/trunk...joyent:joyent/dev/machine-arch
>
> Please review as soon as possible, a number of platforms are currently
> broken and will continue to be so until this goes in.
>
> Thanks,
>
> --
> Jonathan Perkin  -  Joyent, Inc.  -  www.joyent.com



-- 
The first essential in chemistry is that you should perform practical
work and conduct experiments, for he who performs not practical work
nor makes experiments will never attain the least degree of mastery.
        -- Abu Musa Jabir ibn Hayyan (721-815)


Home | Main Index | Thread Index | Old Index