Skip to content
This repository was archived by the owner on Oct 12, 2022. It is now read-only.

Commit f9276a7

Browse files
authored
Merge pull request #1721 from jmdavis/fpic_unittest
Partial fix for running druntime unittest with PIC=1. merged-on-behalf-of: Sebastian Wilzbach <sebi.wilzbach@gmail.com>
2 parents 5d714b7 + 91baa92 commit f9276a7

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

posix.mak

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ test/shared/.run: $(DRUNTIMESO)
265265
test/%/.run: test/%/Makefile
266266
$(QUIET)$(MAKE) -C test/$* MODEL=$(MODEL) OS=$(OS) DMD=$(abspath $(DMD)) BUILD=$(BUILD) \
267267
DRUNTIME=$(abspath $(DRUNTIME)) DRUNTIMESO=$(abspath $(DRUNTIMESO)) LINKDL=$(LINKDL) \
268-
QUIET=$(QUIET) TIMELIMIT='$(TIMELIMIT)'
268+
QUIET=$(QUIET) TIMELIMIT='$(TIMELIMIT)' PIC=$(PIC)
269269

270270
#################### test for undesired white spaces ##########################
271271
MANIFEST = $(shell git ls-tree --name-only -r HEAD)

test/common.mak

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,13 @@ SRC:=src
1414
GENERATED:=./generated
1515
ROOT:=$(GENERATED)/$(OS)/$(BUILD)/$(MODEL)
1616

17+
OPTIONAL_PIC:=$(if $(PIC),-fPIC,)
18+
1719
ifneq (default,$(MODEL))
1820
MODEL_FLAG:=-m$(MODEL)
1921
endif
2022
CFLAGS:=$(MODEL_FLAG) -Wall
21-
DFLAGS:=$(MODEL_FLAG) -w -I../../src -I../../import -I$(SRC) -defaultlib= -debuglib= -dip1000
23+
DFLAGS:=$(MODEL_FLAG) -w -I../../src -I../../import -I$(SRC) -defaultlib= -debuglib= -dip1000 $(OPTIONAL_PIC)
2224
# LINK_SHARED may be set by importing makefile
2325
DFLAGS+=$(if $(LINK_SHARED),-L$(DRUNTIMESO),-L$(DRUNTIME))
2426
ifeq ($(BUILD),debug)

0 commit comments

Comments
 (0)