Skip to content

Commit

Permalink
Move atomic_ops libs into Requires.private
Browse files Browse the repository at this point in the history
  • Loading branch information
fundawang committed Aug 27, 2024
1 parent 02c9d85 commit 4c81fbb
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,7 @@ set(SRC allchblk.c alloc.c blacklst.c dbg_mlc.c dyn_load.c finalize.c

set(NODIST_SRC)
set(ATOMIC_OPS_LIBS)
set(ATOMIC_OPS_PC)
set(ATOMIC_OPS_LIBS_CMAKE)
set(THREADDLLIBS_LIST)
set(NEED_LIB_RT)
Expand All @@ -197,6 +198,7 @@ if (enable_threads)
"with_libatomic_ops and without_libatomic_ops are mutually exclusive")
endif()
set(ATOMIC_OPS_LIBS "-latomic_ops")
set(ATOMIC_OPS_PC "atomic_ops")
find_package(Atomic_ops CONFIG)
if (Atomic_ops_FOUND)
get_target_property(AO_INCLUDE_DIRS Atomic_ops::atomic_ops
Expand Down
2 changes: 1 addition & 1 deletion bdw-gc.pc.in
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ includedir=@includedir@
Name: Boehm-Demers-Weiser Conservative Garbage Collector
Description: A garbage collector for C and C++
Version: @PACKAGE_VERSION@
Requires.private: @ATOMIC_OPS_PC@
Libs: -L${libdir} -lgc @THREADDLLIBS@
Libs.private: @ATOMIC_OPS_LIBS@
Cflags: -I${includedir}
4 changes: 3 additions & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -1207,7 +1207,9 @@ AS_IF([test x"$with_libatomic_ops" != xno],
[AS_IF([test x"$with_libatomic_ops" != xnone -a x"$THREADS" != xnone],
[AC_MSG_RESULT([external])
ATOMIC_OPS_LIBS="-latomic_ops"
AC_SUBST([ATOMIC_OPS_LIBS])],
ATOMIC_OPS_PC="atomic_ops"
AC_SUBST([ATOMIC_OPS_LIBS])
AC_SUBST([ATOMIC_OPS_PC])],
[AC_MSG_RESULT([none])
AS_IF([test x"$THREADS" != xnone],
[AC_DEFINE([GC_BUILTIN_ATOMIC], [1],
Expand Down

0 comments on commit 4c81fbb

Please sign in to comment.