Commit Graph

436 Commits

Author SHA1 Message Date
Andrey Borzenkov c2b70d0981 Explicitly check for linking format to use for efiemu64 module
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>
2013-11-25 22:32:55 +04:00
Vladimir Serbinenko 246a434f61 * configure.ac: Add -static to LDFLAGS when using apple linker to
prevent it from pulling in dynamic linker.
2013-11-25 05:47:20 +01:00
Vladimir Serbinenko f93ddcfd1c Don't add -mflush-func if it's not supported by compiler. 2013-11-23 12:40:44 +01:00
Vladimir Serbinenko a3ba74104e * configure.ac: Do not enforce -mcmodel=large. It's not necessarry with
3 last commits.
2013-11-22 13:07:51 +01:00
Vladimir Serbinenko 9cf12b20af * configure.ac: Compile with -fPIC when compiling with clang on
mips.
2013-11-22 12:50:41 +01:00
Vladimir Serbinenko 63a45330cb * configure.ac: Add -no-integrated-as on mips(el) to TARGET_CCASFLAGS
when compiling with clang.
2013-11-22 12:48:32 +01:00
Vladimir Serbinenko cd46aa6cef Rewrite grub-install, grub-mkrescue, grub-mkstandalone and grub-mknetdir
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.
2013-11-16 20:21:16 +01:00
Andrey Borzenkov 31c0cd4362 restore -nostdlib for libgcc symbols tests
Commit 24f4e57c46 plugged leakage
of CFLAGS between individual tests, which broke test for libgcc
symbols. It needs -nostdlib which was set in previous test and
inherited before. Set it explicitly.
2013-11-16 17:03:20 +04:00
Vladimir Serbinenko 6fcec43954 Replace libgcc version of ctz with our own.
On upcoming arm64 port libgcc ctz* are not usable in standalone
	environment. Since we need ctz* for this case and implementation is
	in C we may as well use it on all concerned platforms.
2013-11-15 03:28:34 +01:00
Vladimir Serbinenko a9f25a0819 * configure.ac: Probe for linking format rather than guessing it based
on target_os.
2013-11-14 23:17:18 +01:00
Vladimir Serbinenko 20aea9492f * configure.ac: Move nm checks to the end.
Call grub_PROG_NM_WORKS.
	* acinclude.m4: New check grub_PROG_NM_WORKS.
	Use $TARGET_CFLAGS -c when compiling test binary.
2013-11-14 17:39:01 +01:00
Vladimir Serbinenko 2312f06c30 * configure.ac: Use -no-integrated-as on arm with clang.
* INSTALL: Mention ARM compilation with clang.
2013-11-14 08:36:35 +01:00
Colin Watson 6fe506b04b * configure.ac (AM_INIT_AUTOMAKE): Require at least version 1.10.1,
to match INSTALL.
2013-11-13 14:57:12 +00:00
Colin Watson 11da14b548 * acinclude.m4 (grub_apple_cc): Remove; since the removal of nested
functions, we only need to check this for the target, not the host.
* configure.ac (grub_apple_cc): Likewise.
2013-11-13 12:01:39 +00:00
Vladimir Serbinenko 16057d6bbb Redirect all divisions to grub_divmod64. 2013-11-13 00:53:53 +01:00
Vladimir Serbinenko 300f48c532 * configure.ac: Allow disabling themes. 2013-11-12 22:44:01 +01:00
Vladimir Serbinenko 0d2d30bb39 * configure.ac: Check for lzma.h for enabling liblzma and allow
manual disabling.
2013-11-11 22:47:48 +01:00
Vladimir Serbinenko 3c2304d55f * configure.ac: Make efiemu test cflags match the cflags efiemu is
compiled with.
2013-11-10 14:46:13 +01:00
Vladimir Serbinenko c61471fc8b * configure.ac: Remove leftover -fnested-funcions -Wl,-allow_execute. 2013-11-10 13:24:06 +01:00
Vladimir Serbinenko 28668d808e * configure.ac: Restore CFLAGS to TARGET_CFLAGS before external tests.
Add -march=core2 when testing compile of efiemu64.

	Thanks Andrey Borzenkov for spotting this.
2013-11-10 13:10:45 +01:00
Vladimir Serbinenko 9612ebc00e Add new ports: i386-xen and x86_64-xen. This allows running GRUB in
XEN PV environment and load kernels.
2013-11-09 21:29:11 +01:00
Vladimir Serbinenko dd7f792c85 * configure.ac: Use elf_*_fbsd on kfreebsd. 2013-11-08 15:10:13 +01:00
Vladimir Serbinenko d59849b2e7 * grub-core/Makefile.am: Do not include libgcc.h when compiling with
clang.
2013-11-07 19:33:54 +01:00
Vladimir Serbinenko d5524ca87b * configure.ac: Run linker tests without -Werror.
Define TARGET_LDFLAGS_STATIC_LIBGCC and TARGET_LIBGCC.
	Change all occurences of -static-libgcc resp -lgcc to
	TARGET_LDFLAGS_STATIC_LIBGCC resp TARGET_LIBGCC.
2013-11-07 18:21:22 +01:00
Vladimir Serbinenko 390cd7ca90 * configure.ac: Don't add -no-itegrated-as on clang on non-x86. 2013-11-07 18:18:43 +01:00
Vladimir Serbinenko 60375a88fe Allow compiling with clang (not really supported though).
* conf/Makefile.common (CFLAGS_PLATFORM): Don't add -mrtd -mregparm=3
	unconditionally.
	* configure.ac: Add -no-integrated-as when using clangfor asm files.
	Add -mrtd -mregparm=3 on i386 when not using clang.
	* grub-core/kern/misc.c (grub_memset): Add volatile when on clang.
2013-11-07 11:44:40 +01:00
Vladimir Serbinenko c12936c5d1 * configure.ac: Don't add -Wcast-align on x86. 2013-11-07 03:35:25 +01:00
Vladimir Serbinenko cdc17f60dc * configure.ac: Add -freg-struct-return on all platforms that
support it.
2013-11-07 03:33:20 +01:00
Vladimir Serbinenko b35ec29927 * acinclude.m4: Use -Werror on parameter tests.
* configure.ac: Likewise.
2013-11-07 03:31:24 +01:00
Vladimir Serbinenko c966a489cf * configure.ac: Check that -malign-loops works rather than assuming that
either -falign-loops or -malign-loops work.
2013-11-07 03:25:30 +01:00
Vladimir Serbinenko bb0c57ecd2 * configure.ac: Remove -fnested-functions. We don't need it anymore. 2013-11-07 03:19:55 +01:00
Vladimir Serbinenko 24f4e57c46 * configure.ac: Prevent cflags leaking to subsequent tests by always
resetting cflags to target_cflags in target tests.
2013-11-07 03:17:37 +01:00
Andrey Borzenkov e7d09ac4f7 enable emuusb and emupci on emu platform only
Also explicitly disable them in configure unless built for emu platform.

Signed-off-by: Andrey Borzenkov <arvidjaar@gmail.com>
2013-11-04 16:53:39 +04:00
Mike Frysinger ee7fb780c8 * configure.ac: Don't add target-prefix. 2013-11-03 12:48:13 +01:00
Vladimir Serbinenko 48145ea358 Fix last commit 2013-11-03 00:25:04 +01:00
Vladimir Serbinenko dd614590c9 * configure.ac: Don't add -m32/-m64 on emu. 2013-11-02 22:46:01 +01:00
Vladimir Serbinenko 5cf9459c08 * configure.ac: Use 0x8000 for address instead of 8000. 2013-11-02 19:13:41 +01:00
Vladimir Serbinenko 02663ee9d9 * configure.ac (TARGET_CFLAGS): Add -march=i386 on i386. 2013-11-02 16:40:25 +01:00
Vladimir Serbinenko 3bc9c8cfc8 * configure.ac: Remove leftover COND_BUILD_GRUB_MKFONT and
COND_GRUB_PE2ELF conditions.
2013-10-27 19:44:19 +01:00
Vladimir 'phcoder' Serbinenko 29013cba15 Don't add -lm on haiku.
* 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.
2013-10-19 02:20:21 +02:00
Vladimir 'phcoder' Serbinenko e8559d2434 * configure.ac: Use -melf_*_haiku as target on haiku. 2013-10-19 02:15:35 +02:00
Vladimir 'phcoder' Serbinenko 27f9d02eb9 * configure.ac: Check for nvlist_lookup_string in nvpair since we
use nvlist_lookup_string and don't use nvlist_print.
2013-10-15 15:01:01 +02:00
Ilya Bakulin 6d0740e8ca * configure.ac: Use -melf_*_obsd on openbsd. 2013-10-12 08:08:11 +02:00
neil 5830df88da * configure.ac: Do not enable -Wmissing-noreturn as its
usefulness is limited and creates problems on some OS notably with
	code generated by bison.

	Also-By: Vladimir Serbinenko <phcoder@gmail.com>
2013-09-23 13:48:10 +02:00
neil c248781a83 * configure.ac: Do no explicitly enable -Waddress as it's not
supported by all gcc and when it is, it's already enabled by -Wall.

	Also-By: Vladimir Serbinenko <phcoder@gmail.com>
2013-09-23 13:43:35 +02:00
Vladimir 'phcoder' Serbinenko 1bd7302506 * configure.ac: Substitute TARGET_RANLIB. 2013-09-23 13:20:32 +02:00
Vladimir 'phcoder' Serbinenko 0e8daad0bd * grub-core/Makefile.am: Override STRIP and RANLIB.
* configure.ac: compute TARGET_RANLIB.
	* INSTALL: Document TARGET_RANLIB

	Based on patches from AROS.
2013-09-23 12:55:18 +02:00
Vladimir 'phcoder' Serbinenko 7e518ca84f Use Winapi on both cygwin and mingw32 to share more code between both. 2013-09-23 11:21:09 +02:00
Vladimir 'phcoder' Serbinenko 15ce95c40c * configure.ac: On FreeBSD use -melf_*_fbsd format. 2013-09-22 03:26:11 +02:00
Vladimir 'phcoder' Serbinenko 1c1f31e5de * configure.ac: Disable efiemu runtime on cygwin. 2013-08-23 08:46:14 +02:00