Difference between revisions of "Porting/Chromium (Old)"
(Draft about porting Chromium) |
|||
Line 4: | Line 4: | ||
sudo apt update | sudo apt update | ||
+ | |||
sudo apt full-upgrade | sudo apt full-upgrade | ||
+ | |||
sudo apt install python libcups2-dev pkg-config libnss3-dev libssl-dev libglib2.0-dev libgnome-keyring-dev libpango1.0-dev libdbus-1-dev libatk1.0-dev libatk-bridge2.0-dev libgtk-3-dev re2c subversion | sudo apt install python libcups2-dev pkg-config libnss3-dev libssl-dev libglib2.0-dev libgnome-keyring-dev libpango1.0-dev libdbus-1-dev libatk1.0-dev libatk-bridge2.0-dev libgtk-3-dev re2c subversion | ||
cd | cd | ||
+ | |||
git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git | git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git | ||
export PATH=$PATH:$(pwd)/ninja | export PATH=$PATH:$(pwd)/ninja | ||
+ | |||
export PATH=$PATH:$(pwd)/depot_tools | export PATH=$PATH:$(pwd)/depot_tools | ||
+ | |||
export VPYTHON_BYPASS="manually managed python not supported by chrome operations" | export VPYTHON_BYPASS="manually managed python not supported by chrome operations" | ||
+ | |||
GYP_DEFINES="disable_nacl=1" | GYP_DEFINES="disable_nacl=1" | ||
git clone git://github.com/ninja-build/ninja.git | git clone git://github.com/ninja-build/ninja.git | ||
+ | |||
cd ninja | cd ninja | ||
+ | |||
git checkout release | git checkout release | ||
Line 28: | Line 36: | ||
export CC=gcc | export CC=gcc | ||
+ | |||
export CXX=g++ | export CXX=g++ | ||
+ | |||
export AR=ar | export AR=ar | ||
cd gn | cd gn | ||
+ | |||
python build/gen.py --no-sysroot | python build/gen.py --no-sysroot | ||
cat out/build.ninja | sed s/-stdlib=libstdc++//g | tee out/build.ninja | cat out/build.ninja | sed s/-stdlib=libstdc++//g | tee out/build.ninja | ||
+ | |||
ninja -C out | ninja -C out | ||
unset CXX | unset CXX | ||
+ | |||
unset CC | unset CC | ||
+ | |||
unset AR | unset AR | ||
+ | |||
cd | cd | ||
mkdir chromium | mkdir chromium | ||
+ | |||
cd chromium | cd chromium | ||
Line 50: | Line 66: | ||
cat src/DEPS | sed "s/git_revision:bc125484b8513898f17bc2501ac5e95330f44a3b/git_revision:ed999c8ac210539ae9d71f65436a2c47015712d5/" | tee src/DEPS | cat src/DEPS | sed "s/git_revision:bc125484b8513898f17bc2501ac5e95330f44a3b/git_revision:ed999c8ac210539ae9d71f65436a2c47015712d5/" | tee src/DEPS | ||
+ | |||
cat src/third_party/binutils/download.py | sed "s/return 1/return FetchAndExtract(arch)/" | tee src/third_party/binutils/download.py | cat src/third_party/binutils/download.py | sed "s/return 1/return FetchAndExtract(arch)/" | tee src/third_party/binutils/download.py | ||
gclient sync | gclient sync | ||
+ | |||
gclient runhooks | gclient runhooks | ||
mv src/buildtools/linux64/gn src/buildtools/linux64/gn.old | mv src/buildtools/linux64/gn src/buildtools/linux64/gn.old | ||
+ | |||
ln -s $HOME/gn/out/gn src/buildtools/linux64/gn | ln -s $HOME/gn/out/gn src/buildtools/linux64/gn | ||
Line 61: | Line 80: | ||
# | # | ||
+ | |||
# PASTE IN EDITOR | # PASTE IN EDITOR | ||
enable_nacl=false | enable_nacl=false | ||
+ | |||
treat_warnings_as_errors=false | treat_warnings_as_errors=false | ||
Line 71: | Line 92: | ||
cat buildtools/third_party/libc++/trunk/include/thread | sed "s/_LIBCPP_CONSTEXPR duration<long double> _Max/duration<long double> _Max/" | tee buildtools/third_party/libc++/trunk/include/thread | cat buildtools/third_party/libc++/trunk/include/thread | sed "s/_LIBCPP_CONSTEXPR duration<long double> _Max/duration<long double> _Max/" | tee buildtools/third_party/libc++/trunk/include/thread | ||
+ | |||
cat third_party/webrtc/rtc_base/system/arch.h | sed "s/#else\n#error Please add support for your architecture in typedefs.h/#elif defined(__PPC__)\n#define WEBRTC_ARCH_PPC_FAMILY\n#if defined(__ORDER_LITTLE_ENDIAN__)\n#define WEBRTC_ARCH_LITTLE_ENDIAN\n#else\n#define WEBRTC_ARCH_BIG_ENDIAN\n#endif\n#if defined(__LP64__)\n#define WEBRTC_ARCH_64_BITS\n#else\n#define WEBRTC_ARCH_32_BITS\n#endif\n#else\n#error Please add support for your architecture in typedefs.h/" | tee third_party/webrtc/rtc_base/system/arch.h | cat third_party/webrtc/rtc_base/system/arch.h | sed "s/#else\n#error Please add support for your architecture in typedefs.h/#elif defined(__PPC__)\n#define WEBRTC_ARCH_PPC_FAMILY\n#if defined(__ORDER_LITTLE_ENDIAN__)\n#define WEBRTC_ARCH_LITTLE_ENDIAN\n#else\n#define WEBRTC_ARCH_BIG_ENDIAN\n#endif\n#if defined(__LP64__)\n#define WEBRTC_ARCH_64_BITS\n#else\n#define WEBRTC_ARCH_32_BITS\n#endif\n#else\n#error Please add support for your architecture in typedefs.h/" | tee third_party/webrtc/rtc_base/system/arch.h | ||
ninja -C out/Default chrome | ninja -C out/Default chrome |
Revision as of 02:24, 9 August 2018
DRAFT
Install Ubuntu 16 LTS ppc64le in VM with good amount of CPUs and ~16GB RAM
sudo apt update
sudo apt full-upgrade
sudo apt install python libcups2-dev pkg-config libnss3-dev libssl-dev libglib2.0-dev libgnome-keyring-dev libpango1.0-dev libdbus-1-dev libatk1.0-dev libatk-bridge2.0-dev libgtk-3-dev re2c subversion
cd
git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
export PATH=$PATH:$(pwd)/ninja
export PATH=$PATH:$(pwd)/depot_tools
export VPYTHON_BYPASS="manually managed python not supported by chrome operations"
GYP_DEFINES="disable_nacl=1"
git clone git://github.com/ninja-build/ninja.git
cd ninja
git checkout release
./configure.py --bootstrap
which ninja # ensure it is right ninja bin, else figure out a way so it is the right one that comes up
cd
git clone https://gn.googlesource.com/gn
export CC=gcc
export CXX=g++
export AR=ar
cd gn
python build/gen.py --no-sysroot
cat out/build.ninja | sed s/-stdlib=libstdc++//g | tee out/build.ninja
ninja -C out
unset CXX
unset CC
unset AR
cd
mkdir chromium
cd chromium
fetch --no-history --nohooks chromium
cat src/DEPS | sed "s/git_revision:bc125484b8513898f17bc2501ac5e95330f44a3b/git_revision:ed999c8ac210539ae9d71f65436a2c47015712d5/" | tee src/DEPS
cat src/third_party/binutils/download.py | sed "s/return 1/return FetchAndExtract(arch)/" | tee src/third_party/binutils/download.py
gclient sync
gclient runhooks
mv src/buildtools/linux64/gn src/buildtools/linux64/gn.old
ln -s $HOME/gn/out/gn src/buildtools/linux64/gn
gn args out/Default
- PASTE IN EDITOR
enable_nacl=false
treat_warnings_as_errors=false
- END PASTE
- Save file and it will generate build configuration
cat buildtools/third_party/libc++/trunk/include/thread | sed "s/_LIBCPP_CONSTEXPR duration<long double> _Max/duration<long double> _Max/" | tee buildtools/third_party/libc++/trunk/include/thread
cat third_party/webrtc/rtc_base/system/arch.h | sed "s/#else\n#error Please add support for your architecture in typedefs.h/#elif defined(__PPC__)\n#define WEBRTC_ARCH_PPC_FAMILY\n#if defined(__ORDER_LITTLE_ENDIAN__)\n#define WEBRTC_ARCH_LITTLE_ENDIAN\n#else\n#define WEBRTC_ARCH_BIG_ENDIAN\n#endif\n#if defined(__LP64__)\n#define WEBRTC_ARCH_64_BITS\n#else\n#define WEBRTC_ARCH_32_BITS\n#endif\n#else\n#error Please add support for your architecture in typedefs.h/" | tee third_party/webrtc/rtc_base/system/arch.h
ninja -C out/Default chrome