X-Original-To: alpine-aports@lists.alpinelinux.org Received: from mail-lf0-f68.google.com (mail-lf0-f68.google.com [209.85.215.68]) by lists.alpinelinux.org (Postfix) with ESMTP id 8EA4C5C4D75 for ; Sun, 24 Dec 2017 01:14:02 +0000 (GMT) Received: by mail-lf0-f68.google.com with SMTP id o26so20817534lfc.10 for ; Sat, 23 Dec 2017 17:14:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:user-agent:mime-version; bh=PBvITqsgReYE2qEQEL1igaY7Mym0KaDjTSuYat0tUFw=; b=XErKiroRss5UjL1IejB8xuG5a8a2FxLS0wE0saHK8Prt5T4OuAUCKnGntwnq7HUxrI ZafVLZyZF/cndJCTNuaRiaPMv6x1Tqg+q7AQVoDT8V9BKYyxVIlFLgF/HK81QRBBqZ1G V+lA/d26wXyIQ25MkCY2xYacWp+qqGblebyLqq5d0z1LiSixUHeEU3z79AOMilE5WcuM YkLNCSE/k16CzMIrcTxI1VnzsSy073tVaMZUuMMxPv7jZB5+Za87APiAzjkOTzmIFwL8 x/42CtaSo5JUo/C4NdJ3zET9wb5lhKXKUW21ovgm6QBUYP6f9bJC2bdt6sD+YPRziEag eSjA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:user-agent :mime-version; bh=PBvITqsgReYE2qEQEL1igaY7Mym0KaDjTSuYat0tUFw=; b=L1T3q7skpgPoJP8Ka2XU+pmK+k8zjiTN1O7f9KTACp5e0y1dza2jY9MpRCQ7gJe8rh nv6PiQ6jCkgrrA9/4M1oo9oC5tSUl+yvZsujS29JqYBFAN52hA6DdrIy+ODa7nTnHMJm IChl8c67MgySCyvJ2jutxhXAGrYtYdw/aRyT0kLj+GrvwFK1IzoZaWlEgiBrmRhr886q Y5t4WaOuHjelDe0trebqQ4aAX3UdqKSMyBu/9DRRheKnhvVuWc5mz4oXy0qwxjZBGt8Z J/XVFSsuiq8S7SFihS27uK0znXzJHiITfE+Iviv7I7NCbniQH+6En2GlIAseCuUltH6G EAiw== X-Gm-Message-State: AKGB3mKWBn3nlJMNK/emyezn6kDQrdo7iyz+LEB0cf6TY7e2MjQsRwnk nFqYzU5CGCDNM1TR4/4cySVr6w== X-Google-Smtp-Source: ACJfBothybPo17z7LxPB9Bv8X1DNvXM4gLUHWVmDEKbibqDJtnRcH2/ezlcB8dubCqHnVQwfE5NxMg== X-Received: by 10.25.78.78 with SMTP id c75mr11173785lfb.68.1514078041554; Sat, 23 Dec 2017 17:14:01 -0800 (PST) Received: from archbook (broadband-5-228-119-184.moscow.rt.ru. [5.228.119.184]) by smtp.gmail.com with ESMTPSA id x21sm1406319lfi.60.2017.12.23.17.13.59 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 23 Dec 2017 17:14:00 -0800 (PST) From: Vladislav Ivanishin To: alpine-aports@lists.alpinelinux.org Cc: Natanael Copa Subject: [alpine-aports] [PATCH] community/mplayer: add --enable-runtime-cpudetection Date: Sun, 24 Dec 2017 04:13:58 +0300 Message-ID: <87y3ltudux.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux) X-Mailinglist: alpine-aports Precedence: list List-Id: Alpine Development List-Unsubscribe: List-Post: List-Help: List-Subscribe: MIME-Version: 1.0 Content-Type: text/plain Hello, Natanael, I installed Alpine on an old system with an Athlon 64 CPU, which does not have SSE4* extensions. Mplayer from the official repositories crashed immediately upon opening an audio file. The reason was an "illegal" -- for my CPU that is -- instruction, `popcnt' in my case. Compiling mplayer on my machine (with `abuild -r') helped (obviously). Arch Linux folks had pretty much the same bug in 2009: [1], and I suggest pretty much the same patch as a fix: configure with --enable-runtime-cpudetection. Debian `rules' for the package [2,3] also include the option, though not for all architectures, it seems: ifeq ($(DEB_HOST_ARCH),i386) #configure optimizes for the cpu detected at ./configure time #in order to build a generic binary, avoid non-standard opcodes through gcc archconf += --target=i586-linux CONFIGURE_FLAGS += --enable-runtime-cpudetection endif ifeq ($(DEB_HOST_ARCH),amd64) CONFIGURE_FLAGS += --enable-runtime-cpudetection endif ifeq ($(DEB_HOST_ARCH),kfreebsd-i386) CONFIGURE_FLAGS += --enable-runtime-cpudetection endif ifeq ($(DEB_HOST_ARCH),kfreebsd-amd64) CONFIGURE_FLAGS += --enable-runtime-cpudetection endif ifeq ($(DEB_HOST_ARCH),powerpc) CONFIGURE_FLAGS += --enable-runtime-cpudetection endif # when run on a sparc64 kernel, configure will normally select v9 asm. # this is hidden when running on buildds with 32bit kernel personality. # because of #644856, this will currently lead to a FTBFS # therefore, we force a 'generic' target. ifeq ($(DEB_HOST_ARCH),sparc) archconf += --target=generic endif ifeq ($(DEB_HOST_ARCH),alpha) #Avoid high optimization through gcc. # see http://permalink.gmane.org/gmane.linux.debian.ports.alpha/7295 archconf += --target=alpha_ev5-linux endif Not sure what happens for arm here. Hope you have more knowledge. [1]: https://bugs.archlinux.org/task/15396 [2]: http://security.debian.org/debian-security/pool/updates/main/m/mplayer/mplayer_1.0~rc4.dfsg1+svn34540-1+deb7u2.debian.tar.gz [3]: https://packages.debian.org/wheezy/mplayer - Vlad >From 5f4dbd30a3b32c5e301f69e31ffbff51618cc879 Mon Sep 17 00:00:00 2001 From: Vladislav Ivanishin Date: Sun, 24 Dec 2017 02:55:50 +0300 Subject: [PATCH] community/mplayer: add --enable-runtime-cpudetection --- community/mplayer/APKBUILD | 1 + 1 file changed, 1 insertion(+) diff --git a/community/mplayer/APKBUILD b/community/mplayer/APKBUILD index b218938782..0acfa6a181 100644 --- a/community/mplayer/APKBUILD +++ b/community/mplayer/APKBUILD @@ -23,6 +23,7 @@ build() { ./configure \ --prefix=/usr \ + --enable-runtime-cpudetection \ --disable-gui \ --disable-gif \ --disable-arts \ -- 2.15.0 --- Unsubscribe: alpine-aports+unsubscribe@lists.alpinelinux.org Help: alpine-aports+help@lists.alpinelinux.org ---