[x265] [PATCH] Optional POWER8 Little Endian Crosscompilation

Peter Kovář peter.kovar at reflexion.tv
Mon Sep 14 12:07:30 CEST 2015


# HG changeset patch
# User Peter Kovář <peter.kovar at reflexion.tv>
# Date 1441997493 -7200
#      Fri Sep 11 20:51:33 2015 +0200
# Node ID 416172d06485676f29eb227efad85041fca97821
# Parent  3cafbcfb10ed43f3b7b59430ef17f563c2f747f1
Optional POWER8 Little Endian Crosscompilation

This is optional patch intended for crosscompilation on Intel/AMD machine with target CPU POWER8 running in the little endian configuration. It is not neccessary for building on POWER.

diff -r 3cafbcfb10ed -r 416172d06485 build/linux/make-Makefiles.bash
--- a/build/linux/make-Makefiles.bash	Fri Sep 11 20:12:51 2015 +0200
+++ b/build/linux/make-Makefiles.bash	Fri Sep 11 20:51:33 2015 +0200
@@ -1,3 +1,6 @@
 #!/bin/bash
+
+CROSS="-DCMAKE_TOOLCHAIN_FILE=powerpc64le-linux-gnu.cmake"
+
 # Run this from within a bash shell
-cmake -G "Unix Makefiles" ../../source && ccmake ../../source
+cmake $CROSS -G "Unix Makefiles" ../../source && ccmake $CROSS ../../source
diff -r 3cafbcfb10ed -r 416172d06485 build/linux/powerpc64le-linux-gnu.cmake
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/build/linux/powerpc64le-linux-gnu.cmake	Fri Sep 11 20:51:33 2015 +0200
@@ -0,0 +1,9 @@
+set(triple powerpc64le-linux-gnu)
+set(CMAKE_SYSTEM_NAME Linux)
+set(CMAKE_SYSTEM_PROCESSOR ppc64le)
+set(CMAKE_SYSROOT /usr/${triple}/sys-root)
+set(CMAKE_INSTALL_PREFIX /usr/${triple}/sys-root/usr/local)
+set(CMAKE_C_COMPILER ${triple}-gcc)
+set(CMAKE_C_FLAGS)
+set(CMAKE_CXX_COMPILER ${triple}-c++ -Wl,-rpath=/usr/${triple}/sys-root/usr/lib64)
+set(CMAKE_CXX_FLAGS "-mcpu=power8 -mtune=power8 -mpower8-vector -I/usr/${triple}/sys-root/usr/include/c++/5.1.1 -I/usr/${triple}/sys-root/usr/include/c++/5.1.1/ppc64le-redhat-linux")


More information about the x265-devel mailing list