Similar to check for target linking format, also check for efiemu64
instead of hardcoding -melf_x86_64. This fixes compilation on *BSD
variants. We cannot easily reuse main target check because platforms
are different (main target is 32 bit and efiemu64 - 64 bit).
This commit adds EFIEMU64_LINK_FORMAT that contains detected
link option and is used in efiemu64.o linking instead of hardcoded
value.
Reported-By: Beeblebrox <zaphod@berentweb.com>
the function of these files exceeds what can be sanely handled in shell
in posix-comaptible way. Also writing it in C extends the functionality
to non-UNIX-like OS and minimal environments.
* configure.ac: Define BUILD_LIBM to -lm on most platforms
and empty on haiku.
* grub-core/Makefile.am (gentrigtables): Use $(BUILD_LIBM) rather than
-lm.
* Makefile.am (build-grub-mkfont): Don't include gnulib.
(build-grub-gen-asciih): Likewise.
(build-grub-gen-widthspec): Likewise.
* Makefile.util.def (grub-pe2elf): Remove.
* config.h.in [GRUB_BUILD]: Use build rather than host constants.
* configure.ac: Separate tests for build.
Move ./build-grub-pe2elf to grub-core.
Fix typo.
* grub-core/Makefile.am (build-grub-pe2elf): New target.
* grub-core/kern/emu/misc.c (xasprintf): Don't compile if GRUB_BUILD is
defined.
* include/grub/types.h [GRUB_BUILD]: Use build rather than host
constants.
* util/grub-mkfont.c [GRUB_BUILD]: Simplify not to rely on argp.
* util/grub-pe2elf.c: Simplify not to rely on getopt.
* util/misc.c (program_name) [GRUB_BUILD]: Define to static string.
* acinclude.m4: Determine whether nm support -P and --defined-only.
* configure.ac: Add TARGET_ to all variables pertaining to target
that don't have it yet.
* gentpl.py: Likewise.
* grub-core/Makefile.am: Likewise.
* grub-core/genmod.sh.in: Likewise.
* grub-core/gensyminfo.sh.in: Handle OpenBSD and other non-GNU nm
as well.
* grub-core/Makefile.am (KERNEL_HEADER_FILES): Add pci.h on x86 EFI.
* grub-core/Makefile.core.def (kernel): Add pci.c on x86 EFI.
(pci): Don't build on x86 EFI.
* grub-core/bus/pci.c (grub_pci_find_capability): New function.
* grub-core/kern/efi/mm.c (stop_broadcom) [__i386__ || __x86_64__]:
New function.
(grub_efi_finish_boot_services) [__i386__ || __x86_64__]: Call
stop_broadcom if running on EFI.
* include/grub/pci.h (GRUB_PCI_CLASS_NETWORK): New enum value.
(GRUB_PCI_CAP_POWER_MANAGEMENT): Likewise.
(GRUB_PCI_VENDOR_BROADCOM): Likewise.
(grub_pci_find_capability): New proto.
Also-By: Vladimir Serbinenko <phcoder@gmail.com>
* grub-core/Makefile.am (moddep.lst): Make dependent on video.lst.
* grub-core/Makefile.core.def (all_video): New module.
* grub-core/genmoddep.awk: Generate dependency of all_video from
video.lst.
* grub-core/lib/fake_module.c: New file.
* grub-core/normal/main.c (features): Add feature_all_video_module.
* util/grub.d/00_header.in: Define locale_dir based on $prefix and
don't do explicit search again.
insmod all_video in load_video if available.