Revert 2009-06-10 Pavel Roskin <proski@gnu.org>
* configure.ac: Put checks for __bswapsi2 and __bswapdi2.
* include/grub/powerpc/libgcc.h: Don't use weak attribute for all
exports.
* include/grub/sparc64/libgcc.h: Likewise. Use
preprocessor conditionals.
Build info documentation. Some code borrowed from Automake.
* configure.ac: Check for makeinfo.
* Makefile.in (MAKEINFO, INFOS, info_INFOS): New variables.
(MAINTAINER_CLEANFILES): Add $(INFOS), docs/stamp-vti, and
docs/version.texi.
(MOSTLYCLEANFILES): Add vti.tmp.
(docs/version.texi, docs/stamp-vti): Update automatically.
(docs/grub.info): Build info documentation. Use --force and ignore
errors for now.
(all-local): Add $(INFOS).
(install-local): Install info files.
(uninstall): Uninstall info files.
* docs/version.texi: Remove from revision control. This file is
automatically generated on build now.
* gendistlist.sh: Add `*.info'.
* configure.ac: Remove --enable-grub-pe2elf. Only build
grub-pe2elf when needed by the build system itself.
* conf/common.rmk: Remove $(enable_grub_pe2elf) check.
* configure.ac: By default, GCC 4.4 generates .eh_frame sections
containing unwind information in some cases where it previously did
not. Use -fno-dwarf2-cfi-asm if available to restore the old
behaviour. See http://patchwork.kernel.org/patch/8555/ for related
discussion.
* aclocal.m4: Add grub_CHECK_PIE. It check if the compiler
include -fPIE in the default specs.
* configure.ac: Check if pie_possible is yes and add -fno-PIE
to TARGET_CFLAGS.
Fix build with Apple's toolchain. Part 1
* commands/i386/pc/drivemap_int13h.S: use assembly-time constants
for long calls
* configure.ac: remove a leftover AC_MSG_RESULT
(CFLAGS): don't add -Wl,--defsym,___main=0x8100 when building with
Apple's toolchain
* configure.ac: Remove checks for __bswapsi2 and __bswapdi2,
they fail without libc headers for the target.
* include/grub/powerpc/libgcc.h: Use weak attribute for all
exports.
* include/grub/sparc64/libgcc.h: Likewise. Don't use
preprocessor conditionals.
Use objconv when compiling with Apple's CC
* conf/i386-pc.rmk (efiemu32.o): use OBJCONV if defined
(efiemu64.o): likewise
(efiemu64_c.o): omit -mcmodel=large and add -DAPPLE_CC=1
when compiling with Apple's CC
(efiemu64_s.o): likewise
* configure.ac: check for objconv when compiling with Apple's CC
* genmk.rb: use objconv for modules when compiled with Apple's CC
Allow a compilation without -mcmodel=large
* kern/efi/mm.c (grub_efi_allocate_pages): don't allocate >4GiB
when compiled without -mcmodel=large
(filter_memory_map): remove memory post 4 GiB when compiled
without -mcmodel=large
* configure.ac: fail gracefully and add -DMCMODEL_SMALL=1 to
TARGET_CFLAGS when -mcmodel=large isn't supported
Check if compiler is apple cc
* Makefile.in (ASFLAGS): new variable
(TARGET_ASFLAGS): likewise
(TARGET_MODULE_FORMAT): likewise
(TARGET_APPLE_CC): likewise
(OBJCONV): likewise
(TARGET_IMG_CFLAGS): likewise
(TARGET_CPPFLAGS): add includedir
* configure.ac: call grub_apple_cc and grub_apple_target_cc
(TARGET_IMG_LDFLAGS): Add -Wl,-Ttext,. All users updated
Check for linker script only if compiler isn't Apple's CC
(TARGET_MODULE_FORMAT): set
(TARGET_APPLE_CC): likewise
(TARGET_ASFLAGS): likewise
(ASFLAGS): likewise
Check for objcopy only if compiler isn't Apple's CC
Check for BSS symbol only if compiler isn't Apple's CC
* genmk.rb: adapt nm options if we use Apple's utils
* aclocal.m4 (grub_apple_cc): new test
(grub_apple_target_cc): likewise
* aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Remove.
* configure.ac: Don't call grub_I386_CHECK_REGPARM_BUG. Define
NESTED_FUNC_ATTR using AH_BOTTOM. Use regparm(1) only when
compiling for the i386 targets, but not for the utilities.
* Makefile.in (enable_efiemu): New variable.
* conf/i386-pc.rmk: Only compile efiemu runtimes when enable_efiemu is
set.
(efiemu32.o): Use macro $< for source file, add $(srcdir) to include
path.
(efi64_c.o): Use macro $< for source file, add $(srcdir) to include
path, add -mno-red-zone option.
(efiemu64_s.o): Likewise.
(efiemu64.o): Use macro $^ for source file.
* configure.ac (--enable-efiemu): New option.
* configure.ac: Change the logic when we check for target tools.
Do it when the target is specified and it's different from the
specified value of the host.
* util/hostdisk.c (read_device_map): Use grub_util_get_disk_size
instead of stat in mingw environment.
* util/misc.c (grub_millisleep): Use Sleep in mingw environment.
* aclocal.m4 (grub_CHECK_LINK_DIR): New function.
* configure.ac: Use grub_CHECK_LINK_DIR to determine whether to use
AC_CONFIG_LINKS.
Filter /etc/grub.d/10_* so that only add-ons for native kernels are
installed.
* Makefile.in (host_kernel): New variable.
* conf/common.rmk (grub-mkconfig_SCRIPTS): Conditionalize all 10_*.in
scripts instead of just the windows one.
* configure.ac: Initialize and AC_SUBST `host_kernel'.
* configure.ac: Only test -mcmodel=large option in x86_64-efi, also add
another option -mno-red-zone.
* commands/handler.c: Change module description.
* kern/handler.c: Add missing space at the end of description line.
* kern/list.c: Likewise.