Bug 708851 - Any gcc that supports firefox support -pipe.

This commit is contained in:
Rafael Ávila de Espíndola 2011-12-08 22:16:06 -05:00
parent 6bbcf3b4f8
commit 9f592f7c37
2 changed files with 12 additions and 58 deletions

View File

@ -7724,35 +7724,12 @@ MOZ_ARG_HEADER(Compiler Options)
dnl ========================================================
dnl Check for gcc -pipe support
dnl ========================================================
AC_MSG_CHECKING([for gcc -pipe support])
if test -n "$GNU_CC" -a -n "$GNU_CXX" -a -n "$GNU_AS"; then
echo '#include <stdio.h>' > dummy-hello.c
echo 'int main() { printf("Hello World"); exit(0); }' >> dummy-hello.c
${CC} -S dummy-hello.c -o dummy-hello.s 2>&5
cat dummy-hello.s 2> /dev/null | ${AS_BIN} -o dummy-hello.S - 2>&5
if test $? = 0; then
_res_as_stdin="yes"
else
_res_as_stdin="no"
fi
if test "$_res_as_stdin" = "yes"; then
_SAVE_CFLAGS=$CFLAGS
CFLAGS="$CFLAGS -pipe"
AC_TRY_COMPILE( [ #include <stdio.h> ],
[printf("Hello World\n");],
[_res_gcc_pipe="yes"],
[_res_gcc_pipe="no"] )
CFLAGS=$_SAVE_CFLAGS
fi
if test "$_res_as_stdin" = "yes" -a "$_res_gcc_pipe" = "yes"; then
_res="yes";
CFLAGS="$CFLAGS -pipe"
CXXFLAGS="$CXXFLAGS -pipe"
else
_res="no"
fi
rm -f dummy-hello.c dummy-hello.s dummy-hello.S dummy-hello a.out
AC_MSG_RESULT([$_res])
AC_MSG_CHECKING([for -pipe support])
if test -n "$GNU_CC" -a -n "$GNU_CXX"; then
dnl Any gcc that supports firefox supports -pipe.
CFLAGS="$CFLAGS -pipe"
CXXFLAGS="$CXXFLAGS -pipe"
AC_MSG_RESULT([yes])
else
AC_MSG_RESULT([no])
fi

View File

@ -4649,35 +4649,12 @@ MOZ_ARG_HEADER(Compiler Options)
dnl ========================================================
dnl Check for gcc -pipe support
dnl ========================================================
AC_MSG_CHECKING([for gcc -pipe support])
if test -n "$GNU_CC" -a -n "$GNU_CXX" -a -n "$GNU_AS"; then
echo '#include <stdio.h>' > dummy-hello.c
echo 'int main() { printf("Hello World"); exit(0); }' >> dummy-hello.c
${CC} -S dummy-hello.c -o dummy-hello.s 2>&5
cat dummy-hello.s 2> /dev/null | ${AS_BIN} -o dummy-hello.S - 2>&5
if test $? = 0; then
_res_as_stdin="yes"
else
_res_as_stdin="no"
fi
if test "$_res_as_stdin" = "yes"; then
_SAVE_CFLAGS=$CFLAGS
CFLAGS="$CFLAGS -pipe"
AC_TRY_COMPILE( [ #include <stdio.h> ],
[printf("Hello World\n");],
[_res_gcc_pipe="yes"],
[_res_gcc_pipe="no"] )
CFLAGS=$_SAVE_CFLAGS
fi
if test "$_res_as_stdin" = "yes" -a "$_res_gcc_pipe" = "yes"; then
_res="yes";
CFLAGS="$CFLAGS -pipe"
CXXFLAGS="$CXXFLAGS -pipe"
else
_res="no"
fi
rm -f dummy-hello.c dummy-hello.s dummy-hello.S dummy-hello a.out
AC_MSG_RESULT([$_res])
AC_MSG_CHECKING([for -pipe support])
if test -n "$GNU_CC" -a -n "$GNU_CXX"; then
dnl Any gcc that supports firefox supports -pipe.
CFLAGS="$CFLAGS -pipe"
CXXFLAGS="$CXXFLAGS -pipe"
AC_MSG_RESULT([yes])
else
AC_MSG_RESULT([no])
fi