2010-03-05 Vladimir Serbinenko <phcoder@gmail.com>
Fix FreeBSD compilation. * Makefile.in (TARGET_CPPFLAGS): Remove -nostdinc -isystem. * configure.ac: Add -nostdinc -isystem to TARGET_CPPFLAGS if it works.
This commit is contained in:
parent
60b03859e8
commit
8f9a632b96
3 changed files with 21 additions and 1 deletions
|
@ -1,3 +1,10 @@
|
|||
2010-03-05 Vladimir Serbinenko <phcoder@gmail.com>
|
||||
|
||||
Fix FreeBSD compilation.
|
||||
|
||||
* Makefile.in (TARGET_CPPFLAGS): Remove -nostdinc -isystem.
|
||||
* configure.ac: Add -nostdinc -isystem to TARGET_CPPFLAGS if it works.
|
||||
|
||||
2010-03-05 Vladimir Serbinenko <phcoder@gmail.com>
|
||||
|
||||
* util/import_gcry.py: Add autogenerated files to MAINTAINER_CLEANFILES.
|
||||
|
|
|
@ -89,7 +89,7 @@ TARGET_ASFLAGS = @TARGET_ASFLAGS@
|
|||
TARGET_MODULE_FORMAT = @TARGET_MODULE_FORMAT@
|
||||
TARGET_APPLE_CC = @TARGET_APPLE_CC@
|
||||
OBJCONV = @OBJCONV@
|
||||
TARGET_CPPFLAGS = @TARGET_CPPFLAGS@ -nostdinc -isystem $(shell $(TARGET_CC) -print-file-name=include) -I$(srcdir)/include -I$(builddir) -I$(builddir)/include \
|
||||
TARGET_CPPFLAGS = @TARGET_CPPFLAGS@ -I$(srcdir)/include -I$(builddir) -I$(builddir)/include \
|
||||
-Wall -W
|
||||
TARGET_LDFLAGS = @TARGET_LDFLAGS@
|
||||
TARGET_IMG_LDSCRIPT = @TARGET_IMG_LDSCRIPT@
|
||||
|
|
13
configure.ac
13
configure.ac
|
@ -517,6 +517,19 @@ enable_efiemu=no
|
|||
fi
|
||||
AC_SUBST([enable_efiemu])
|
||||
|
||||
AC_CACHE_CHECK([whether -nostdinc -isystem works], [grub_cv_cc_isystem], [
|
||||
SAVED_CPPFLAGS="$CPPFLAGS"
|
||||
CPPFLAGS="$TARGET_CPPFLAGS -nostdinc -isystem `$TARGET_CC -print-file-name=include`"
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <stdarg.h>
|
||||
int va_arg_func (int fixed, va_list args);]], [[]])],
|
||||
[grub_cv_cc_isystem=yes],
|
||||
[grub_cv_cc_isystem=no])
|
||||
CPPFLAGS="$SAVED_CPPFLAGS"
|
||||
])
|
||||
|
||||
if test x"$grub_cv_cc_isystem" = xyes ; then
|
||||
TARGET_CPPFLAGS="$TARGET_CPPFLAGS -nostdinc -isystem `$TARGET_CC -print-file-name=include`"
|
||||
fi
|
||||
|
||||
# Restore the flags.
|
||||
CC="$tmp_CC"
|
||||
|
|
Loading…
Reference in a new issue