summaryrefslogtreecommitdiffstats
path: root/lib/libthr
diff options
context:
space:
mode:
authoremaste <emaste@FreeBSD.org>2014-11-21 02:05:48 +0000
committeremaste <emaste@FreeBSD.org>2014-11-21 02:05:48 +0000
commitc7e313326dae74e64f75ded1afb06337d55ecd57 (patch)
tree9eebff29c016aa690ddbb8ca4e33ff42270a0d1c /lib/libthr
parent8723ec446135291c191b573bd01676c8a4c83d3e (diff)
downloadFreeBSD-src-c7e313326dae74e64f75ded1afb06337d55ecd57.zip
FreeBSD-src-c7e313326dae74e64f75ded1afb06337d55ecd57.tar.gz
Use canonical __PIC__ flag
It is automatically set when -fPIC is passed to the compiler. Reviewed by: dim, kib Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D1179
Diffstat (limited to 'lib/libthr')
-rw-r--r--lib/libthr/thread/thr_exit.c10
-rw-r--r--lib/libthr/thread/thr_private.h2
2 files changed, 6 insertions, 6 deletions
diff --git a/lib/libthr/thread/thr_exit.c b/lib/libthr/thread/thr_exit.c
index 7001311..7b13db6 100644
--- a/lib/libthr/thread/thr_exit.c
+++ b/lib/libthr/thread/thr_exit.c
@@ -54,7 +54,7 @@ __weak_reference(_pthread_exit, pthread_exit);
static int message_printed;
static void thread_unwind(void) __dead2;
-#ifdef PIC
+#ifdef __PIC__
static void thread_uw_init(void);
static _Unwind_Reason_Code thread_unwind_stop(int version,
_Unwind_Action actions,
@@ -114,7 +114,7 @@ _Unwind_GetCFA(struct _Unwind_Context *context)
#else
#pragma weak _Unwind_GetCFA
#pragma weak _Unwind_ForcedUnwind
-#endif /* PIC */
+#endif /* __PIC__ */
static void
thread_unwind_cleanup(_Unwind_Reason_Code code, struct _Unwind_Exception *e)
@@ -222,11 +222,11 @@ _pthread_exit_mask(void *status, sigset_t *mask)
curthread->ret = status;
#ifdef _PTHREAD_FORCED_UNWIND
-#ifdef PIC
+#ifdef __PIC__
thread_uw_init();
-#endif /* PIC */
+#endif /* __PIC__ */
-#ifdef PIC
+#ifdef __PIC__
if (uwl_forcedunwind != NULL) {
#else
if (_Unwind_ForcedUnwind != NULL) {
diff --git a/lib/libthr/thread/thr_private.h b/lib/libthr/thread/thr_private.h
index c6651cd..f9735e7 100644
--- a/lib/libthr/thread/thr_private.h
+++ b/lib/libthr/thread/thr_private.h
@@ -100,7 +100,7 @@ TAILQ_HEAD(mutex_queue, pthread_mutex);
#define THR_ASSERT(cond, msg)
#endif
-#ifdef PIC
+#ifdef __PIC__
# define STATIC_LIB_REQUIRE(name)
#else
# define STATIC_LIB_REQUIRE(name) __asm (".globl " #name)
OpenPOWER on IntegriCloud