浏览代码

app_sqlang: add -fPIC to compile options of squirrel libs

Daniel-Constantin Mierla 8 年之前
父节点
当前提交
5757f05832

+ 2 - 2
src/modules/app_sqlang/squirrel/sqstdlib/Makefile

@@ -26,7 +26,7 @@ SRCS= \
 
 
 sq32:
-	gcc -O2 -fno-exceptions -fno-rtti -Wall -fno-strict-aliasing -c $(SRCS) $(INCZ)
+	gcc -O2 -fno-exceptions -fPIC -fno-rtti -Wall -fno-strict-aliasing -c $(SRCS) $(INCZ)
 	ar rc $(OUT) *.o
 	rm *.o
 
@@ -36,6 +36,6 @@ sqprof:
 	rm *.o
 
 sq64:
-	gcc -O2 -m64 -fno-exceptions -D_SQ64 -fno-rtti -Wall -fno-strict-aliasing -c $(SRCS) $(INCZ)
+	gcc -O2 -m64 -fno-exceptions -fPIC -D_SQ64 -fno-rtti -Wall -fno-strict-aliasing -c $(SRCS) $(INCZ)
 	ar rc $(OUT) *.o
 	rm *.o

+ 2 - 2
src/modules/app_sqlang/squirrel/squirrel/Makefile

@@ -37,7 +37,7 @@ SRCS= \
 
 
 sq32:
-	gcc -O2 -fno-exceptions -fno-rtti -Wall -fno-strict-aliasing -c $(SRCS) $(INCZ) $(DEFS)
+	gcc -O2 -fno-exceptions -fPIC -fno-rtti -Wall -fno-strict-aliasing -c $(SRCS) $(INCZ) $(DEFS)
 	ar rc $(OUT) *.o
 	rm *.o
 
@@ -47,6 +47,6 @@ sqprof:
 	rm *.o
 
 sq64:
-	gcc -O2 -m64 -D_SQ64 -fno-exceptions -fno-rtti -Wall -fno-strict-aliasing -c $(SRCS) $(INCZ) $(DEFS)
+	gcc -O2 -m64 -D_SQ64 -fno-exceptions -fPIC -fno-rtti -Wall -fno-strict-aliasing -c $(SRCS) $(INCZ) $(DEFS)
 	ar rc $(OUT) *.o
 	rm *.o