Skip to content

Commit 3e7930d

Browse files
committed
Fix PowerPC compiler macros in Darwin Makefile.arch
1 parent a355313 commit 3e7930d

File tree

1 file changed

+18
-6
lines changed

1 file changed

+18
-6
lines changed

arch/darwin/Makefile.arch

+18-6
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
ALL_ARCH = arm64 arm64e i686 x86_64 x86_64h ppc ppc64
66

77
# Override these to match the compiler(s) being used.
8+
# For x86 and ARM, assume clang is being used by default.
89
ifeq (${XCODE_3},1)
910
ARM64_CC ?= unsupported-architecture
1011
ARM64E_CC ?= unsupported-architecture
@@ -13,17 +14,23 @@ X86_CC ?= i686-apple-darwin10-gcc-4.2.1
1314
X86_CXX ?= i686-apple-darwin10-g++-4.2.1
1415
X86_64_CC ?= ${X86_CC} -m64
1516
X86_64_CXX ?= ${X86_CXX} -m64
16-
PPC_CC ?= powerpc-apple-darwin10-gcc-4.0.1
17-
PPC_CXX ?= powerpc-apple-darwin10-g++-4.0.1
18-
PPC64_CC ?= powerpc-apple-darwin10-gcc-4.2.1 -m64
19-
PPC64_CXX ?= powerpc-apple-darwin10-g++-4.2.1 -m64
2017
STDLIB ?=
2118
else
2219
ARM64_CFLAGS ?= -arch arm64
2320
ARM64E_CFLAGS ?= -arch arm64e
2421
X86_CFLAGS ?= -arch i686
2522
X86_64_CFLAGS ?= -arch x86_64
2623
X86_64H_CFLAGS ?= -arch x86_64h
24+
endif
25+
26+
# For PowerPC, assume the Xcode 3 compilers are being used by default.
27+
XCODE_3_PPC ?= 1
28+
ifeq (${XCODE_3_PPC},1)
29+
PPC_CC ?= powerpc-apple-darwin10-gcc-4.0.1
30+
PPC_CXX ?= powerpc-apple-darwin10-g++-4.0.1
31+
PPC64_CC ?= powerpc-apple-darwin10-gcc-4.2.1 -m64
32+
PPC64_CXX ?= powerpc-apple-darwin10-g++-4.2.1 -m64
33+
else
2734
PPC_CC ?= powerpc-apple-darwin10-gcc
2835
PPC_CXX ?= powerpc-apple-darwin10-g++
2936
PPC64_CC ?= powerpc64-apple-darwin10-gcc
@@ -68,14 +75,14 @@ endif
6875
ifeq (${ARCH},ppc)
6976
CC := $(or ${PPC_CC},${CC}) ${PPC_CFLAGS}
7077
CXX := $(or ${PPC_CXX},${CXX}) ${PPC_CFLAGS}
71-
STDLIB ?= libstdc++
78+
SYSROOT ?= /Developer/SDKs/MacOSX10.4u.sdk
7279
MINVER ?= 10.4
7380
endif
7481

7582
ifeq (${ARCH},ppc64)
7683
CC := $(or ${PPC64_CC},${CC}) ${PPC64_CFLAGS}
7784
CXX := $(or ${PPC64_CXX},${CXX}) ${PPC64_CFLAGS}
78-
STDLIB ?= libstdc++
85+
SYSROOT ?= /Developer/SDKs/MacOSX10.4u.sdk
7986
MINVER ?= 10.4
8087
endif
8188

@@ -87,3 +94,8 @@ endif
8794

8895
CC += -mmacosx-version-min=${MINVER}
8996
CXX += -mmacosx-version-min=${MINVER}
97+
98+
ifneq (${SYSROOT},)
99+
CC += -isysroot "${SYSROOT}"
100+
CXX += -isysroot "${SYSROOT}"
101+
endif

0 commit comments

Comments
 (0)