build compiler-rt with -fPIC, otherwise the run-time libs will not link with -pie, at least on linux

llvm-svn: 146499
This commit is contained in:
Kostya Serebryany 2011-12-13 18:58:47 +00:00
parent 9b9f7a9f7a
commit 0e5704607b
2 changed files with 3 additions and 2 deletions

View File

@ -227,7 +227,7 @@ $(Tmp.ObjPath)/%.o: $(Tmp.SrcPath)/%.S $(Tmp.Dependencies) $(Tmp.ObjPath)/.dir
$(Verb) $(Tmp.CC) $(Tmp.CFLAGS) -c -o $$@ $$<
$(Tmp.ObjPath)/%.o: $(Tmp.SrcPath)/%.c $(Tmp.Dependencies) $(Tmp.ObjPath)/.dir
$(Summary) " COMPILE: $(Tmp.Name)/$(Tmp.Config)/$(Tmp.Arch): $$<"
$(Verb) $(Tmp.CC) $(Tmp.CFLAGS) -c -o $$@ $$<
$(Verb) $(Tmp.CC) $(Tmp.CFLAGS) -c $(COMMON_CFLAGS) -o $$@ $$<
$(Tmp.ObjPath)/%.o: $(Tmp.SrcPath)/%.cc $(Tmp.Dependencies) $(Tmp.ObjPath)/.dir
$(Summary) " COMPILE: $(Tmp.Name)/$(Tmp.Config)/$(Tmp.Arch): $$<"
$(Verb) $(Tmp.CC) $(Tmp.CFLAGS) -c $(COMMON_CXXFLAGS) -o $$@ $$<

View File

@ -42,4 +42,5 @@ endif
###
# Common compiler options
COMMON_CXXFLAGS=-fno-exceptions
COMMON_CXXFLAGS=-fno-exceptions -fPIC
COMMON_CFLAGS=-fPIC