* bug: cygwin support breaks cross compiles on cygwin
@ 2008-08-08 9:03 Patrick Georgi
2008-08-08 10:17 ` Bean
` (2 more replies)
0 siblings, 3 replies; 9+ messages in thread
From: Patrick Georgi @ 2008-08-08 9:03 UTC (permalink / raw)
To: grub-devel
Hi,
I used cygwin to build grub2/i386-coreboot using an i386-elf cross
compiler. unfortunately the test in configure only looks for the host
platform and enables pe2elf in that case, even though my compiler emits
ELF already.
my workaround is to just change that test (there's no OS cyg_win), but
of course that's no permanent solution.
Bean proposed on IRC to look if the target compiler emits PE, and enable
pe2elf based on that.
Regards,
Patrick Georgi
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: bug: cygwin support breaks cross compiles on cygwin
2008-08-08 9:03 bug: cygwin support breaks cross compiles on cygwin Patrick Georgi
@ 2008-08-08 10:17 ` Bean
2008-08-08 10:36 ` Christian Franke
2008-08-08 11:09 ` Robert Millan
2 siblings, 0 replies; 9+ messages in thread
From: Bean @ 2008-08-08 10:17 UTC (permalink / raw)
To: The development of GRUB 2
On Fri, Aug 8, 2008 at 5:03 PM, Patrick Georgi <patrick@georgi-clan.de> wrote:
> Hi,
>
> I used cygwin to build grub2/i386-coreboot using an i386-elf cross compiler.
> unfortunately the test in configure only looks for the host platform and
> enables pe2elf in that case, even though my compiler emits ELF already.
>
> my workaround is to just change that test (there's no OS cyg_win), but of
> course that's no permanent solution.
> Bean proposed on IRC to look if the target compiler emits PE, and enable
> pe2elf based on that.
Hi,
Yes, we can solve this with script. Another way is to do some test in
grub-pe2elf. If the image is already elf, it does nothing and return
true. This should fix the problem as well.
--
Bean
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: bug: cygwin support breaks cross compiles on cygwin
2008-08-08 9:03 bug: cygwin support breaks cross compiles on cygwin Patrick Georgi
2008-08-08 10:17 ` Bean
@ 2008-08-08 10:36 ` Christian Franke
2008-08-08 11:09 ` Robert Millan
2 siblings, 0 replies; 9+ messages in thread
From: Christian Franke @ 2008-08-08 10:36 UTC (permalink / raw)
To: The development of GRUB 2
[-- Attachment #1: Type: text/plain, Size: 621 bytes --]
Patrick Georgi wrote:
> Hi,
>
> I used cygwin to build grub2/i386-coreboot using an i386-elf cross
> compiler. unfortunately the test in configure only looks for the host
> platform and enables pe2elf in that case, even though my compiler
> emits ELF already.
>
> my workaround is to just change that test (there's no OS cyg_win), but
> of course that's no permanent solution.
> Bean proposed on IRC to look if the target compiler emits PE, and
> enable pe2elf based on that.
>
>
Thanks for the info.
A simple fix is probably a test for target_os also, please try attached
patch (and re-run autoconf).
Christian
[-- Attachment #2: grub2-configure.patch --]
[-- Type: text/x-diff, Size: 536 bytes --]
diff --git a/configure.ac b/configure.ac
index 7a5938a..41e08f1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -206,9 +206,10 @@ AC_MSG_RESULT([$TARGET_IMG_LDFLAGS_AC])
# For platforms where ELF is not the default link format.
AC_MSG_CHECKING([for command to convert module to ELF format])
-if test "$host_os" = cygwin; then
- TARGET_OBJ2ELF='grub-pe2elf.exe'
-fi
+case "${host_os}:${target_os}" in
+ cygwin:cygwin) TARGET_OBJ2ELF='grub-pe2elf.exe' ;;
+ *) ;;
+esac
AC_SUBST(TARGET_OBJ2ELF)
AC_MSG_RESULT([$TARGET_OBJ2ELF])
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: bug: cygwin support breaks cross compiles on cygwin
2008-08-08 9:03 bug: cygwin support breaks cross compiles on cygwin Patrick Georgi
2008-08-08 10:17 ` Bean
2008-08-08 10:36 ` Christian Franke
@ 2008-08-08 11:09 ` Robert Millan
2008-08-08 12:59 ` Christian Franke
2 siblings, 1 reply; 9+ messages in thread
From: Robert Millan @ 2008-08-08 11:09 UTC (permalink / raw)
To: The development of GRUB 2
On Fri, Aug 08, 2008 at 11:03:49AM +0200, Patrick Georgi wrote:
> Hi,
>
> I used cygwin to build grub2/i386-coreboot using an i386-elf cross
> compiler. unfortunately the test in configure only looks for the host
> platform and enables pe2elf in that case, even though my compiler emits
> ELF already.
>
> my workaround is to just change that test (there's no OS cyg_win), but
> of course that's no permanent solution.
> Bean proposed on IRC to look if the target compiler emits PE, and enable
> pe2elf based on that.
I have observed that grub-pe2elf is included even in native builds for ELF
platforms. Perhaps this is caused by the same bug?
--
Robert Millan
The DRM opt-in fallacy: "Your data belongs to us. We will decide when (and
how) you may access your data; but nobody's threatening your freedom: we
still allow you to remove your data and not access it at all."
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: bug: cygwin support breaks cross compiles on cygwin
2008-08-08 11:09 ` Robert Millan
@ 2008-08-08 12:59 ` Christian Franke
2008-08-08 13:37 ` Felix Zielcke
0 siblings, 1 reply; 9+ messages in thread
From: Christian Franke @ 2008-08-08 12:59 UTC (permalink / raw)
To: The development of GRUB 2
Robert Millan wrote:
> On Fri, Aug 08, 2008 at 11:03:49AM +0200, Patrick Georgi wrote:
>
>> Hi,
>>
>> I used cygwin to build grub2/i386-coreboot using an i386-elf cross
>> compiler. unfortunately the test in configure only looks for the host
>> platform and enables pe2elf in that case, even though my compiler emits
>> ELF already.
>>
>> my workaround is to just change that test (there's no OS cyg_win), but
>> of course that's no permanent solution.
>> Bean proposed on IRC to look if the target compiler emits PE, and enable
>> pe2elf based on that.
>>
>
> I have observed that grub-pe2elf is included even in native builds for ELF
> platforms. Perhaps this is caused by the same bug?
>
>
No, grub-pe2elf is build and installed even if is not necessary for the
build process. This should be no problem.
Christian
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: bug: cygwin support breaks cross compiles on cygwin
2008-08-08 12:59 ` Christian Franke
@ 2008-08-08 13:37 ` Felix Zielcke
2008-08-08 21:13 ` Christian Franke
0 siblings, 1 reply; 9+ messages in thread
From: Felix Zielcke @ 2008-08-08 13:37 UTC (permalink / raw)
To: The development of GRUB 2
Hello,
Am Freitag, den 08.08.2008, 14:59 +0200 schrieb Christian Franke:
>
> No, grub-pe2elf is build and installed even if is not necessary for the
> build process. This should be no problem.
>
Well it's the same as with that --enable-debug thingy ;)
In our Debian trunk SVN I already commited a change to remove
grub.d/10_windows because Debian/Ubuntu users just don't have a need for
this.
It would be better if Robert and me don't need to do such changes.
We could just remove grub-pe2elf, too.
But why should it be build for everybody if only Cygwin users have a use
for it?
Then clearly the whole build process needs a change so that grub-pe2elf
is only build on Cygwin.
I doubt GRUB 2 is/will be used that much on Cygwin as with native Linux.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: bug: cygwin support breaks cross compiles on cygwin
2008-08-08 13:37 ` Felix Zielcke
@ 2008-08-08 21:13 ` Christian Franke
2008-08-09 9:20 ` Felix Zielcke
0 siblings, 1 reply; 9+ messages in thread
From: Christian Franke @ 2008-08-08 21:13 UTC (permalink / raw)
To: The development of GRUB 2
Felix Zielcke wrote:
> Hello,
>
> Am Freitag, den 08.08.2008, 14:59 +0200 schrieb Christian Franke:
>
>> No, grub-pe2elf is build and installed even if is not necessary for the
>> build process. This should be no problem.
>>
>>
>
> Well it's the same as with that --enable-debug thingy ;)
>
> In our Debian trunk SVN I already commited a change to remove
> grub.d/10_windows because Debian/Ubuntu users just don't have a need for
> this.
> It would be better if Robert and me don't need to do such changes.
> We could just remove grub-pe2elf, too.
> But why should it be build for everybody if only Cygwin users have a use
> for it?
> Then clearly the whole build process needs a change so that grub-pe2elf
> is only build on Cygwin.
>
I agree. I posted a patch which handles both grub.d/10_windows and
grub-pe2elf.
Christian
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: bug: cygwin support breaks cross compiles on cygwin
2008-08-08 21:13 ` Christian Franke
@ 2008-08-09 9:20 ` Felix Zielcke
2008-08-09 13:08 ` Christian Franke
0 siblings, 1 reply; 9+ messages in thread
From: Felix Zielcke @ 2008-08-09 9:20 UTC (permalink / raw)
To: The development of GRUB 2
Hello,
Am Freitag, den 08.08.2008, 23:13 +0200 schrieb Christian Franke:
>
> I agree. I posted a patch which handles both grub.d/10_windows and
> grub-pe2elf.
>
Thanks I even saw that mail before this.
I even reverted now my rm -f 10_windows change to current Debian trunk,
but to commit I wait untill your patch is commited upstream ;)
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: bug: cygwin support breaks cross compiles on cygwin
2008-08-09 9:20 ` Felix Zielcke
@ 2008-08-09 13:08 ` Christian Franke
0 siblings, 0 replies; 9+ messages in thread
From: Christian Franke @ 2008-08-09 13:08 UTC (permalink / raw)
To: The development of GRUB 2
Felix Zielcke wrote:
> Am Freitag, den 08.08.2008, 23:13 +0200 schrieb Christian Franke:
>
>> I agree. I posted a patch which handles both grub.d/10_windows and
>> grub-pe2elf.
>>
>>
>
> Thanks I even saw that mail before this.
> I even reverted now my rm -f 10_windows change to current Debian trunk,
> but to commit I wait untill your patch is commited upstream ;)
>
>
>
>
Done.
The quick fix for the cross-compiler problem is also included. Does not
actually check the output format of the target compiler, but should work
for now.
Christian
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2008-08-09 13:09 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-08-08 9:03 bug: cygwin support breaks cross compiles on cygwin Patrick Georgi
2008-08-08 10:17 ` Bean
2008-08-08 10:36 ` Christian Franke
2008-08-08 11:09 ` Robert Millan
2008-08-08 12:59 ` Christian Franke
2008-08-08 13:37 ` Felix Zielcke
2008-08-08 21:13 ` Christian Franke
2008-08-09 9:20 ` Felix Zielcke
2008-08-09 13:08 ` Christian Franke
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.