All of lore.kernel.org
 help / color / mirror / Atom feed
* Add TARGET_CFLAGS to efiemu link format test
@ 2014-01-26 22:29 Glenn Washburn
  2014-01-27  2:56 ` Vladimir 'φ-coder/phcoder' Serbinenko
  0 siblings, 1 reply; 2+ messages in thread
From: Glenn Washburn @ 2014-01-26 22:29 UTC (permalink / raw)
  To: grub-devel

[-- Attachment #1: Type: text/plain, Size: 861 bytes --]

Its been a while since I've compiled grub using the latest git.  When I
just did, the build now fails in configure when evaluating the efiemu
link format test (which was being automatically chosen by efiemu
option being guessed to "yes"). The proximate issue was that the test
program failed to compile due to a missing include directory (which may
be the result of a packaging issue on my machine).

Whereas when compiling for the emu platform the efiemu allows for the
CFLAGS to be affected by the TARGET_CFLAGS environment variable, there
is no equivalent method to affect the CFLAGS of the test for i386
platforms.  So I added TARGET_CFLAGS (and TARGET_LDFLAGS) for symmetry
with the emu platform.

The attached patch allowed me to successfully compile with efiemu
(untested since I don't actually use efiemu).  Perhaps it will be of
use to others.

Glenn


[-- Attachment #2: add-target-cflags-to-efiemu-link-format-test.patch --]
[-- Type: text/x-patch, Size: 1236 bytes --]

diff --git a/configure.ac b/configure.ac
index 8888c2f..1a8c341 100644
--- a/configure.ac
+++ b/configure.ac
@@ -718,7 +718,7 @@ if test x"$platform" = xefi ; then
 fi
 if test x"$efiemu_excuse" = x ; then
   AC_CACHE_CHECK([whether options required for efiemu work], grub_cv_cc_efiemu, [
-    CFLAGS="-m64 -nostdlib -O2 -mcmodel=large -mno-red-zone"
+    CFLAGS="$TARGET_CFLAGS -m64 -nostdlib -O2 -mcmodel=large -mno-red-zone"
     AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])],
 		      [grub_cv_cc_efiemu=yes],
 		      [grub_cv_cc_efiemu=no])
@@ -731,8 +731,8 @@ if test x"$efiemu_excuse" = x ; then
   AC_CACHE_CHECK([for efiemu64 linking format], [grub_cv_target_cc_efiemu64_link_format], [
     grub_cv_target_cc_efiemu64_link_format=unknown
     for format in -melf_x86_64 -melf_x86_64_fbsd -melf_x86_64_obsd -melf_x86_64_haiku -arch,x86_64; do
-      CFLAGS="-m64 -nostdlib -O2 -mcmodel=large -mno-red-zone"
-      LDFLAGS="-m64 -Wl,$format -nostdlib -static"
+      CFLAGS="$TARGET_CFLAGS -m64 -nostdlib -O2 -mcmodel=large -mno-red-zone"
+      LDFLAGS="$TARGET_LDFLAGS -m64 -Wl,$format -nostdlib -static"
       AC_LINK_IFELSE([AC_LANG_PROGRAM([[
       asm (".globl start; start:");
       asm (".globl _start; _start:");

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: Add TARGET_CFLAGS to efiemu link format test
  2014-01-26 22:29 Add TARGET_CFLAGS to efiemu link format test Glenn Washburn
@ 2014-01-27  2:56 ` Vladimir 'φ-coder/phcoder' Serbinenko
  0 siblings, 0 replies; 2+ messages in thread
From: Vladimir 'φ-coder/phcoder' Serbinenko @ 2014-01-27  2:56 UTC (permalink / raw)
  To: The development of GNU GRUB

[-- Attachment #1: Type: text/plain, Size: 1278 bytes --]

On 26.01.2014 23:29, Glenn Washburn wrote:
> Its been a while since I've compiled grub using the latest git.  When I
> just did, the build now fails in configure when evaluating the efiemu
> link format test (which was being automatically chosen by efiemu
> option being guessed to "yes"). The proximate issue was that the test
> program failed to compile due to a missing include directory (which may
> be the result of a packaging issue on my machine).
> 
> Whereas when compiling for the emu platform the efiemu allows for the
> CFLAGS to be affected by the TARGET_CFLAGS environment variable, there
> is no equivalent method to affect the CFLAGS of the test for i386
> platforms.  So I added TARGET_CFLAGS (and TARGET_LDFLAGS) for symmetry
> with the emu platform.
> 
> The attached patch allowed me to successfully compile with efiemu
> (untested since I don't actually use efiemu).  Perhaps it will be of
> use to others.
> 
efiemu is compiled in its own environment and using TARGET_CFLAGS on it
would break it in some cases. Please attach the logs of failed attempts.
> Glenn
> 
> 
> 
> _______________________________________________
> Grub-devel mailing list
> Grub-devel@gnu.org
> https://lists.gnu.org/mailman/listinfo/grub-devel
> 



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 274 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-01-27  2:56 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-01-26 22:29 Add TARGET_CFLAGS to efiemu link format test Glenn Washburn
2014-01-27  2:56 ` Vladimir 'φ-coder/phcoder' Serbinenko

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.