tech-pkg archive

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

Re: How to handle "-march=native"?

In message <>
        on Thu, 26 Dec 2013 10:28:35 -0500,
        Greg Troxel <> wrote:
>> # GCC 4.3+ can also produce faster executables when its used.
> Sure, but then they aren't portable.

> It seems there are multiple things going on:
>   1) there may be some bugs about cpu detection, particulaly in various
>   vm environments, or about the mapping of flags to instructions.
It mighg be temporary problem since vcvtsi2sdq instruction works after
reboot OS X (and suspend/resume guest OS, NetBSD 6.1_STABLE).

Very storange.

>   2) upstream code is trying to build a binary that is optimized for the
>   CPU it is built on, which is basically the wrong thing to do in the
>   general case
> You may be running into problem (1), which is just bugs to fix.  But
> problem 2 is (from the pkgsrc viewpoint) a bug in the upstream code.
> In my opinion, code should be produced that conforms to the system ABI,
> which means not using cpu-specific instructions.

> I think your option 1 is the right approach.
I'll add a option to CONFIGURE_ARGS.  But I still think allow build
with optimized binary could be provided by PKG_OPTIONS.

Takahiro Kambe <>

Home | Main Index | Thread Index | Old Index