From df13124fb337260a9f30495159a7db89d7461e4d Mon Sep 17 00:00:00 2001
From: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
Date: Sun, 8 Feb 2015 22:53:34 -0800
Subject: [PATCH] Adjust out-of range error to be a warning on ppc

AKA <rdar://problem/9610466> for ppc

https://trac.macports.org/ticket/46801

Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
---
 src/ld/OutputFile.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/ld/OutputFile.cpp b/src/ld/OutputFile.cpp
index 6150b5c..27fdaad 100644
--- src/ld/OutputFile.cpp
+++ src/ld/OutputFile.cpp
@@ -625,7 +625,7 @@ void OutputFile::rangeCheckAbsolute32(int64_t displacement, ld::Internal& state,
 		// is encoded in mach-o the same as:
 		//  .long _foo + 0x40000000
 		// so if _foo lays out to 0xC0000100, the first is ok, but the second is not.  
-		if ( (_options.architecture() == CPU_TYPE_ARM) || (_options.architecture() == CPU_TYPE_I386) ) {
+		if ( (_options.architecture() == CPU_TYPE_ARM) || (_options.architecture() == CPU_TYPE_I386) || (_options.architecture() == CPU_TYPE_POWERPC) ) {
 			// Unlikely userland code does funky stuff like this, so warn for them, but not warn for -preload or -static
 			if ( (_options.outputKind() != Options::kPreload) && (_options.outputKind() != Options::kStaticExecutable) ) {
 				warning("32-bit absolute address out of range (0x%08llX max is 4GB): from %s + 0x%08X (0x%08llX) to 0x%08llX", 
-- 
2.3.0

