Skip to content

Instantly share code, notes, and snippets.

@dillera
Created December 15, 2019 15:58
Show Gist options
  • Save dillera/035b2552b8d09a8e6fc13fa9c750200d to your computer and use it in GitHub Desktop.
Save dillera/035b2552b8d09a8e6fc13fa9c750200d to your computer and use it in GitHub Desktop.
make irixports didbs branch work w/ any didbs release
# edit .port.sh
# Comment out PATH, and use the good path set in .bashrc (see my .bashrc gist for a working example)
# change the gcc compiler paths to point to proper didbs path (i.e. current)
# this allows you use use 'current' to point to whatever didbs you want, i.e
# i built my own didbs w/ MIPS4 and have current symlinked to that - but you can
# always just leave current symlinked with the binary distro you un-tarred
-------snippet-------
: "${patchlevel:=1}"
: "${cppopts:=}"
: "${ldopts:=}"
CPPFLAGS="-I$prefix/include $cppopts"
LDFLAGS="-L$prefix/lib -Wl,-rpath,$prefix/lib $ldopts"
#PATH="$prefix/bin:/usr/didbs/0_1_8_n32_mips3_gcc/bin:/usr/sbin:/usr/bsd:/sbin:/usr/bin:/etc:/usr/etc:/usr/bin/X11"
LD_LIBRARYN32_PATH="/usr/lib32${ldlibpath:+:$ldlibpath}"
if [ "$compiler" = "gcc" ]; then
CC=/usr/didbs/current/bin/gcc
CXX=/usr/didbs/current/bin/g++
LD_LIBRARYN32_PATH="/usr/didbs/current/lib32:$LD_LIBRARYN32_PATH"
elif [ "$compiler" = "mipspro" ]; then
CC=/usr/bin/cc
CXX=/usr/bin/CC
else
>&2 echo "Error: Valid compilers are gcc or mipspro."
exit 1
-------snippet-------
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment