Skip to content

Commit

Permalink
Choose -Os automatically on mipsel.
Browse files Browse the repository at this point in the history
  • Loading branch information
jpsaman committed Jun 8, 2004
1 parent c99820b commit 9b8ecc5
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 9 deletions.
16 changes: 12 additions & 4 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -709,29 +709,37 @@ if test "${ac_cv_c_pipe}" != "no"; then
fi

dnl Check for various optimization flags
AC_CACHE_CHECK([if \$CC accepts -Os],
[ac_cv_c_os],
[CFLAGS="${CFLAGS_save} -Os"
AC_TRY_COMPILE([],,ac_cv_c_os=yes, ac_cv_c_os=no)])
if test "${ac_cv_c_os}" != "no" -a "${target_cpu}" = "mipsel"; then
CFLAGS_OPTIM="${CFLAGS_OPTIM} -Os"
fi

AC_CACHE_CHECK([if \$CC accepts -O3],
[ac_cv_c_o3],
[CFLAGS="${CFLAGS_save} -O3"
AC_TRY_COMPILE([],,ac_cv_c_o3=yes, ac_cv_c_o3=no)])
if test "${ac_cv_c_o3}" != "no"; then
if test "${ac_cv_c_o3}" != "no" -a "${target_cpu}" != "mipsel"; then
CFLAGS_OPTIM="${CFLAGS_OPTIM} -O3"
fi

AC_CACHE_CHECK([if \$CC accepts -O2],
[ac_cv_c_o2],
[CFLAGS="${CFLAGS_save} -O2"
AC_TRY_COMPILE([],,ac_cv_c_o2=yes, ac_cv_c_o2=no)])
if test "${ac_cv_c_o2}" != "no"; then
if test "${ac_cv_c_o2}" != "no" -a "${target_cpu}" != "mipsel"; then
if test "${ac_cv_c_o3}" = "no"; then
CFLAGS_OPTIM="${CFLAGS_OPTIM} -O2"
fi
CFLAGS_NOOPTIM="${CFLAGS_NOOPTIM} -O2"
else
else
AC_CACHE_CHECK([if \$CC accepts -O],
[ac_cv_c_o],
[CFLAGS="${CFLAGS_save} -O"
AC_TRY_COMPILE([],,ac_cv_c_o=yes, ac_cv_c_o=no)])
if test "${ac_cv_c_o}" != "no"; then
if test "${ac_cv_c_o}" != "no" -a "${target_cpu}" != "mipsel"; then
if test "${ac_cv_c_o3}" = "no"; then
CFLAGS_OPTIM="${CFLAGS_OPTIM} -O"
fi
Expand Down
12 changes: 7 additions & 5 deletions vlc.roku
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
#!/bin/sh

SRC="${HOME}/src"
ROKU="${HOME}/src/roku-dev"

# do it.
make distclean
./bootstrap
CC=mipsel-linux-gcc CXX=mipsel-linux-g++ AR=mipsel-linux-ar LD=mipsel-linux-ld RANLIB=mipsel-linux-ranlib STRIP=mipsel-linux-strip \
./configure --host=mipsel --enable-release --enable-static --enable-shared --enable-plugins \
--prefix=${HOME}/src/roku-dev/usr \
--prefix=${ROKU}/usr \
--disable-sdl \
--enable-mad \
--disable-libmpeg2 --with-libmpeg2-tree=${SRC}/mpeg2dec-0.4.0 \
Expand Down Expand Up @@ -51,8 +52,9 @@ CC=mipsel-linux-gcc CXX=mipsel-linux-g++ AR=mipsel-linux-ar LD=mipsel-linux-ld R
--enable-oss --disable-alsa \
--disable-visual --disable-goom \
--enable-hd1000a --disable-hd1000v \
CFLAGS="-I${HOME}/src/roku-dev/usr/include -I${HOME}/src/roku-dev/usr/local/include/roku" \
CFLAGS="-I${ROKU}/usr/include -I${ROKU}/usr/local/include/roku" \
CXXFLAGS="-I/usr/tools/roku/include" \
CPPFLAGS="-I${HOME}/src/roku-dev/usr/local/include" \
LDFLAGS="-L/usr/tools/roku/mipsel-linux/lib -L${HOME}/src/roku-dev/lib -L${HOME}/src/roku-dev/usr/local/lib -Wl,-rpath-link -Wl,${HOME}/src/roku-dev/usr/local/lib -lm" && \
make
CPPFLAGS="-I${ROKU}/usr/local/include" \
LDFLAGS="-L/usr/tools/roku/mipsel-linux/lib -L${ROKU}/lib -L${ROKU}/usr/local/lib -Wl,-rpath-link -Wl,${ROKU}/usr/local/lib" && \
make &&
${STRIP} -s vlc

0 comments on commit 9b8ecc5

Please sign in to comment.