From patchwork Thu Nov 3 03:25:34 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sam Bobroff X-Patchwork-Id: 690654 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3t8VjS4Ts4z9t1B for ; Thu, 3 Nov 2016 14:25:47 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 13D2F9574F; Thu, 3 Nov 2016 03:25:45 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 66F+m3vPXvQd; Thu, 3 Nov 2016 03:25:44 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id 1029A95746; Thu, 3 Nov 2016 03:25:44 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id B086D1CF92D for ; Thu, 3 Nov 2016 03:25:42 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id ADE5A92394 for ; Thu, 3 Nov 2016 03:25:42 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 8tFBH39MJ9Ja for ; Thu, 3 Nov 2016 03:25:41 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mx0a-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by whitealder.osuosl.org (Postfix) with ESMTPS id CA522922FE for ; Thu, 3 Nov 2016 03:25:41 +0000 (UTC) Received: from pps.filterd (m0098421.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.17/8.16.0.17) with SMTP id uA33NQSR027934 for ; Wed, 2 Nov 2016 23:25:40 -0400 Received: from e23smtp07.au.ibm.com (e23smtp07.au.ibm.com [202.81.31.140]) by mx0a-001b2d01.pphosted.com with ESMTP id 26fms2u3fs-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Wed, 02 Nov 2016 23:25:40 -0400 Received: from localhost by e23smtp07.au.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 3 Nov 2016 13:25:36 +1000 Received: from d23dlp01.au.ibm.com (202.81.31.203) by e23smtp07.au.ibm.com (202.81.31.204) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Thu, 3 Nov 2016 13:25:35 +1000 Received: from d23relay10.au.ibm.com (d23relay10.au.ibm.com [9.190.26.77]) by d23dlp01.au.ibm.com (Postfix) with ESMTP id 1B2EB2CE8056 for ; Thu, 3 Nov 2016 14:25:35 +1100 (EST) Received: from d23av02.au.ibm.com (d23av02.au.ibm.com [9.190.235.138]) by d23relay10.au.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id uA33PZd26881544 for ; Thu, 3 Nov 2016 14:25:35 +1100 Received: from d23av02.au.ibm.com (localhost [127.0.0.1]) by d23av02.au.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id uA33PYDj026635 for ; Thu, 3 Nov 2016 14:25:34 +1100 Received: from ozlabs.au.ibm.com (ozlabs.au.ibm.com [9.192.253.14]) by d23av02.au.ibm.com (8.14.4/8.14.4/NCO v10.0 AVin) with ESMTP id uA33PY3E026608 for ; Thu, 3 Nov 2016 14:25:34 +1100 Received: from tungsten.ozlabs.ibm.com (haven.au.ibm.com [9.192.254.114]) (using TLSv1.2 with cipher AES128-SHA256 (128/128 bits)) (No client certificate requested) by ozlabs.au.ibm.com (Postfix) with ESMTPSA id 3085FA00AB for ; Thu, 3 Nov 2016 14:25:34 +1100 (AEDT) From: Sam Bobroff To: buildroot@busybox.net Date: Thu, 3 Nov 2016 14:25:34 +1100 X-Mailer: git-send-email 2.1.4 X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 16110303-0044-0000-0000-000001F68F70 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 16110303-0045-0000-0000-000005DE4B06 Message-Id: X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2016-11-03_01:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=1 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1609300000 definitions=main-1611030062 Subject: [Buildroot] [PATCH 1/1] alsa-lib: fix build on powerpc64 and powerpc64le X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Fixes linker error http://autobuild.buildroot.net/results/c6272ac900d1a53b976839ac4f50a210b3e6b354 On powerpc64 (and powerpc64le) the build fails due to linker problems because of an old (2003) workaround for powerpc64, presumably working around an old toolchain problem that is no longer present. Removing the workaround allows the build to succeed. A new patch is added for this. Additionally, there was a mistake in patch 3: the patch added a test for HAVE_LIBDL to include/alsa-symbols.h but it was positioned in the file before config.h was included, so HAVE_LIBDL is never seen as defined. The test was also using HAVE_LIBDL (which indicates the library) rather than HAVE_DLFCN (which indicates the header). Signed-off-by: Sam Bobroff --- package/alsa-lib/0003-dlmisc.patch | 10 ++-- .../0005-remove-powerpc64-workaround.patch | 67 ++++++++++++++++++++++ 2 files changed, 73 insertions(+), 4 deletions(-) create mode 100644 package/alsa-lib/0005-remove-powerpc64-workaround.patch diff --git a/package/alsa-lib/0003-dlmisc.patch b/package/alsa-lib/0003-dlmisc.patch index 05dc70e..24b7230 100644 --- a/package/alsa-lib/0003-dlmisc.patch +++ b/package/alsa-lib/0003-dlmisc.patch @@ -36,10 +36,11 @@ diff --git a/modules/mixer/simple/sbasedl.c b/modules/mixer/simple/sbasedl.c #include #include #include -+#ifdef HAVE_LIBDL ++#include "config.h" ++#ifdef HAVE_DLFCN #include +#endif - #include "config.h" +-#include "config.h" #include "asoundlib.h" #include "mixer_abst.h" diff --git a/src/mixer/simple_abst.c b/src/mixer/simple_abst.c @@ -49,9 +50,10 @@ diff --git a/src/mixer/simple_abst.c b/src/mixer/simple_abst.c #include #include #include -+#ifdef HAVE_LIBDL ++#include "config.h" ++#ifdef HAVE_DLFCN #include +#endif - #include "config.h" +-#include "config.h" #include "asoundlib.h" #include "mixer_simple.h" diff --git a/package/alsa-lib/0005-remove-powerpc64-workaround.patch b/package/alsa-lib/0005-remove-powerpc64-workaround.patch new file mode 100644 index 0000000..57a369e --- /dev/null +++ b/package/alsa-lib/0005-remove-powerpc64-workaround.patch @@ -0,0 +1,67 @@ +Linking currently fails on powerpc64 and powerpc64le when configured +with --without-versioned, as follows: +../src/.libs/libasound.so: undefined reference to `.__snd_pcm_hw_params_set_format_first' +(And many similar messages.) + +This appears to be due to a very old (2003) workaround for powerpc64, +(introduced by commit 06221f86) in include/alsa-symbols.h which alters +symbol names. While it was probably necessary at the time, it does not +appear to be necessary now and removing it fixes the build. + +Signed-off-by: Sam Bobroff +--- + include/alsa-symbols.h | 25 ++++--------------------- + 1 file changed, 4 insertions(+), 21 deletions(-) + +diff --git a/include/alsa-symbols.h b/include/alsa-symbols.h +index 51cb982..0cb0b9f 100644 +--- a/include/alsa-symbols.h ++++ b/include/alsa-symbols.h +@@ -29,19 +29,10 @@ + #define INTERNAL_CONCAT2_2(Pre, Post) Pre##Post + #define INTERNAL(Name) INTERNAL_CONCAT2_2(__, Name) + +-#ifdef __powerpc64__ +-# define symbol_version(real, name, version) \ +- __asm__ (".symver " ASM_NAME(#real) "," ASM_NAME(#name) "@" #version); \ +- __asm__ (".symver ." ASM_NAME(#real) ",." ASM_NAME(#name) "@" #version) +-# define default_symbol_version(real, name, version) \ +- __asm__ (".symver " ASM_NAME(#real) "," ASM_NAME(#name) "@@" #version); \ +- __asm__ (".symver ." ASM_NAME(#real) ",." ASM_NAME(#name) "@@" #version) +-#else +-# define symbol_version(real, name, version) \ +- __asm__ (".symver " ASM_NAME(#real) "," ASM_NAME(#name) "@" #version) +-# define default_symbol_version(real, name, version) \ +- __asm__ (".symver " ASM_NAME(#real) "," ASM_NAME(#name) "@@" #version) +-#endif ++#define symbol_version(real, name, version) \ ++__asm__ (".symver " ASM_NAME(#real) "," ASM_NAME(#name) "@" #version) ++#define default_symbol_version(real, name, version) \ ++__asm__ (".symver " ASM_NAME(#real) "," ASM_NAME(#name) "@@" #version) + + #ifdef USE_VERSIONED_SYMBOLS + #define use_symbol_version(real, name, version) \ +@@ -50,13 +41,6 @@ + default_symbol_version(real, name, version) + #else + #define use_symbol_version(real, name, version) /* nothing */ +-#ifdef __powerpc64__ +-#define use_default_symbol_version(real, name, version) \ +- __asm__ (".weak " ASM_NAME(#name)); \ +- __asm__ (".weak ." ASM_NAME(#name)); \ +- __asm__ (".set " ASM_NAME(#name) "," ASM_NAME(#real)); \ +- __asm__ (".set ." ASM_NAME(#name) ",." ASM_NAME(#real)) +-#else + #if defined(__alpha__) || defined(__mips__) + #define use_default_symbol_version(real, name, version) \ + __asm__ (".weak " ASM_NAME(#name)); \ +@@ -67,6 +51,5 @@ + __asm__ (".set " ASM_NAME(#name) "," ASM_NAME(#real)) + #endif + #endif +-#endif + + #endif /* __ALSA_SYMBOLS_H */ +-- +2.10.0.297.gf6727b0 +