Don't build with -march=native on clang arches, ok ajacoutot@ (maintainer).

From my description,

> For gcc, lame has a big "experimental optimizer" section with
> -march=native and other flags that we don't want in bulk builds
> (but might be useful for self builds sometimes). It's controlled by
> --enable-expopt (the default is "none" to disable it),
>
> There is a similar section for clang which is just outside the "expopt"
> block. I think that's a mistake, but I don't want to poke around too much
> as they have other mistakes in their configure script nearby and I don't
> want to go down that rabbit hole ;)
>
> Here's a simple diff to neuter the check.
This commit is contained in:
sthen 2018-10-04 14:48:38 +00:00
parent 733582d3e9
commit a1af0ec998
2 changed files with 21 additions and 2 deletions

View File

@ -1,10 +1,10 @@
# $OpenBSD: Makefile,v 1.62 2018/06/27 17:25:50 sthen Exp $
# $OpenBSD: Makefile,v 1.63 2018/10/04 14:48:38 sthen Exp $
COMMENT= lame ain't an MP3 encoder
#'
DISTNAME= lame-3.100
REVISION= 0
REVISION= 1
SHARED_LIBS += mp3lame 2.2 # 0.0

View File

@ -0,0 +1,19 @@
$OpenBSD: patch-configure,v 1.6 2018/10/04 14:48:38 sthen Exp $
Disable adding -march=native on clang architectures. This allows use
of instructions that are present on the build machine but not on other
CPU types within the given architecture, so is not suitable for package
builds.
Index: configure
--- configure.orig
+++ configure
@@ -17563,7 +17563,7 @@ $as_echo "$as_me: WARNING: LAME doesn't know about you
esac
- if test "x${HAVE_CLANG}" = "xyes"; then
+ if false && test "x${HAVE_CLANG}" = "xyes"; then
case "${CLANG_VERSION}" in
3.89*|45.*)
OPTIMIZATION="-Ofast"