Changeset View
Changeset View
Standalone View
Standalone View
head/Mk/Scripts/generate-symbols.sh
#! /bin/sh | #! /bin/sh | ||||
# $FreeBSD$ | # $FreeBSD$ | ||||
# Maintainer: portmgr@FreeBSD.org | # Maintainer: portmgr@FreeBSD.org | ||||
# | # | ||||
# This script will find all ELF files in STAGEDIR and then strip and move | # This script will find all ELF files in STAGEDIR and then strip and move | ||||
# the symbols to LOCALBASE/lib/debug/<original path>. | # the symbols to LOCALBASE/lib/debug/<original path>. | ||||
# For example: | # For example: | ||||
# /var/qmail/bin/qmaild -> /usr/local/lib/debug/var/qmail/bin/qmaild.debug | # /var/qmail/bin/qmaild -> /usr/local/lib/debug/var/qmail/bin/qmaild.debug | ||||
# /usr/local/bin/ssh -> /usr/local/lib/debug/usr/local/bin/ssh.debug | # /usr/local/bin/ssh -> /usr/local/lib/debug/usr/local/bin/ssh.debug | ||||
LIB_DIR_PREFIX="${LOCALBASE}/lib/debug" | LIB_DIR_PREFIX="${LOCALBASE}/lib/debug" | ||||
set -o pipefail | |||||
msg() { | msg() { | ||||
echo "====> $*" | echo "====> $*" | ||||
} | } | ||||
msg "Finding symbols" | msg "Finding symbols" | ||||
# Find all ELF files | # Find all ELF files | ||||
ELF_FILES=$(mktemp -t elf_files) | ELF_FILES=$(mktemp -t elf_files) | ||||
Show All 34 Lines |