From: Vladimir 'phcoder' Serbinenko Date: Sun, 14 Mar 2010 15:01:31 +0000 (+0100) Subject: Merge mainline into cleanbuild X-Git-Tag: 1.99~1014^2~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=016a671b51e4f435717c198aac82710a4e20502c;p=thirdparty%2Fgrub.git Merge mainline into cleanbuild --- 016a671b51e4f435717c198aac82710a4e20502c diff --cc Makefile.in index c4059e58e,47584cdde..07fe6219a --- a/Makefile.in +++ b/Makefile.in @@@ -89,13 -89,11 +89,11 @@@ TARGET_ASFLAGS = -nostdinc -fno-builti TARGET_MODULE_FORMAT = @TARGET_MODULE_FORMAT@ TARGET_APPLE_CC = @TARGET_APPLE_CC@ OBJCONV = @OBJCONV@ - TARGET_CPPFLAGS = @TARGET_CPPFLAGS@ -I$(srcdir)/include -I$(builddir) -I$(builddir)/include -Wall -W - ifneq ($(platform), emu) - TARGET_CPPFLAGS += -nostdinc -isystem $(shell $(TARGET_CC) -print-file-name=include) - endif + TARGET_CPPFLAGS = @TARGET_CPPFLAGS@ -I$(srcdir)/include -I$(builddir) -I$(builddir)/include \ + -Wall -W -TARGET_LDFLAGS = @TARGET_LDFLAGS@ +TARGET_LDFLAGS = -nostdlib @TARGET_LDFLAGS@ TARGET_IMG_LDSCRIPT = @TARGET_IMG_LDSCRIPT@ -TARGET_IMG_LDFLAGS = @TARGET_IMG_LDFLAGS@ +TARGET_IMG_LDFLAGS = -nostdlib @TARGET_IMG_LDFLAGS@ TARGET_IMG_CFLAGS = @TARGET_IMG_CFLAGS@ TARGET_OBJ2ELF = @TARGET_OBJ2ELF@ EXEEXT = @EXEEXT@ diff --cc conf/mips-yeeloong.rmk index 0d57a2884,9977f7881..35cd01b4b --- a/conf/mips-yeeloong.rmk +++ b/conf/mips-yeeloong.rmk @@@ -4,7 -4,8 +4,8 @@@ target_machine=yeeloon COMMON_CFLAGS += -march=mips3 COMMON_ASFLAGS += -march=mips3 - kernel_img_HEADERS += pci.h -kernel_img_HEADERS += bitmap.h video.h gfxterm.h font.h bitmap_scale.h bufio.h ++kernel_img_HEADERS += pci.h bitmap.h video.h gfxterm.h font.h bitmap_scale.h bufio.h + include $(srcdir)/conf/mips.mk pkglib_IMAGES = kernel.img @@@ -63,5 -64,24 +64,11 @@@ datetime_mod_SOURCES = lib/cmos_datetim datetime_mod_CFLAGS = $(COMMON_CFLAGS) datetime_mod_LDFLAGS = $(COMMON_LDFLAGS) -# For date.mod -pkglib_MODULES += date.mod -date_mod_SOURCES = commands/date.c -date_mod_CFLAGS = $(COMMON_CFLAGS) -date_mod_LDFLAGS = $(COMMON_LDFLAGS) - -# For datehook.mod -pkglib_MODULES += datehook.mod -datehook_mod_SOURCES = hook/datehook.c -datehook_mod_CFLAGS = $(COMMON_CFLAGS) -datehook_mod_LDFLAGS = $(COMMON_LDFLAGS) - + pkglib_MODULES += linux.mod + linux_mod_SOURCES = loader/$(target_cpu)/linux.c + linux_mod_CFLAGS = $(COMMON_CFLAGS) + linux_mod_ASFLAGS = $(COMMON_ASFLAGS) + linux_mod_LDFLAGS = $(COMMON_LDFLAGS) + sbin_SCRIPTS += grub-install grub_install_SOURCES = util/grub-install.in - diff --cc conf/sparc64-ieee1275.rmk index 507a05ab9,712b2a988..c29f15d14 --- a/conf/sparc64-ieee1275.rmk +++ b/conf/sparc64-ieee1275.rmk @@@ -36,9 -48,15 +36,9 @@@ kernel_img_SOURCES = kern/sparc64/ieee1 symlist.c kern/$(target_cpu)/cache.S kernel_img_CFLAGS = $(COMMON_CFLAGS) kernel_img_ASFLAGS = $(COMMON_ASFLAGS) - kernel_img_LDFLAGS = -Wl,-N,-Ttext,0x200000,-Bstatic,-melf64_sparc -static-libgcc -lgcc + kernel_img_LDFLAGS = -nostdlib -Wl,-N,-Ttext,0x4400,-Bstatic,-melf64_sparc -static-libgcc -lgcc kernel_img_FORMAT = binary -symlist.c: $(addprefix include/grub/,$(kernel_img_HEADERS)) config.h gensymlist.sh - /bin/sh gensymlist.sh $(filter %.h,$^) > $@ || (rm -f $@; exit 1) - -kernel_syms.lst: $(addprefix include/grub/,$(kernel_img_HEADERS)) config.h genkernsyms.sh - /bin/sh genkernsyms.sh $(filter %.h,$^) > $@ || (rm -f $@; exit 1) - # Utilities. bin_UTILITIES = grub-mkimage sbin_UTILITIES = grub-setup grub-ofpathname @@@ -95,10 -123,31 +95,27 @@@ halt_mod_SOURCES = commands/halt. halt_mod_CFLAGS = $(COMMON_CFLAGS) halt_mod_LDFLAGS = $(COMMON_LDFLAGS) -# For memdisk.mod. -memdisk_mod_SOURCES = disk/memdisk.c -memdisk_mod_CFLAGS = $(COMMON_CFLAGS) -memdisk_mod_LDFLAGS = $(COMMON_LDFLAGS) - -# For lsmmap.mod -lsmmap_mod_SOURCES = commands/lsmmap.c -lsmmap_mod_CFLAGS = $(COMMON_CFLAGS) -lsmmap_mod_LDFLAGS = $(COMMON_LDFLAGS) +# For datetime.mod +pkglib_MODULES += datetime.mod +datetime_mod_SOURCES = lib/ieee1275/datetime.c +datetime_mod_CFLAGS = $(COMMON_CFLAGS) +datetime_mod_LDFLAGS = $(COMMON_LDFLAGS) + pkglib_MODULES += datetime.mod date.mod datehook.mod + + # For datetime.mod + datetime_mod_SOURCES = lib/ieee1275/datetime.c + datetime_mod_CFLAGS = $(COMMON_CFLAGS) + datetime_mod_LDFLAGS = $(COMMON_LDFLAGS) + + # For date.mod + date_mod_SOURCES = commands/date.c + date_mod_CFLAGS = $(COMMON_CFLAGS) + date_mod_LDFLAGS = $(COMMON_LDFLAGS) + + # For datehook.mod + datehook_mod_SOURCES = hook/datehook.c + datehook_mod_CFLAGS = $(COMMON_CFLAGS) + datehook_mod_LDFLAGS = $(COMMON_LDFLAGS) + include $(srcdir)/conf/common.mk diff --cc configure.ac index 462fca225,e06b0a55c..5417fe907 --- a/configure.ac +++ b/configure.ac @@@ -519,6 -522,19 +525,21 @@@ enable_efiemu=n fi AC_SUBST([enable_efiemu]) ++if test "$platform" != emu; then + 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 + int va_arg_func (int fixed, va_list args);]], [[]])], + [grub_cv_cc_isystem=yes], + [grub_cv_cc_isystem=no]) + CPPFLAGS="$SAVED_CPPFLAGS" + ]) ++endif + + 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"