From 0cc9b20c15460213e488bf5e70963b941482f628 Mon Sep 17 00:00:00 2001 From: William Harrington Date: Tue, 14 Jan 2025 16:06:02 -0600 Subject: Add source. --- sdk/std/bind.conf | 69 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 sdk/std/bind.conf (limited to 'sdk/std/bind.conf') diff --git a/sdk/std/bind.conf b/sdk/std/bind.conf new file mode 100644 index 0000000..65ee123 --- /dev/null +++ b/sdk/std/bind.conf @@ -0,0 +1,69 @@ +BIND_OPTS=$BIND_OPTS' cc optimize cflags arch' +OPTIMIZE='' +CFLAGS='' + +if test -z "$CONFIG_CC" ; then + + echo -n "Analyzing C Compiler..." + + if test -z "$CONFIG_ARCH" ; then + CONFIG_ARCH=`uname -m`"-"`uname` + fi + + if fn_find_fpath -x gcc $PATH ; then + CONFIG_CC='gcc' + echo "gcc" + else + if test -z "$CONFIG_CC" ; then + CONFIG_CC='cc' + echo 'cc' + fi + fi +fi + +opt_optimize() { + OPTIMIZE="$1" + CONFIG_COPT="$1" + return 0 +} + +opt_cflags() { + CONFIG_ENDIAN="" + CONFIG_CFLAGS="$1" + CFLAGS="$1" +} + +opt_cc() { + CONFIG_CC="$1" + CONFIG_COPT="$OPTIMIZE" + CONFIG_CFLAGS="$CFLAGS" + return 0 +} + +opt_arch() { + CONFIG_ENDIAN="" + CONFIG_ARCH="$1" + if test "gcc" = $CONFIG_CC ; then + CONFIG_COPT="$OPTIMIZE" + if test -d /usr/local/lib/gcc-lib ; then + GCC_LIB='/usr/local/lib/gcc-lib' + fi + if test -d /usr/lib/gcc-lib ; then + GCC_LIB='/usr/lib/gcc-lib' + fi + if fn_find_fpath -d "$1" "$GCC_LIB"':/usr:/usr/local' ; then + CONFIG_CFLAGS='-b '"$1" + else + echo "config: $1: unsupported gcc architecture" + exit -1 + fi + if -d /usr/$1/include ; then + CONFIG_HOST=/usr/$1 + fi + if -d /usr/local/$1/include ; then + CONFIG_HOST=/usr/local/$1 + fi + fi + return 0 +} + -- cgit v1.2.3-54-g00ecf