Skip to content

Commit 7878971

Browse files
committed
Add -fPIE to big-int makefile.
1 parent 32d44b9 commit 7878971

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/big-int/makefile

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,17 @@ include ../common
44
SRC = bigint-func.cc bigint.cc
55
CLEANFILES = big-int$(LIBEXT)
66

7+
ifeq ($(OS),Windows_NT)
8+
detected_OS := Windows
9+
else
10+
detected_OS := $(shell sh -c 'uname 2>/dev/null || echo Unknown')
11+
endif
12+
13+
ifeq ($(detected_OS),Linux)
14+
CFLAGS += -fPIE
15+
CXXFLAGS += -fPIE
16+
endif
17+
718
all: big-int$(LIBEXT)
819

920
big-int$(LIBEXT): $(OBJ)

0 commit comments

Comments
 (0)