summaryrefslogtreecommitdiff
path: root/Makefile.direct
diff options
context:
space:
mode:
authorPaul Bone <paul@bone.id.au>2018-01-18 11:42:05 +0300
committerIvan Maidanski <ivmai@mail.ru>2018-01-18 11:42:05 +0300
commit19bc7d942b1bea8cc5584b69fb1fa851b9de64b7 (patch)
treefd8e7aa9f3262bdf6ff1688bcfa3c5578818f656 /Makefile.direct
parent6b2095be1311a37c9daa01f4142046183e59032a (diff)
downloadbdwgc-19bc7d942b1bea8cc5584b69fb1fa851b9de64b7.tar.gz
Pass CFLAGS_FOR_PIC value to CFLAGS in Makefile.direct
(part of commit 91bf29b1a from Mercury-Language/bdwgc) * Makefile.direct (CFLAGS): Add comment. * Makefile.direct (CFLAGS, SPECIALCFLAGS): Add $(CFLAGS_FOR_PIC).
Diffstat (limited to 'Makefile.direct')
-rw-r--r--Makefile.direct5
1 files changed, 3 insertions, 2 deletions
diff --git a/Makefile.direct b/Makefile.direct
index 0b61e53a..c73a1070 100644
--- a/Makefile.direct
+++ b/Makefile.direct
@@ -44,9 +44,10 @@ VPATH= $(srcdir)
AO_SRC_DIR=$(srcdir)/libatomic_ops
CFLAGS_EXTRA=
+# We need CFLAGS_FOR_PIC because we might be building a shared library.
CFLAGS= -O -I$(srcdir)/include -I$(AO_SRC_DIR)/src \
-DGC_ATOMIC_UNCOLLECTABLE -DNO_EXECUTE_PERMISSION -DALL_INTERIOR_POINTERS \
- -DENABLE_DISCLAIM $(CFLAGS_EXTRA)
+ -DENABLE_DISCLAIM $(CFLAGS_FOR_PIC) $(CFLAGS_EXTRA)
# To build the collector with threads support, add to the above:
# -DGC_THREADS -DPARALLEL_MARK -DTHREAD_LOCAL_ALLOC
@@ -133,7 +134,7 @@ CURSES= -lcurses
# the SHELL environment variable.
SHELL= /bin/sh
-SPECIALCFLAGS= -I$(srcdir)/include -I$(AO_SRC_DIR)/src
+SPECIALCFLAGS= -I$(srcdir)/include -I$(AO_SRC_DIR)/src $(CFLAGS_FOR_PIC)
# Alternative flags to the C compiler for mach_dep.c.
# Mach_dep.c often doesn't like optimization, and it's
# not time-critical anyway.