mirror of
https://github.com/stayliv3/gdb-static-cross.git
synced 2025-01-14 03:08:45 +08:00
Removed generic script
This commit is contained in:
parent
8341164129
commit
846ac8e684
@ -1,100 +0,0 @@
|
|||||||
# This software is released under the terms of GPLv2 by copyright@mzpqnxow.com
|
|
||||||
# Please see LICENSE or LICENSE.md for more information on GPLv2
|
|
||||||
|
|
||||||
# If you aren't using musl-cross-make toolchain or an OpenWrt pre-built toolchain
|
|
||||||
# then you can possibly use this. It has worked for me on, for example, NETGEAR
|
|
||||||
# provided toolchains.
|
|
||||||
#
|
|
||||||
# As the first argument, provide the path to the root of the toolchain
|
|
||||||
# As the second argument, provide part of a pattern to match the libc
|
|
||||||
#
|
|
||||||
# For argument two, you can usually be pretty vague, i.e. "libc" instead of "uclibc"
|
|
||||||
# because it's matching a pattern that usually only has one possible match anyway.
|
|
||||||
# Just make sure it's more specific than "lib" :>
|
|
||||||
#
|
|
||||||
# Example that works with HNDTOOLS from NETGEAR:
|
|
||||||
# $ source activate-generic.env /opt/brcm/mipsel-uclibc libc
|
|
||||||
#
|
|
||||||
#
|
|
||||||
# Alternately, set CURDIR to the path to the toolchain root
|
|
||||||
# Using the existing CURDIR trick lets you put the file in the
|
|
||||||
# root and have it "detect" the root for you
|
|
||||||
# CURDIR="$1"
|
|
||||||
#
|
|
||||||
# This pattern should work fine, it is just use to pick up the
|
|
||||||
# full name of the toolchain, i.e. mips-linux-uclibc. You can
|
|
||||||
# make it more specific if you want to.
|
|
||||||
#
|
|
||||||
LIBC_PATTERN=libc
|
|
||||||
CURDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
|
||||||
TOOLCHAIN_TARGET="$(basename $(echo $CURDIR/*-*-*${LIBC_PATTERN}*))"
|
|
||||||
TOOLCHAIN_ROOT="$CURDIR"
|
|
||||||
|
|
||||||
UTIL_STATIC=$(find $(realpath $CURDIR) -name libutil.a)
|
|
||||||
C_STATIC=$(find $(realpath $CURDIR) -name libc.a)
|
|
||||||
DL_STATIC=$(find $(realpath $CURDIR) -name libdl.a)
|
|
||||||
PTHREAD_STATIC=$(find $(realpath $CURDIR) -name libpthread.a)
|
|
||||||
STDCXX_STATIC=$(find $(realpath $CURDIR) -name libstdc++.a)
|
|
||||||
GCCEH_STATIC=$(find $(realpath $CURDIR) -name libgcc_eh.a)
|
|
||||||
|
|
||||||
TOOLCHAIN_BIN="$TOOLCHAIN_ROOT/bin"
|
|
||||||
|
|
||||||
echo "--- Build environment setup ---"
|
|
||||||
echo
|
|
||||||
echo "TOOLCHAIN_TARGET: $TOOLCHAIN_TARGET"
|
|
||||||
echo "TOOLCHAIN_BIN: $TOOLCHAIN_BIN"
|
|
||||||
echo
|
|
||||||
for TOOL in gcc \
|
|
||||||
addr2line \
|
|
||||||
ar \
|
|
||||||
as \
|
|
||||||
c++ \
|
|
||||||
cpp \
|
|
||||||
g++ \
|
|
||||||
ld \
|
|
||||||
nm \
|
|
||||||
objdump \
|
|
||||||
ranlib \
|
|
||||||
strip
|
|
||||||
do
|
|
||||||
echo " Symlinking $TOOL"
|
|
||||||
ln -sf "$TOOLCHAIN_BIN/$TOOLCHAIN_TARGET-$TOOL" "$TOOLCHAIN_BIN/$TOOL"
|
|
||||||
done
|
|
||||||
ln -sf "${TOOLCHAIN_BIN}/${TOOLCHAIN_TARGET}-gcc" "${TOOLCHAIN_BIN}/cc"
|
|
||||||
echo
|
|
||||||
export PATH="$TOOLCHAIN_BIN":"$PATH"
|
|
||||||
echo "TOOLCHAIN_TARGET: $TOOLCHAIN_TARGET"
|
|
||||||
echo "TOOLCHAIN_ROOT: $TOOLCHAIN_ROOT"
|
|
||||||
echo "TOOLCHAIN_BIN: $TOOLCHAIN_BIN"
|
|
||||||
echo
|
|
||||||
echo "GCC location: $(which gcc)"
|
|
||||||
echo "GAS location: $(which as)"
|
|
||||||
echo "GLD location: $(which ld)"
|
|
||||||
echo "G++ location: $(which g++)"
|
|
||||||
echo "CC location: $(which cc)"
|
|
||||||
echo
|
|
||||||
echo "UTIL_STATIC: $UTIL_STATIC"
|
|
||||||
echo "C_STATIC: $C_STATIC"
|
|
||||||
echo "DL_STATIC: $DL_STATIC"
|
|
||||||
echo "PTHREAD_STATIC: $PTHREAD_STATIC"
|
|
||||||
echo "STDCXX_STATIC: $STDCXX_STATIC"
|
|
||||||
echo "GCCEH_STATIC: $GCCEH_STATIC"
|
|
||||||
|
|
||||||
|
|
||||||
alias cross_configure="./configure \
|
|
||||||
--host=$TOOLCHAIN_TARGET \
|
|
||||||
--prefix=$TOOLCHAIN_ROOT"
|
|
||||||
|
|
||||||
echo
|
|
||||||
echo "Use cross_configure to invoke alias for:"
|
|
||||||
echo " $./configure --host=$TOOLCHAIN_TARGET --prefix=$TOOLCHAIN_ROOT"
|
|
||||||
echo
|
|
||||||
export UTIL_STATIC
|
|
||||||
export C_STATIC
|
|
||||||
export DL_STATIC
|
|
||||||
export PTHREAD_STATIC
|
|
||||||
export STDCXX_STATIC
|
|
||||||
export GCCEH_STATIC
|
|
||||||
export TOOLCHAIN_TARGET
|
|
||||||
export TOOLCHAIN_ROOT
|
|
||||||
export TOOLCHAIN_BIN
|
|
Loading…
x
Reference in New Issue
Block a user