Bugzilla Bug 266123: support 64-bit PowerPC builds for Linux distributions
authorwtchang%redhat.com
Thu, 18 Aug 2005 17:48:26 +0000
changeset 6016 3091767f31b23dd2f308fbe6d5006e8d5a0e448c
parent 6015 227a34c73ec8130020721e94bdff7d31fc61573c
child 6026 58123f6561de9d935803136ab8638ec0851ba8f8
push idunknown
push userunknown
push dateunknown
bugs266123
Bugzilla Bug 266123: support 64-bit PowerPC builds for Linux distributions (such as Red Hat and Fedora) whose GCC generates 32-bit code by default. r=cls.
security/coreconf/Linux.mk
--- a/security/coreconf/Linux.mk
+++ b/security/coreconf/Linux.mk
@@ -50,20 +50,23 @@ CC			= gcc
 CCC			= g++
 RANLIB			= ranlib
 
 DEFAULT_COMPILER = gcc
 
 ifeq ($(OS_TEST),m68k)
 	OS_REL_CFLAGS	= -DLINUX1_2 -D_XOPEN_SOURCE
 	CPU_ARCH	= m68k
-else
+else	
 ifeq ($(OS_TEST),ppc64)
 	OS_REL_CFLAGS	= -DLINUX1_2 -D_XOPEN_SOURCE
-	CPU_ARCH	= ppc64
+	CPU_ARCH	= ppc
+ifeq ($(USE_64),1)
+	ARCHFLAG	= -m64
+endif
 else
 ifeq ($(OS_TEST),ppc)
 	OS_REL_CFLAGS	= -DLINUX1_2 -D_XOPEN_SOURCE
 	CPU_ARCH	= ppc
 else
 ifeq ($(OS_TEST),alpha)
         OS_REL_CFLAGS   = -D_ALPHA_ -DLINUX1_2 -D_XOPEN_SOURCE
 	CPU_ARCH	= alpha
@@ -74,17 +77,17 @@ ifeq ($(OS_TEST),ia64)
 else
 ifeq ($(OS_TEST),x86_64)
 ifeq ($(USE_64),1)
 	OS_REL_CFLAGS	= -DLINUX1_2 -D_XOPEN_SOURCE
 	CPU_ARCH	= x86_64
 else
 	OS_REL_CFLAGS	= -DLINUX1_2 -Di386 -D_XOPEN_SOURCE
 	CPU_ARCH	= x86
-	ARCHFLAG    = -m32
+	ARCHFLAG	= -m32
 endif
 else
 ifeq ($(OS_TEST),sparc)
 	OS_REL_CFLAGS   = -DLINUX1_2 -D_XOPEN_SOURCE
 	CPU_ARCH        = sparc
 else
 ifeq ($(OS_TEST),sparc64)
 	OS_REL_CFLAGS   = -DLINUX1_2 -D_XOPEN_SOURCE
@@ -158,17 +161,17 @@ ifdef USE_PTHREADS
 	DEFINES		+= -D_REENTRANT
 endif
 
 ARCH			= linux
 
 DSO_CFLAGS		= -fPIC
 DSO_LDOPTS		= -shared $(ARCHFLAG)
 DSO_LDFLAGS		=
-LDFLAGS += $(ARCHFLAG)
+LDFLAGS			+= $(ARCHFLAG)
 
 # INCLUDES += -I/usr/include -Y/usr/include/linux
 G++INCLUDES		= -I/usr/include/g++
 
 #
 # Always set CPU_TAG on Linux, OpenVMS, WINCE.
 #
 CPU_TAG = _$(CPU_ARCH)