From f0bf64e1e90b2913bc458dd453babbec916d7e61 Mon Sep 17 00:00:00 2001 From: Misty De Meo Date: Sun, 25 Aug 2013 14:29:55 -0700 Subject: [PATCH] superenv: support PPC bottles Allows for building bottles on PPC both with and without Altivec. This is currently not active but will be enabled once superenv is stable on Leopard. --- Library/ENV/4.3/cc | 4 ++++ Library/Homebrew/extend/ENV/super.rb | 8 ++++++++ 2 files changed, 12 insertions(+) diff --git a/Library/ENV/4.3/cc b/Library/ENV/4.3/cc index 79fb571024..fd22bb373b 100755 --- a/Library/ENV/4.3/cc +++ b/Library/ENV/4.3/cc @@ -161,6 +161,10 @@ class Cmd args << '-march=core2' elsif cccfg? 'bi' args << '-march=prescott' + elsif cccfg? 'bpA' + args << '-mcpu=7400' + elsif cccfg? 'bp' + args << '-mcpu=750' else args << '-march=native' if tool =~ /clang/ end diff --git a/Library/Homebrew/extend/ENV/super.rb b/Library/Homebrew/extend/ENV/super.rb index 9f4b293b3d..13111657be 100644 --- a/Library/Homebrew/extend/ENV/super.rb +++ b/Library/Homebrew/extend/ENV/super.rb @@ -85,6 +85,8 @@ module Superenv # b - Installing from a bottle # i - Installing from a bottle on Intel # 6 - Installing from a bottle on 64-bit Intel + # p - Installing from a bottle on PPC + # A - Installing from a bottle on PPC with Altivec # O - Enables argument refurbishing. Only active under the # make/bsdmake wrappers currently. # @@ -241,6 +243,12 @@ module Superenv else 'bi' end + elsif Hardware::CPU.type == :ppc + if Hardware::CPU.altivec? + 'bpA' + else + 'bp' + end else 'b' end