mirror of
https://github.com/libretro/Lakka.git
synced 2024-12-01 03:51:15 +00:00
config/optimize: add distribution specific libdirs to HOST_LDFLAGS
Signed-off-by: Stephan Raue <stephan@openelec.tv>
This commit is contained in:
parent
c83a2f8b54
commit
e83551cf71
@ -61,11 +61,44 @@ HOST_CFLAGS="-O2 -Wall -pipe -I$ROOT/$TOOLCHAIN/include"
|
||||
HOST_CXXFLAGS="$HOST_CFLAGS"
|
||||
HOST_LDFLAGS="-Wl,-rpath,$ROOT/$TOOLCHAIN/lib -L$ROOT/$TOOLCHAIN/lib"
|
||||
|
||||
# add distro specific library dirs
|
||||
# ubuntu/debian specific "multiarch support"
|
||||
FAMILY_TRIPLET=$(echo $HOST_NAME | sed -e "s,$(uname -m),$(uname -i),")
|
||||
if [ -d /lib/$FAMILY_TRIPLET ]; then
|
||||
HOST_LDFLAGS="$HOST_LDFLAGS -L/lib/$FAMILY_TRIPLET"
|
||||
fi
|
||||
if [ -d /usr/lib/$FAMILY_TRIPLET ]; then
|
||||
HOST_LDFLAGS="$HOST_LDFLAGS -L/usr/lib/$FAMILY_TRIPLET"
|
||||
fi
|
||||
|
||||
# default multiarch support
|
||||
case "`uname -m`" in
|
||||
i*86)
|
||||
if [ -d /lib32 ]; then
|
||||
HOST_LDFLAGS="$HOST_LDFLAGS -L/lib32"
|
||||
fi
|
||||
if [ -d /usr/lib32 ]; then
|
||||
HOST_LDFLAGS="$HOST_LDFLAGS -L/usr/lib32"
|
||||
fi
|
||||
;;
|
||||
x86_64)
|
||||
if [ -d /lib64 ]; then
|
||||
HOST_LDFLAGS="$HOST_LDFLAGS -L/lib64"
|
||||
fi
|
||||
if [ -d /usr/lib64 ]; then
|
||||
HOST_LDFLAGS="$HOST_LDFLAGS -L/usr/lib64"
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
# default dirs
|
||||
HOST_LDFLAGS="$HOST_LDFLAGS -L/lib -L/usr/lib"
|
||||
|
||||
# use -fPIC when necessary
|
||||
case "`uname -m`" in
|
||||
x86_64|ppc64|arm|armeb|armel)
|
||||
HOST_CFLAGS="$HOST_CFLAGS -fPIC"
|
||||
HOST_CXXFLAGS="$HOST_CXXFLAGS -fPIC"
|
||||
HOST_LDFLAGS="$HOST_LDFLAGS -fPIC"
|
||||
HOST_CFLAGS="$HOST_CFLAGS -fPIC"
|
||||
HOST_CXXFLAGS="$HOST_CXXFLAGS -fPIC"
|
||||
HOST_LDFLAGS="$HOST_LDFLAGS -fPIC"
|
||||
;;
|
||||
esac
|
||||
|
Loading…
Reference in New Issue
Block a user