Skip to content

Instantly share code, notes, and snippets.

#!/bin/sh
# Taken from http://dustymabe.com/2012/10/14/trace-function-calls-using-gdb/
# Make a function call trace using GDB. This is stupid, but it should work
if [ "$*" = "" ]; then
echo "usage: $0 [args]"
exit
fi
This file has been truncated, but you can view the full file.
* Package: sys-devel/gcc-7.3.0
* Repository: gentoo
* Maintainer: toolchain@gentoo.org
* USE: arm64 cxx elibc_glibc fortran kernel_linux multilib nls nptl openmp pch pie sanitize ssp userland_GNU vtv
* FEATURES: preserve-libs userpriv
* Applying Gentoo patches ...
* 10_all_default-fortify-source.patch ...
[ ok ]
* 11_all_default-warn-format-security.patch ...
[ ok ]
set -e
T=aarch64-gcctest-linux-gnu
crossdev --stable -t $T
ln -snf /usr/portage/profiles/default/linux/arm64/17.0/ /usr/$T/etc/portage/make.profile
${T}-emerge -ptv sys-devel/gcc
FEATURES="-sandbox -usersandbox" ${T}-emerge -vq sys-devel/gcc
* Package: sys-apps/diffutils-3.6
* Repository: gentoo
* Maintainer: base-system@gentoo.org
* USE: arm64 elibc_glibc kernel_linux nls userland_GNU
* FEATURES: preserve-libs sandbox userpriv usersandbox
configure: loading site script /usr/share/config.site
configure: loading site script /usr/share/crossdev/include/site/linux
configure: loading site script /usr/share/crossdev/include/site/linux-gnu
checking for a BSD-compatible install... /usr/lib/portage/python3.5/ebuild-helpers/xattr/install -c
checking whether build environment is sane... yes
 * Package: virtual/libintl-0-r2
 * Repository: gentoo
 * Maintainer: alt@gentoo.org
 * USE: arm64 elibc_glibc kernel_linux userland_GNU
 * FEATURES: preserve-libs userpriv usersandbox
>>> Unpacking source...
>>> Source unpacked in /usr/aarch64-unknown-linux-gnu/tmp/portage/virtual/libintl-0-r2/work
>>> Preparing source in /usr/aarch64-unknown-linux-gnu/tmp/portage/virtual/libintl-0-r2/work ...
>>> Source prepared.
>>> Configuring source in /usr/aarch64-unknown-linux-gnu/tmp/portage/virtual/libintl-0-r2/work ...
wget http://distfiles.gentoo.org/releases/amd64/autobuilds/20180301T214503Z/stage3-amd64-nomultilib-20180301T214503Z.tar.xz
mkdir gentoo
sudo tar xaf stage3-amd64-nomultilib-20180301T214503Z.tar.xz -C gentoo
cd gentoo
for x in dev sys proc; do sudo mount --rbind {/,}$x; done
sudo cp -L {/,}etc/resolv.conf
sudo chroot . /bin/bash
IN CHROOT:
@andrey-utkin
andrey-utkin / gist:e0e29aba33dee9f6f7c483b1fd64befc
Created March 1, 2018 20:27
cross-x86_64-oldglibc-linux-gnu/glibc-2.16.0/temp/build.log
# cat /var/tmp/portage/cross-x86_64-oldglibc-linux-gnu/glibc-2.16.0/temp/build.log
* Package: cross-x86_64-oldglibc-linux-gnu/glibc-2.16.0
* Repository: crossdev
* Maintainer: toolchain@gentoo.org
* USE: abi_x86_64 amd64 elibc_glibc kernel_linux selinux userland_GNU
* FEATURES: preserve-libs sandbox selinux sesandbox userpriv usersandbox
>>> Unpacking source...
* Auto adding -march=x86_64 to CFLAGS_x86 #185404
x86_64-pc-linux-gnu-gcc: fatal error: no input files
compilation terminated.
@andrey-utkin
andrey-utkin / gist:65637487598e487ecde0cdfcddfc7e95
Created March 1, 2018 20:25
cross-x86_64-oldglibc-linux-gnu-glibc-headers.log.xz
# xzcat /var/log/portage/cross-x86_64-oldglibc-linux-gnu-glibc-headers.log.xz
* IMPORTANT: 1 news items need reading for repository 'mva'.
* Use eselect news read to view new items.
>>> Verifying ebuild manifests
>>> Emerging (1 of 1) cross-x86_64-oldglibc-linux-gnu/glibc-2.16.0::crossdev
* glibc-2.16.0.tar.xz SHA256 SHA512 WHIRLPOOL size ;-) ... [ ok ]
@andrey-utkin
andrey-utkin / gist:c7548212611500df9f43e0d81b480387
Created March 1, 2018 20:24
crossdev -t x86_64-oldglibc-linux-gnu output
# crossdev -t x86_64-oldglibc-linux-gnu
-
* crossdev version: 4d3efcb905f7b1babfe7c5c193ebb64e19534ec4
* Host Portage ARCH: amd64
* Target Portage ARCH: amd64
* Target System: x86_64-oldglibc-linux-gnu
* Stage: 4 (C/C++ compiler)
* ABIs: amd64
* binutils: binutils-[latest]
00:30:09 Sat 16 Sep j@starlite /usr/local/src/linux
$ ARCH=arm CROSS_COMPILE=armv7a-hardfloat-linux-gnueabi- make M=sound/soc/omap --keep-going
CC [M] sound/soc/omap/omap-mcasp.o
sound/soc/omap/omap-mcasp.c: In function 'asoc_mcasp_probe':
sound/soc/omap/omap-mcasp.c:623:16: error: implicit declaration of function 'devm_request_and_ioremap' [-Werror=implicit-function-declaration]
mcasp->base = devm_request_and_ioremap(&pdev->dev, res);
^~~~~~~~~~~~~~~~~~~~~~~~
sound/soc/omap/omap-mcasp.c:623:14: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
mcasp->base = devm_request_and_ioremap(&pdev->dev, res);
^