Commit Graph

554 Commits

Author SHA1 Message Date
Vladimir Serbinenko 5c46165a7c configure.ac: Handle powerpc64le compiler
Also-by: Paulo Flabiano Smorigo <pfsmorigo@linux.vnet.ibm.com>
2015-07-22 01:54:59 +02:00
Leif Lindholm 43d4231432 configure.ac: clean up arm64 soft-float handling
Fix compilation with gcc 5.1 (avoid internal compiler error), by
replacing explicit -march +nofp+nosimd options with -mgeneral-regs-only.

This also enables the removal of some further conditional build flag
setting.
2015-06-02 15:41:09 +01:00
Vladimir Serbinenko 5959b15c1c configure.ac: Fix the name of pciaccess header. 2015-03-04 01:01:45 +01:00
Vladimir Serbinenko 9d25b0da9a Remove emu libusb support.
It's disabled by default and has been broken for a long time.
As nobody is interested in fixing and maintaining it, remove it.
2015-03-03 20:59:36 +01:00
Vladimir Serbinenko 9f95d12153 configure.ac: Remove unused COND_clang 2015-03-03 20:50:37 +01:00
Vladimir Serbinenko 064360e667 Remove libgcc dependency.
libgcc for boot environment isn't always present and compatible.
libgcc is often absent if endianness or bit-size at boot is different
from running OS.
libgcc may use optimised opcodes that aren't available on boot time.
So instead of relying on libgcc shipped with the compiler, supply
the functions in GRUB directly.
Tests are present to ensure that those replacement functions behave the
way compiler expects them to.
2015-03-03 20:50:37 +01:00
Vladimir Serbinenko aa6ccc05c1 configure.ac: Set $CPPFLAGS when checking for no_app_regs.
Fixes compilation for sparc64 with clang.
2015-03-03 20:50:37 +01:00
Vladimir Serbinenko 6a4ecd276e mips: Fix soft-float handling.
Add -msoft-float alongside clang arguments to specify ABI.
Specify ABI in asm files explicitly.
This trigers asm warning due to gcc failing to propagate -msoft-float
but it's tolerable.
2015-02-23 22:33:28 +01:00
Vladimir Serbinenko 2066c35b3f Allow clang compilation for thumb with -mthumb-interwork.
clang already uses -mthumb-interwork behaviour even thout it doesn't
support the option.
2015-02-23 22:29:33 +01:00
Vladimir Serbinenko 345076a78a arm64: Fix compilation failure.
Don't supply +nosimd to asm files.
Otherwise +nosimd coming from flags forbids some of instructions
used in cache_flush.
2015-02-23 22:29:28 +01:00
Vladimir Serbinenko ea39b87a8b configure.ac: Add ia64-specific way to disable floats. 2015-02-22 14:42:19 +01:00
Vladimir Serbinenko 155f334f57 Experimental support for clang for sparc64.
Automatically discover command line options to make clang and
gcc behave in same way.

Tested with qemu.
2015-02-22 01:54:55 +01:00
Vladimir Serbinenko ebe316e4df Discover which option provides soft-float on configure stage.
Deals with clang needing other arguments to stop issuing floating
instructions than gcc.
2015-02-22 00:35:11 +01:00
Vladimir Serbinenko f16b8c0405 Relax requirements on asm for non-BIOS i386 platforms.
These platforms don't have a hard limit on size of resulting code16
code, so we don't care if assembly is bigger than necessarry.
2015-02-21 20:18:18 +01:00
Vladimir Serbinenko 6505b241fd Remove obsolete ADDR32 and DATA32 checks. 2015-02-21 17:44:41 +01:00
Vladimir Serbinenko 065ad910f1 Test which flags make our asm compile.
Previously we relied on assumption that clang always needs -no-integrated-as
but it's not always true.
2015-02-21 16:29:28 +01:00
Vladimir Serbinenko ef7c843b44 configure: Add -msoft-float to CCASFLAGS
Otherwise mismatch between API flags triggers linker failure
2015-02-21 16:13:11 +01:00
Vladimir Serbinenko b46bf3cd1c configure: Move adding of include options to the very end to avoid subshell. 2015-02-20 21:30:34 +01:00
Vladimir Serbinenko 86f05f1491 configure: Add missing comma. 2015-02-20 21:29:35 +01:00
Leif Lindholm 2da4171eab configure.ac: don't use -msoft-float for arm64
aarch64 toolchains do not support the -msoft-float option added by
commit 3661261f. Insted, for arm64 use -march=armv8-a+nofp+nosimd.

Reported-by: Ryan Harkin <ryan.harkin@linaro.org>
2015-01-28 20:44:41 +00:00
Vladimir Serbinenko fc7a64bc5a configure.ac: Always add -D_FILE_OFFSET_BITS=64. 2015-01-26 09:35:44 +01:00
Vladimir Serbinenko 3661261fe1 Always add -msoft-float to avoid compiler generating float arithmetics. 2015-01-24 20:37:08 +01:00
Felix Janda 3bac4caa2b Remove direct _llseek code and require long filesystem libc. 2015-01-22 19:54:36 +01:00
Colin Watson 77063f4cb6 Fix in-tree --platform=none
* configure.ac: Only remove include/grub/cpu and
include/grub/machine in the --platform=none case, not all of
include/grub.
2014-09-25 20:59:26 +01:00
Colin Watson 5d90f6e533 Add a new "none" platform that only builds utilities
This makes it possible to build generally-useful utilities such as
grub-mount even if the rest of GRUB has not been ported to the target
CPU.

* configure.ac: Add "none" platform.  Default to it for unsupported
CPUs rather than stopping with a fatal error.  Don't downgrade
x86_64-none to i386.  Define COND_real_platform Automake conditional
if the platform is anything other than "none".  Don't do any include
directory linking for "none".
* Makefile.am: Skip building grub-core and all bootcheck targets if
!COND_real_platform.
* include/grub/time.h: Don't include <grub/cpu/time.h> if GRUB_UTIL
is defined.
2014-09-23 12:06:30 +01:00
Colin Watson 2a5a532c00 Support grub-emu on x32 (ILP32 but with x86-64 instruction set)
* configure.ac: Remove -m64 from checks for -mcmodel=large and
-mno-red-zone.  These are always either unnecessary (x86_64-emu) or
already in TARGET_CFLAGS at this point, and they produce incorrect
results when building for x32.
* grub-core/kern/x86_64/dl.c (grub_arch_dl_relocate_symbols): Cast
pointers to Elf64_Xword via grub_addr_t, in order to work on x32.
* include/grub/x86_64/types.h (GRUB_TARGET_SIZEOF_VOID_P,
GRUB_TARGET_SIZEOF_LONG): Define to 4 on x32.
2014-09-07 23:04:50 +01:00
Colin Watson 4d94b2db58 * configure.ac: Remove several unnecessary semicolons. 2014-09-07 20:47:43 +01:00
Andrey Borzenkov 443b322262 Show detected path to DejaVuSans in configure summary 2014-01-21 19:41:11 +04:00
Andrey Borzenkov 36387ece6b look for DejaVu also in /usr/share/fonts/truetype
It is installed in this path on openSUSE.
2014-01-21 19:29:33 +04:00
Andrey Borzenkov 1ecf96fcc4 add BUILD_EXEEXT support to fix make clean on Windows
Add $(BUILD_EXEEXT) to ensure files are removed. Also add CLEANFILES where
appropriate.
2014-01-18 20:41:24 +04:00
Andrey Borzenkov dcecae1a49 reintroduce BUILD_LDFLAGS for the cross-compile case
This allows providing separate LDFLAGS for build and host environments, which
are not necessary the same for cross-compile case. In particular, it allows
building host programs statically to not depend on presence of libraries at
run-time (e.g. MinGW DLLs on Windows) while continue to use default dynamic
linking at build time.

Also fix obsolete comments in confgure.ac - we do use different environment
for build and host now.
2014-01-18 19:50:54 +04:00
Vladimir Serbinenko e8f07821cc * configure.ac: Set version to 2.02~beta2. 2013-12-24 21:53:23 +01:00
Vladimir Serbinenko faf4a65e1e Revert grub-file usage in grub-mkconfig. 2013-12-24 17:47:27 +01:00
Vladimir Serbinenko 57bc5d431b Add -Qn to TARGET_CFLAGS if it's supported.
Fixes compilation on cygwin.

	Reported by: Andrey Borzenkov.
	Suggested by: Andrey Borzenkov.
2013-12-24 15:00:46 +01:00
Vladimir Serbinenko 6a7957f9f5 Save TARGET_CC version in modinfo.sh.
Suggested by: Andrey Borzenkov.
2013-12-24 14:47:44 +01:00
Vladimir Serbinenko 72f099578e Merge branch 'master' of git.sv.gnu.org:/srv/git/grub 2013-12-23 18:17:29 +01:00
Vladimir Serbinenko 0c930a841e Remove leftover options defines. 2013-12-23 18:17:02 +01:00
Colin Watson 16f7455b04 * configure.ac: Fix spelling.
* grub-core/commands/parttool.c: Fix grammar.
* grub-core/disk/ldm.c: Use consistent capitalisation for "LDM
Embedding Partition".
2013-12-23 13:32:35 +00:00
Vladimir Serbinenko bf082198e2 * configure.ac: Choose link format based on host_os on emu. 2013-12-21 20:19:34 +01:00
Vladimir Serbinenko ae558c2ccf Enable -Wformat=2 if it's supported. 2013-12-21 15:28:28 +01:00
Vladimir Serbinenko bbac6789aa * configure.ac: Add -Wmissing-include-dirs -Wmissing-prototypes
-Wmissing-declarations if supported.
2013-12-21 14:47:55 +01:00
Vladimir Serbinenko 93bf55e616 * configure.ac: Remove duplicate warning arguments. 2013-12-21 13:53:42 +01:00
Colin Watson d642d76197 Be more verbose about some configure failures. 2013-12-20 16:09:43 +00:00
Vladimir Serbinenko 2fa5a58ca3 * configure.ac: Set version to 2.02~beta1. 2013-12-19 01:54:43 +01:00
Vladimir Serbinenko 72c9a50773 Remove xen VFB.
Due to XEN bug it prevents Linux boot. Remove it at least, until
	workaround is found.
2013-12-18 18:43:09 +01:00
Vladimir Serbinenko a29f317af1 Allow compilation without thumb-interwork as long as no thumb is
involved or only thumb2 is used.
2013-12-18 13:33:39 +01:00
Vladimir Serbinenko c2be6f7ef8 Remove -Wold-style-definition.
Not very useful and interaction of it with regexp depends on GCC
	version.
2013-12-18 07:48:09 +01:00
Vladimir Serbinenko ec824e0f2a Implement grub_file tool and use it to implement generating of config
in separate root.
2013-12-17 14:39:48 +01:00
Vladimir Serbinenko 71669c3b76 Implement XEN VFB support. 2013-12-17 13:07:26 +01:00
Vladimir Serbinenko 6f1f6a0c82 Add support for converting PE+ to Elf64. 2013-12-16 15:30:50 +01:00
Vladimir Serbinenko 252a289cb3 Determine the need for mingw-related stubs at compile time rather than
using not very significant $target_os.
2013-12-16 14:18:15 +01:00
Vladimir Serbinenko 37378f748a Define functions explicitly rather than using --defsym in tests
whenever possible. Respect locality in remaining cases.
2013-12-16 13:07:28 +01:00
Vladimir Serbinenko 60b967be7e Make i386-* other than i386-pc compileable under cygwin. 2013-12-14 23:12:53 +01:00
Vladimir Serbinenko eaf01c25fe Add missing compile and link options for sparc64-emu. 2013-12-10 00:05:28 +01:00
Vladimir Serbinenko b75db69ac1 * configure.ac: Check for freetype library usability. 2013-12-08 10:50:59 +01:00
Vladimir Serbinenko 5ff249072d * configure.ac: Make unifont mandatory on coreboot. 2013-12-07 11:47:19 +01:00
Vladimir Serbinenko 0277eab701 * configure.ac: Skip unifont 6.3 pcf and bdf. 2013-12-07 11:46:46 +01:00
Vladimir Serbinenko 4182262560 Don't add -mlong-calls when compiling with clang. 2013-12-06 11:58:17 +01:00
Vladimir Serbinenko 896f483d49 * configure.ac: Fix a typo. 2013-12-06 10:02:24 +01:00
Vladimir Serbinenko 382b500ebe * configure.ac: Move all warning options that may be absent in
gcc >= 3.1 to optional.

	Note: while this allows to compile with older GCC, official requirements
	remain the same and no support for older GCC.
2013-12-04 14:53:25 +01:00
Vladimir Serbinenko bdb6090d83 * configure.ac: Allow compilation with older GCC for ARM. 2013-12-04 12:42:09 +01:00
Vladimir Serbinenko b73b70ebca * configure.ac: Add -no-integrated-as if {addme|ame} isn't supported.
* INSTALL: Note that GRUBwas successfully compiled with clang 3.2 for
	ppc.
2013-12-04 12:20:56 +01:00
Vladimir Serbinenko 6f07c4e407 Pass font config to config.h and not by TARGET_CFLAGS as adding
arguments doesn't work if TARGET_CFLAGS is specified on command
	line.
2013-12-04 10:25:53 +01:00
Vladimir Serbinenko 60d5e9cbd9 * configure.ac: Add -Wvla if compiler supports it. 2013-12-04 10:08:57 +01:00
Leif Lindholm b29b77fee2 New port arm64-efi 2013-11-30 16:50:31 +01:00
Vladimir Serbinenko d74b9a1d1a Ensure that -mno-unaligned-access or some equivalent option is used. 2013-11-30 11:31:14 +01:00
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 d6c92cdc34 Merge branch 'master' into leiflindholm/arm64
Conflicts:
	include/grub/util/install.h
2013-11-25 13:02:27 +01: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
Leif Lindholm 15a463d742 ARM 64 port by Leif Lindholm 2013-11-16 20:52:55 +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