ports/155310: [patch] make lang/python27 work on powerpc64

Andreas Tobler andreast at FreeBSD.org
Sun Mar 6 13:30:10 UTC 2011


>Number:         155310
>Category:       ports
>Synopsis:       [patch] make lang/python27 work on powerpc64
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Mar 06 13:30:10 UTC 2011
>Closed-Date:
>Last-Modified:
>Originator:     Andreas Tobler
>Release:        -CURRENT
>Organization:
none
>Environment:
[andreast at bohrium] /usr/ports/lang/python27/> uname -a
FreeBSD bohrium.andreas.nets 9.0-CURRENT FreeBSD 9.0-CURRENT #0 r219314M: Sun Mar  6 01:14:15 CET 2011     andreast at bohrium.andreas.nets:/usr/obj/export/devel/fbsd/src/sys/GENERIC64_G5  powerpc
>Description:
Once again a uname -p/m issue. The uname -m reports the hw arch while uname  -p reports the processor arch.
To build all packages correctly we should export UNAME_m="powerpc64" for powerpc64.

The attached patch does this. It includes also the correct bits for libffi.
>How-To-Repeat:
Always
>Fix:
Apply the following to the Makefile:

[andreast at bohrium] /usr/ports/lang/python27/> diff -u Makefile.orig Makefile
--- Makefile.orig	2010-11-30 04:34:54.000000000 +0100
+++ Makefile	2011-03-06 14:18:17.000000000 +0100
@@ -121,11 +121,14 @@
 .else
 PLIST_SUB+=	X86_ONLY="@comment "
 .endif
-.if ${ARCH} == amd64 || ${ARCH} == ia64 || ${ARCH} == sparc64 || ${ARCH} == alpha
+.if ${ARCH} == amd64 || ${ARCH} == ia64 || ${ARCH} == sparc64 || ${ARCH} == alpha || ${ARCH} == powerpc64
 PLIST_SUB+=	32BIT_ONLY="@comment "
 .else
 PLIST_SUB+=	32BIT_ONLY=""
 .endif
+.if ${ARCH} == powerpc64
+MAKE_ENV+= UNAME_m="powerpc64"
+.endif
 .if ${ARCH} == sparc64
 CFLAGS+=	-DPYTHON_DEFAULT_RECURSION_LIMIT=900
 .endif


And the attached patch belongs to files. 


Patch attached with submission follows:

--- Modules/_ctypes/libffi/configure.orig	2010-03-19 19:59:20.000000000 +0100
+++ Modules/_ctypes/libffi/configure	2011-03-06 09:20:16.000000000 +0100
@@ -6289,7 +6289,7 @@
   rm -rf conftest*
   ;;
 
-x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
+amd64-*-freebsd*|x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
 s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
   # Find out which ABI we are using.
   echo 'int i;' > conftest.$ac_ext
@@ -11275,6 +11275,9 @@
   powerpc-*-freebsd*)
 	TARGET=POWERPC_FREEBSD; TARGETDIR=powerpc
 	;;
+  powerpc64-*-freebsd*)
+	TARGET=POWERPC; TARGETDIR=powerpc
+	;;
   powerpc*-*-rtems*)
 	TARGET=POWERPC; TARGETDIR=powerpc
 	;;


>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list