Fix www/squid unexpectedly using -march=native

Florian Smeets flo at smeets.im
Thu Oct 16 07:25:41 UTC 2014


On Wed, Oct 15, 2014 at 09:11:44PM +0200, Dimitry Andric wrote:
> Hi,
> 
> Since http://bazaar.launchpad.net/~squid/squid/3-trunk/revision/12842,
> Squid's configure script defaults to -march=native, if the flag is
> supported by the compiler.  And this even *overrides* your own specified
> CPUTYPE or -march= flag!  So I personally experienced Squid 3.4 crashing
> on an old Celeron, when it was built on a Core i7. :-(
> 
> Proposed fix is to explicitly tell the configure script to *not* enable
> -march=native by default:
> 
> Index: www/squid/Makefile
> ===================================================================
> --- www/squid/Makefile  (revision 370765)
> +++ www/squid/Makefile  (working copy)
> @@ -181,7 +181,8 @@
>                 --disable-epoll \
>                 --disable-linux-netfilter \
>                 --disable-linux-tproxy \
> -               --disable-translation
> +               --disable-translation \
> +               --disable-arch-native
> 
>  .include <bsd.port.options.mk>
> 
> Note that only squid 3.4 suffers from this bug, 3.3 is not affected.
> 

I ran into that myself a few days ago. I haven't had time to look into
it, yet. So, thanks for taking care of it. :)

I've tested and committed your patch.

Thanks,
Florian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 949 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/freebsd-ports/attachments/20141016/6131358e/attachment.sig>


More information about the freebsd-ports mailing list