Skip to contentSkip to conversation

alsa-lib: fix build on powerpc64 and powerpc64le

PATCH New Sam Bobroff 2 participants 3 messages Nov 3, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 alsa-lib: fix build on powerpc64 and powerpc64le

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).

---

 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
package/alsa-lib/0003-dlmisc.patch +6 -4
index 05dc70e..24b7230 100644
@@ -36,10 +36,11 @@ diff --git a/modules/mixer/simple/sbasedl.c b/modules/mixer/simple/sbasedl.c
  #include <fcntl.h>
  #include <sys/ioctl.h>
  #include <math.h>
-+#ifdef HAVE_LIBDL
++#include "config.h"
++#ifdef HAVE_DLFCN
  #include <dlfcn.h>
 +#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 <fcntl.h>
  #include <sys/ioctl.h>
  #include <math.h>
-+#ifdef HAVE_LIBDL
++#include "config.h"
++#ifdef HAVE_DLFCN
  #include <dlfcn.h>
 +#endif
- #include "config.h"
+-#include "config.h"
  #include "asoundlib.h"
  #include "mixer_simple.h"
package/alsa-lib/0005-remove-powerpc64-workaround.patch new file +67 -0

67 lines not on this page · raw message

Signature · 1 line
2.10.0.297.gf6727b0
#1 lore raw

PATCH 1/1 alsa-lib: fix build on powerpc64 and powerpc64le

Hello,

Quoted 9 lines · Sam Bobroff

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.

Quoted 8 lines

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).

---

Applied to master, thanks!

Please submit those patches upstream to the alsa-lib project. Thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#2 lore raw

PATCH 1/1 alsa-lib: fix build on powerpc64 and powerpc64le

Quoted 18 lines · Thomas Petazzoni

Hello,

Quoted 15 lines · Sam Bobroff

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).

Quoted 8 lines
Quoted 2 lines

---

Applied to master, thanks!

Please submit those patches upstream to the alsa-lib project. Thanks!

Thomas

Done!

Cheers,
Sam.