summaryrefslogtreecommitdiff
path: root/Rules.mak
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2006-03-24 00:16:17 +0000
committerMike Frysinger <vapier@gentoo.org>2006-03-24 00:16:17 +0000
commit39eff5150b839a92e852cdff4d2ad055f962f724 (patch)
treeb055636a6d684e99adc53b74f4b54ae06d58d468 /Rules.mak
parent9d341d2232058327d65e6d4ab3c8a2cfaf6d12a9 (diff)
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.
Diffstat (limited to 'Rules.mak')
-rw-r--r--Rules.mak7
1 files changed, 7 insertions, 0 deletions
diff --git a/Rules.mak b/Rules.mak
index 947f006f7..6f92e6f3a 100644
--- a/Rules.mak
+++ b/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