%global debug_package %{nil} %global commit 7d72623057456b133aae9e97f264b3a204e97edc %global shortcommit %(c=%{commit}; echo ${c:0:7}) %global commitdate 20160725 Name: chromium-native_client Summary: Google Native Client Toolchain # We'll just resync this when Chromium changes. It's fun! Version: 52.0.2743.82 Epoch: 1 Release: 1.%{commitdate}git%{shortcommit}%{?dist} # Notes: https://sites.google.com/a/chromium.org/dev/nativeclient/pnacl/building-pnacl-components-for-distribution-packagers # New model for prepping source: # git branch and rev comes from # grep "native_client.git" chromium-52.0.2743.82/DEPS # NEW: git clone https://chromium.googlesource.com/native_client/src/native_client # cd native_client # git checkout 7d72623057456b133aae9e97f264b3a204e97edc # toolchain_build/toolchain_build_pnacl.py --sync-only --verbose --disable-git-cache --no-use-remote-cache --no-use-cached-results # cd .. # tar -cJf chromium-native_client-52.0.2743.82.tar.xz native_client License: BSD and GPLv3+ and GPLv3+ with exceptions and GPLv2+ with exceptions and LGPLv2+ and NCSA and MIT Source0: %{name}-%{version}.tar.xz # svn export http://src.chromium.org/native_client/trunk/src/third_party/scons-2.0.1 # tar -cJf scons-2.0.1-nacl.tar.xz scons-2.0.1/ Source1: scons-2.0.1-nacl.tar.xz Source2: i686-nacl-gcc # svn checkout http://google-breakpad.googlecode.com/svn/trunk/ breakpad # tar -cJf breakpad-svn1498.tar.xz breakpad/ Source3: breakpad-svn1498.tar.xz Patch0: native_client-gcc-build-fix.patch Patch1: native_client-disable-errors.patch # it normally expects the breakpad source to be unpacked one level higher than the native_client root # but that's messy. we put it in the one place it is used instead. Patch4: native_client-use-local-breakpad.patch # Use system gcc instead of llvm from wherever. Patch5: native_client-50-system-clang.patch # Use Fedora's arm crosscompiler, not Ubuntu's. Patch6: native_client-49-fedora-arm-cross.patch # -mx32? Seriously?!? Patch7: native_client-no-mx32.patch # the pnacl translator throws a weird 4.6/4.7 mismatch error. Bypass it. Patch8: native_client-51-disable-compiler-version-checks.patch URL: http://src.chromium.org/viewvc/native_client/ # In theory, this beast will build for i686 and arm too... but not yet. ExclusiveArch: x86_64 BuildRequires: glibc-devel, texinfo, bison, gettext, flex, zlib-devel BuildRequires: /usr/bin/pod2man BuildRequires: /usr/bin/pod2html BuildRequires: groff, libffi-devel, libtool-ltdl-devel, ncurses-devel BuildRequires: cmake, python, zip, git, subversion BuildRequires: nacl-gcc, nacl-binutils, nacl-newlib BuildRequires: nacl-arm-gcc, nacl-arm-binutils, nacl-arm-newlib BuildRequires: glibc-devel(x86-32) # Yes, they need another toolchain to build this toolchain. BuildRequires: gcc-arm-linux-gnu, gcc-c++-arm-linux-gnu, glibc-arm-linux-gnu-devel # And another. BuildRequires: clang, llvm-devel # Hold your nose. # The two binutils are not a packaging mistake. # compiler-rt and subzero have no versioning I can find. Provides: bundled(valgrind) = 3.6 Provides: bundled(clang) = 3.7.0 Provides: bundled(breakpad) = 0.1 Provides: bundled(scons) = 2.0.1 Provides: bundled(binutils) = 2.25 Provides: bundled(binutils) = 2.24 Provides: bundled(compiler-rt) Provides: bundled(llvm) = 3.7.0 Provides: bundled(gcc) = 4.6.2 Provides: bundled(libcxx) = 1.0 Provides: bundled(libcxxabi) = 3.6.0 Provides: bundled(newlib) = 2.1.0 Provides: bundled(subzero) %description Google's "pnacl" toolchain for native client support in Chromium. Depends on their older "nacl" toolchain, packaged separately. %prep %setup -q -n native_client -a1 %patch0 -p1 -b .gccfix %patch1 -p1 -b .no-errors %patch4 -p1 -b .local-breakpad %patch5 -p1 -b .system-clang %patch6 -p1 -b .fedora-arm-cross %patch7 -p1 -b .nomx32 %patch8 -p1 -b .fixme mkdir -p toolchain/linux_x86/nacl_x86_newlib_raw/bin cp -a %{SOURCE2} toolchain/linux_x86/nacl_x86_newlib_raw/bin chmod +x toolchain/linux_x86/nacl_x86_newlib_raw/bin/i686-nacl-gcc mkdir -p toolchain/linux_x86/nacl_arm_newlib_raw/bin pushd src/untrusted/minidump_generator tar xvf %{SOURCE3} popd pushd toolchain/linux_x86/nacl_x86_newlib_raw/bin ln -s /usr/bin/x86_64-nacl-gcc x86_64-nacl-gcc ln -s /usr/bin/x86_64-nacl-g++ x86_64-nacl-g++ ln -s /usr/bin/x86_64-nacl-ar x86_64-nacl-ar ln -s /usr/bin/x86_64-nacl-as x86_64-nacl-as ln -s /usr/bin/x86_64-nacl-ranlib x86_64-nacl-ranlib ln -s /usr/bin/x86_64-nacl-strip x86-64-nacl-strip ln -s /usr/bin/x86_64-nacl-ld x86_64-nacl-ld popd pushd toolchain/linux_x86/nacl_x86_newlib_raw ln -s /usr/x86_64-nacl/lib lib ln -s /usr/x86_64-nacl x86_64-nacl popd pushd toolchain/linux_x86/nacl_arm_newlib_raw/bin ln -s /usr/bin/arm-nacl-gcc arm-nacl-gcc ln -s /usr/bin/arm-nacl-g++ arm-nacl-g++ ln -s /usr/bin/arm-nacl-ar arm-nacl-ar ln -s /usr/bin/arm-nacl-as arm-nacl-as ln -s /usr/bin/arm-nacl-ranlib arm-nacl-ranlib ln -s /usr/bin/arm-nacl-strip arm-nacl-strip ln -s /usr/bin/arm-nacl-ld arm-nacl-ld popd pushd toolchain/linux_x86/nacl_arm_newlib_raw ln -s /usr/arm-nacl/lib lib ln -s /usr/arm-nacl arm-nacl popd # Okay, so the part where I call this toolchain "glibc" # instead of newlib... that's a lie. It's still newlib # based. I might actually need to build it against # the nacl-glibc at some point, I'm just putting it off. pushd toolchain/linux_x86 ln -s nacl_x86_newlib_raw nacl_x86_newlib ln -s nacl_x86_newlib_raw nacl_x86_glibc_raw ln -s nacl_x86_newlib_raw nacl_x86_glibc popd %if 0 mkdir -p toolchain/linux_x86_newlib pushd toolchain/linux_x86_newlib popd mkdir -p toolchain/linux_x86_nacl_x86 pushd toolchain/linux_x86_nacl_x86 ln -s ../linux_x86_newlib nacl_x86_newlib popd ln -s /usr/x86_64-nacl/lib/ldscripts ldscripts %endif %build export PYTHONPATH=$PYTHONPATH:`pwd`/scons-2.0.1/engine #old, using gcc, may need to revert to it. %if 0 toolchain_build/toolchain_build_pnacl.py --verbose --clobber --gcc --no-use-cached-results --no-use-remote-cache --build-sbtc %else toolchain_build/toolchain_build_pnacl.py --verbose --clobber --no-use-cached-results --no-use-remote-cache --build-sbtc %endif build/package_version/package_version.py --packages pnacl_newlib --tar-dir toolchain_build/out/packages --dest-dir toolchain/ extract --skip-missing build/package_version/package_version.py --packages pnacl_translator --tar-dir toolchain_build/out/packages --dest-dir toolchain/ extract --skip-missing # PNACL_VERBOSE=true pnacl/build.sh translator-all # touch toolchain/linux_x86/pnacl_translator/pnacl_translator.json %if 0 pushd pnacl yes | ./build.sh build-all ./build.sh driver-install-translator popd %endif ./toolchain/linux_x86/pnacl_newlib/bin/pnacl-ranlib toolchain/linux_x86/pnacl_newlib/x86_64_bc-nacl/lib/libc.a ./toolchain/linux_x86/pnacl_newlib/bin/pnacl-ranlib toolchain/linux_x86/pnacl_newlib/x86_64_bc-nacl/lib/libc++.a ./toolchain/linux_x86/pnacl_newlib/bin/pnacl-ranlib toolchain/linux_x86/pnacl_newlib/x86_64_bc-nacl/lib/libg.a ./toolchain/linux_x86/pnacl_newlib/bin/pnacl-ranlib toolchain/linux_x86/pnacl_newlib/x86_64_bc-nacl/lib/libm.a # ./toolchain/linux_x86/pnacl_newlib/bin/pnacl-ranlib toolchain/linux_x86/pnacl_newlib/x86_64_bc-nacl/lib/libstdc++.a ./toolchain/linux_x86/pnacl_newlib/bin/pnacl-ranlib toolchain/linux_x86/pnacl_newlib/lib/clang/3.7.0/lib/x86_64_bc-nacl/libpnaclmm.a %install mkdir -p %{buildroot}/usr cp -a toolchain/linux_x86/pnacl_newlib %{buildroot}/usr cp -a toolchain/linux_x86/pnacl_translator %{buildroot}/usr # touch %%{buildroot}/usr/pnacl_translator/SOURCE_SHA1 # Fix perms chmod 755 %{buildroot}/usr/pnacl_newlib/bin/pnacl-* touch %{buildroot}/usr/pnacl_newlib/stamp.untar touch %{buildroot}/usr/pnacl_newlib/stamp.prep touch %{buildroot}/usr/pnacl_translator/stamp.untar touch %{buildroot}/usr/pnacl_translator/stamp.prep %files /usr/pnacl_newlib /usr/pnacl_translator %changelog * Tue Jul 26 2016 Tom Callaway - rename to chromium-native_client * Mon Jul 25 2016 Tom Callaway 1:52.0.2743.82-1.20160725git7d72623 - update to 52.0.2743.82 * Fri May 27 2016 Tom Callaway 1:51.0.2704.63-1.20160527gitbdf73e7 - update to 51.0.2704.63 * Tue Apr 26 2016 Tom Callaway 1:50.0.2661.86-1.20160426gitfb00463 - update to 50.0.2661.86 - use proper git versioning * Wed Mar 9 2016 Tom Callaway 1:49.0.2623.87-1 - update to 49.0.2623.87 * Mon Feb 8 2016 Tom Callaway 1:48.0.2564.82-2 - get this actually building thanks to the glibc arm cross bits * Fri Jan 22 2016 Tom Callaway 48.0.2564.82-1 - update to 48.0.2564.82 * Wed Dec 2 2015 Tom Callaway 47.0.2526.73-1 - update to 47.0.2526.73 * Thu Oct 15 2015 Tom Callaway 46.0.2490.71-1 - update to 46.0.2490.71 * Fri Oct 2 2015 Tom Callaway 45.0.2454.101-2 - add BuildRequires: /usr/bin/pod2html * Thu Oct 1 2015 Tom Callaway 45.0.2454.101-1 - update to 45.0.2454.101 * Thu May 28 2015 Tom Callaway 43.0.2357.81-1 - update to 43.0.2357.81 * Tue May 5 2015 Tom Callaway 42.0.2311.135-1 - update to 42.0.2311.135 * Sat Jan 24 2015 Tom Callaway 40.0.2214.91-1 - update to 40.0.2214.91 (now in git) * Wed Jan 14 2015 Tom Callaway 39.0.2171.95-3 - helps if we check out the right branch of the code * Mon Jan 12 2015 Tom Callaway 39.0.2171.95-2 - add pnacl-ranlib invocations on the static libs that Chromium uses * Tue Jan 6 2015 Tom Callaway 39.0.2171.95-1 - WHEEEEEEEEEEEEEE (gonads and strife) * Fri Jun 6 2014 Tom Callaway 20140602-2 - make up a fake file so chromium will use the toolchain. oh this is so silly. * Mon Jun 2 2014 Tom Callaway 20140602-1 - once more into the breach, dear friends * Mon Dec 9 2013 Tom Callaway 20131209-1 - this package is a war crime. i am so so sorry.