alsa-project / alsa-lib

The Advanced Linux Sound Architecture (ALSA) - library
GNU Lesser General Public License v2.1
344 stars 173 forks source link

Clang: fix versioned symbol build errors #376

Closed nvinson closed 5 months ago

nvinson commented 6 months ago

When building alsa-lib with the following settings

CFLAGS='-O3 -pipe'
CXXFLAGS='-O3 -pipe'
LDFLAGS='-Wl,-O1 -Wl,--as-needed -fuse-ld=lld -rtlib=compiler-rt -unwindlib=libunwind'

the build fails with errors similar to

ld.lld: error: version script assignment of 'ALSA_0.9.5' to symbol 'alsa_lisp' failed: symbol not defined

This PR corrects that issue and additional issues found while making corrections so alsa-lib will successfully build using clang and ld.lld.