aboutsummaryrefslogtreecommitdiffstats
path: root/sdk/std/bind.conf
diff options
context:
space:
mode:
authorWilliam Harrington <kb0iic@berzerkula.org>2025-01-14 16:06:02 -0600
committerWilliam Harrington <kb0iic@berzerkula.org>2025-01-14 16:06:02 -0600
commit0cc9b20c15460213e488bf5e70963b941482f628 (patch)
treebb0143245583ec846630f39bfa2258dba640ccd7 /sdk/std/bind.conf
parent0e084ade5069756d487b5c948c48b777e37c00c9 (diff)
Add source.
Diffstat (limited to 'sdk/std/bind.conf')
-rw-r--r--sdk/std/bind.conf69
1 files changed, 69 insertions, 0 deletions
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
+}
+