Browse Source

Use "-K PIC" for assembler call if pic mode is selected

git-svn-id: trunk@22479 -
pierre 13 years ago
parent
commit
543cf7e78b
1 changed files with 9 additions and 0 deletions
  1. 9 0
      rtl/linux/Makefile.fpc

+ 9 - 0
rtl/linux/Makefile.fpc

@@ -134,6 +134,15 @@ ifeq ($(ARCH),mipsel)
   ASTARGET=-EL
 endif
 
+ifeq ($(ARCH),sparc)
+  ifneq ($(findstring -Cg ,$(COMPILER)),)
+    ASTARGET+=-K PIC --defsym PIC=1
+  endif
+  ifneq ($(findstring -fPIC ,$(COMPILER)),)
+    ASTARGET+=-K PIC --defsym PIC=1
+  endif
+endif
+
 #
 # Loaders
 #