Skip to content

Commit

Permalink
Add guards for optional alisp symbols. This ensures that the Versions
Browse files Browse the repository at this point in the history
file does not contain undefined symbols when building alisp support is
disabled.

Fixes Gentoo bugs 914511 (https://bugs.gentoo.org/914511),
    914643 (https://bugs.gentoo.org/914643),
    and 919417 (https://bugs.gentoo.org/919417).

Fixes bug #305
Fixes alsa_lisp symbol error reported in bug #356

Closes: #376
Fixes: #305
Link: #356
Signed-off-by: Nicholas Vinson <nvinson234@gmail.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
  • Loading branch information
nvinson authored and perexg committed Jan 24, 2024
1 parent 5303e9e commit 159a4b0
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 2 deletions.
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -749,7 +749,7 @@ fi

AC_CONFIG_FILES(Makefile doc/Makefile doc/pictures/Makefile doc/doxygen.cfg \
include/Makefile include/sound/Makefile include/sound/uapi/Makefile \
src/Versions src/Makefile \
src/Versions.in src/Makefile \
src/control/Makefile src/mixer/Makefile \
src/pcm/Makefile src/pcm/scopes/Makefile \
src/rawmidi/Makefile src/timer/Makefile \
Expand Down
11 changes: 10 additions & 1 deletion src/Makefile.am
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
EXTRA_DIST=Versions
COMPATNUM=@LIBTOOL_VERSION_INFO@

if VERSIONED_SYMBOLS
VSYMS = -Wl,--version-script=Versions
BUILT_SOURCES = $(top_builddir)/src/Versions
else
VSYMS =
BUILT_SOURCES =
endif

if SYMBOLIC_FUNCTIONS
Expand All @@ -13,6 +14,8 @@ else
SYMFUNCS =
endif

VERSION_CPPFLAGS =

lib_LTLIBRARIES = libasound.la
libasound_la_SOURCES = conf.c confeval.c confmisc.c input.c output.c async.c error.c dlmisc.c socket.c shmarea.c userfile.c names.c

Expand Down Expand Up @@ -43,6 +46,9 @@ SUBDIRS += ucm
libasound_la_LIBADD += ucm/libucm.la
endif
if BUILD_ALISP
if VERSIONED_SYMBOLS
VERSION_CPPFLAGS += -DHAVE_ALISP_SYMS
endif
SUBDIRS += alisp
libasound_la_LIBADD += alisp/libalisp.la
endif
Expand All @@ -51,6 +57,9 @@ libasound_la_LIBADD += @ALSA_DEPLIBS@

libasound_la_LDFLAGS = -version-info $(COMPATNUM) $(VSYMS) $(SYMFUNCS) $(LDFLAGS_NOUNDEFINED)

$(top_builddir)/src/Versions: $(top_builddir)/src/Versions.in
$(COMPILE) -E $(VERSION_CPPFLAGS) -x assembler-with-cpp -o $@ $<

control/libcontrol.la:
$(MAKE) -C control libcontrol.la

Expand Down
4 changes: 4 additions & 0 deletions src/Versions.in → src/Versions.in.in
Original file line number Diff line number Diff line change
Expand Up @@ -118,15 +118,19 @@ ALSA_0.9.3 {
} ALSA_0.9.0;

ALSA_0.9.5 {
#ifdef HAVE_ALISP_SYMS
global:

@SYMBOL_PREFIX@alsa_lisp;
#endif
} ALSA_0.9.3;

ALSA_0.9.7 {
#ifdef HAVE_ALISP_SYMS
global:

@SYMBOL_PREFIX@alsa_lisp_*;
#endif
} ALSA_0.9.5;

ALSA_1.1.6 {
Expand Down

0 comments on commit 159a4b0

Please sign in to comment.