Skip to content

Commit

Permalink
[FIX] Remove dependency to libopenal.so -> libatomic.so.1 under Linux.
Browse files Browse the repository at this point in the history
This appears to a be bug in openal-soft's CMakeLists.txt, that the
HAS_LIBATOMIC check always return success and let libopenal.so links
to libatomic.so.1. This looks unnecessary: not all use of <atomic>
requires linking to libatomic.so.

Will check with openal-soft team to clarify the use.

REF: https://stackoverflow.com/questions/30591313/why-does-g-still-require-latomic
  • Loading branch information
fuzhouch committed Dec 21, 2023
1 parent 70de13f commit 26cce68
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions deps/packages/o/openal-soft-alsa/xmake.lua
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,9 @@ package("openal-soft-alsa")
table.insert(configs, "-DALSOFT_STATIC_LIBGCC=ON")
table.insert(configs, "-DALSOFT_STATIC_STDCXX=ON")
io.replace("CMakeLists.txt", "set(LINKER_FLAGS )", "set(LINKER_FLAGS \"-static-libstdc++\")", {plain = true})
-- Avoid linking to libatomic.so.1. Appears not needed
-- but original CmakeLists.txt always returns true.
io.replace("CMakeLists.txt", "set(EXTRA_LIBS atomic ${EXTRA_LIBS})", "set(EXTRA_LIBS ${EXTRA_LIBS})", {plain = true})
end
table.insert(configs, "-DLIBTYPE=SHARED")
else
Expand Down

0 comments on commit 26cce68

Please sign in to comment.