浏览代码

Richard Sandiford writes:
m68k is one of those targets that does not accept -fPIC across the board.
It is supported for 68020 and above, but not for 68000, 68010, or Coldfire,
where using -fPIC leads to a compiler error. (Note that the error is flagged
by cc1 proper, so it probably wouldn't have mattered with older compilers.
It only matters now because cc1 is used to preprocess assembly code.)
The attached patch makes m68k targets use -fpic instead of -fPIC.

Mike Frysinger 19 年之前
父节点
当前提交
39eff5150b
共有 1 个文件被更改,包括 7 次插入0 次删除
  1. 7 0
      Rules.mak

+ 7 - 0
Rules.mak

@@ -250,6 +250,13 @@ ifeq ($(TARGET_ARCH),cris)
 	PIEFLAG_NAME:=-fpie
 endif
 
+ifeq ($(TARGET_ARCH),m68k)
+	# -fPIC is only supported for 68020 and above.  It is not supported
+	# for 68000, 68010, or Coldfire.
+	PICFLAG:=-fpic
+	PIEFLAG_NAME:=-fpie
+endif
+
 ifeq ($(TARGET_ARCH),powerpc)
 # PowerPC can hold 8192 entries in its GOT with -fpic which is more than
 # enough. Therefore use -fpic which will reduce code size and generates