Skip to content

Commit

Permalink
remove libatomic dependency for keydb (#1938)
Browse files Browse the repository at this point in the history
* remove libatomic dependency for keydb

This is not easily available for platforms because it was only made
separately installable in later versions of GCC than we're using. Since
keydb will work without this (it does not use it on darwin), we're
attempting to exclude the dependency entirely to work around this issue.

Signed-off-by: Marc A. Paradise <[email protected]>

* Remove unnecessary whitespace changes from patch

Signed-off-by: Marc A. Paradise <[email protected]>

* ensure minimum version for applying the patch

Signed-off-by: Marc A. Paradise <[email protected]>

---------

Signed-off-by: Marc A. Paradise <[email protected]>
  • Loading branch information
marcparadise authored Aug 24, 2024
1 parent cd0dbdf commit f9e2df6
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 2 deletions.
19 changes: 19 additions & 0 deletions config/patches/keydb/remove-libatomic-dep
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
--- KeyDB-6.3.4-original/src/Makefile 2024-08-23 16:20:47.182590590 -0400
+++ KeyDB-6.3.4/src/Makefile 2024-08-23 16:21:13.045995002 -0400
@@ -144,16 +144,6 @@
FINAL_LDFLAGS=$(LDFLAGS) $(KEYDB_LDFLAGS) $(DEBUG)
FINAL_LIBS+=-lm -lz -lcrypto

-ifneq ($(uname_S),Darwin)
- ifneq ($(uname_S),FreeBSD)
- FINAL_LIBS+=-latomic
- endif
-endif
-# Linux ARM32 needs -latomic at linking time
-ifneq (,$(findstring armv,$(uname_M)))
- FINAL_LIBS+=-latomic
-endif
-

ifeq ($(uname_S),SunOS)
# SunOS
5 changes: 3 additions & 2 deletions config/software/keydb.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,16 @@

# version_list: url=https://github.com/Snapchat/KeyDB/archive/refs/tags/ filter=*.tar.gz
version("6.3.4") { source sha256: "229190b251f921e05aff7b0d2f04b5676c198131e2abbec1e2cfb2e61215e2f3" }
version("6.3.1") { source sha256: "851b91e14dc3e9c973a1870acdc5f2938ad51a12877e64e7716d9e9ae91ce389" }

build do
env = with_standard_compiler_flags(with_embedded_path).merge(
"PREFIX" => "#{install_dir}/embedded"
)
env["CFLAGS"] << " -I#{install_dir}/embedded/include"
env["LDFLAGS"] << " -L#{install_dir}/embedded/lib"

if version.satisfies?(">=6.3.4")
patch source: "remove-libatomic-dep", env: env
end
if suse?
env["CFLAGS"] << " -fno-lto"
env["CXXFLAGS"] << " -fno-lto"
Expand Down

0 comments on commit f9e2df6

Please sign in to comment.