Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move atomic_ops libs into Requires.private #656

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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")
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

set ATOMIC_OPS_LIBS using value of ATOMIC_OPS_PC

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, update comment "ATOMIC_OPS_LIBS, PACKAGE_VERSION are defined above" below

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"
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Define ATOMIC_OPS_LIBS based on ATOMIC_OPS_PC value.

AC_SUBST([ATOMIC_OPS_LIBS])],
ATOMIC_OPS_PC="atomic_ops"
AC_SUBST([ATOMIC_OPS_LIBS])
AC_SUBST([ATOMIC_OPS_PC])],
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also define ATOMIC_OPS_PC="" below (for internal "internal" case)

[AC_MSG_RESULT([none])
AS_IF([test x"$THREADS" != xnone],
[AC_DEFINE([GC_BUILTIN_ATOMIC], [1],
Expand Down
Loading