Skip to content
This repository was archived by the owner on May 21, 2019. It is now read-only.

Commit 44f2671

Browse files
vadimcnalexcrichton
authored andcommitted
-fPIC switch does not apply on Windows.
1 parent 48efde2 commit 44f2671

File tree

5 files changed

+6
-6
lines changed

5 files changed

+6
-6
lines changed

make/config.mk

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,6 @@ endif
4444
###
4545
# Common compiler options
4646
COMMON_INCLUDES=-I${ProjSrcRoot}/lib -I${ProjSrcRoot}/include
47-
COMMON_CXXFLAGS=-std=c++11 -fno-exceptions -fPIC -funwind-tables $(COMMON_INCLUDES)
48-
COMMON_CFLAGS=-fPIC $(COMMON_INCLUDES)
47+
COMMON_CXXFLAGS=-std=c++11 -fno-exceptions -funwind-tables $(COMMON_INCLUDES)
48+
COMMON_CFLAGS=$(COMMON_INCLUDES)
4949
COMMON_ASMFLAGS=$(COMMON_INCLUDES)

make/platform/clang_darwin.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ endif
136136
override CC := $(subst -arch ,-arch_,$(CC))
137137
override CC := $(patsubst -arch_%,,$(CC))
138138

139-
CFLAGS := -Wall -Werror -O3 -fomit-frame-pointer
139+
CFLAGS := -fPIC -Wall -Werror -O3 -fomit-frame-pointer
140140

141141
# Always set deployment target arguments for every build, these libraries should
142142
# never depend on the environmental overrides. We simply set them to minimum

make/platform/clang_linux.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ endif
8585

8686
###
8787

88-
CFLAGS := -Wall -Werror -O3 -fomit-frame-pointer
88+
CFLAGS := -fPIC -Wall -Werror -O3 -fomit-frame-pointer
8989
SANITIZER_CFLAGS := -fPIE -fno-builtin -gline-tables-only
9090

9191
CFLAGS.full-i386 := $(CFLAGS) -m32

make/platform/darwin_bni.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ ifneq (,$(SDKROOT))
2929
DEPLOYMENT_FLAGS += -isysroot $(SDKROOT)
3030
endif
3131

32-
CFLAGS := -Wall -Os -fomit-frame-pointer -g $(DEPLOYMENT_FLAGS)
32+
CFLAGS := -fPIC -Wall -Os -fomit-frame-pointer -g $(DEPLOYMENT_FLAGS)
3333
CFLAGS.Static := $(CFLAGS) -static
3434
DYLIB_FLAGS := $(DEPLOYMENT_FLAGS) \
3535
-Xarch_arm -Wl,-alias_list,$(SRCROOT)/lib/arm/softfloat-alias.list

make/platform/darwin_fat.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ UniversalArchs := i386 x86_64
3939

4040
CC := clang
4141

42-
CFLAGS := -Wall -Werror
42+
CFLAGS := -fPIC -Wall -Werror
4343
CFLAGS.Debug := $(CFLAGS) -g
4444
CFLAGS.Release := $(CFLAGS) -O3 -fomit-frame-pointer
4545
CFLAGS.Profile := $(CFLAGS) -pg -g

0 commit comments

Comments
 (0)