All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: [2290] 2009-06-10  Pavel Roskin  <proski@gnu.org>
       [not found] <E1MESar-000663-Ax@cvs.savannah.gnu.org>
@ 2009-06-11 19:39 ` Christian Franke
  2009-06-11 19:45   ` Vladimir 'phcoder' Serbinenko
  0 siblings, 1 reply; 10+ messages in thread
From: Christian Franke @ 2009-06-11 19:39 UTC (permalink / raw)
  To: grub-devel

Pavel Roskin wrote:
> Revision: 2290
>           http://svn.sv.gnu.org/viewvc/?view=rev&root=grub&revision=2290
> Author:   proski
> Date:     2009-06-10 18:32:13 +0000 (Wed, 10 Jun 2009)
> Log Message:
> -----------
> 2009-06-10  Pavel Roskin  <proski@gnu.org>
>
> 	* configure.ac: Use -nostdlib when probing for the target.  It
> 	should not be required to have libc for the target.
> ...
>  # Set them to their new values for the tests below.
>  CC="$TARGET_CC"
> -CFLAGS="$TARGET_CFLAGS"
> +CFLAGS="$TARGET_CFLAGS -nostdlib"
>  CPPFLAGS="$TARGET_CPPFLAGS"
>  LDFLAGS="$TARGET_LDFLAGS"
>  
>
>   

This change breaks build at least on Cygwin, ./configure fails with:

checking whether target compiler is working... no
configure: error: cannot compile for the target

The link test in grub_PROG_TARGET_CC fails due to missing '__main' 
symbol from libgcc. According to gcc 4.3.2 man page, '-nostdlib' usually 
requires '-lgcc'.

-- 
Regards,
Christian Franke




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

* Re: [2290] 2009-06-10 Pavel Roskin <proski@gnu.org>
  2009-06-11 19:39 ` [2290] 2009-06-10 Pavel Roskin <proski@gnu.org> Christian Franke
@ 2009-06-11 19:45   ` Vladimir 'phcoder' Serbinenko
  2009-06-11 19:57     ` Christian Franke
  0 siblings, 1 reply; 10+ messages in thread
From: Vladimir 'phcoder' Serbinenko @ 2009-06-11 19:45 UTC (permalink / raw)
  To: The development of GRUB 2

On Thu, Jun 11, 2009 at 9:39 PM, Christian
Franke<Christian.Franke@t-online.de> wrote:
> Pavel Roskin wrote:
>>
>> Revision: 2290
>>          http://svn.sv.gnu.org/viewvc/?view=rev&root=grub&revision=2290
>> Author:   proski
>> Date:     2009-06-10 18:32:13 +0000 (Wed, 10 Jun 2009)
>> Log Message:
>> -----------
>> 2009-06-10  Pavel Roskin  <proski@gnu.org>
>>
>>        * configure.ac: Use -nostdlib when probing for the target.  It
>>        should not be required to have libc for the target.
>> ...
>>  # Set them to their new values for the tests below.
>>  CC="$TARGET_CC"
>> -CFLAGS="$TARGET_CFLAGS"
>> +CFLAGS="$TARGET_CFLAGS -nostdlib"
>>  CPPFLAGS="$TARGET_CPPFLAGS"
>>  LDFLAGS="$TARGET_LDFLAGS"
>>
>>
>
> This change breaks build at least on Cygwin, ./configure fails with:
>
> checking whether target compiler is working... no
> configure: error: cannot compile for the target
>
> The link test in grub_PROG_TARGET_CC fails due to missing '__main' symbol
> from libgcc. According to gcc 4.3.2 man page, '-nostdlib' usually requires
> '-lgcc'.
Try compiling but not linking using -c option. If it works you can
commit it since we never do complete linking for target
>
> --
> Regards,
> Christian Franke
>
>
>
> _______________________________________________
> Grub-devel mailing list
> Grub-devel@gnu.org
> http://lists.gnu.org/mailman/listinfo/grub-devel
>



-- 
Regards
Vladimir 'phcoder' Serbinenko



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

* Re: [2290] 2009-06-10 Pavel Roskin <proski@gnu.org>
  2009-06-11 19:45   ` Vladimir 'phcoder' Serbinenko
@ 2009-06-11 19:57     ` Christian Franke
  2009-06-11 20:05       ` Vladimir 'phcoder' Serbinenko
  2009-06-11 20:09       ` Pavel Roskin
  0 siblings, 2 replies; 10+ messages in thread
From: Christian Franke @ 2009-06-11 19:57 UTC (permalink / raw)
  To: The development of GRUB 2

Vladimir 'phcoder' Serbinenko wrote:
>>
>> The link test in grub_PROG_TARGET_CC fails due to missing '__main' symbol
>> from libgcc. According to gcc 4.3.2 man page, '-nostdlib' usually requires
>> '-lgcc'.
>>     
> Try compiling but not linking using -c option. If it works you can
> commit it since we never do complete linking for target
>   

Complete linking is not used during build but during configure. The 
following tests rely on it:

grub_PROG_LD_BUILD_ID_NONE
grub_CHECK_BSS_START_SYMBOL
grub_CHECK_END_SYMBOL

I would suggest to undo commit 2290 for now.

-- 
Regards,
Christian Franke




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

* Re: [2290] 2009-06-10 Pavel Roskin <proski@gnu.org>
  2009-06-11 19:57     ` Christian Franke
@ 2009-06-11 20:05       ` Vladimir 'phcoder' Serbinenko
  2009-06-11 20:20         ` Pavel Roskin
  2009-06-11 20:09       ` Pavel Roskin
  1 sibling, 1 reply; 10+ messages in thread
From: Vladimir 'phcoder' Serbinenko @ 2009-06-11 20:05 UTC (permalink / raw)
  To: The development of GRUB 2

On Thu, Jun 11, 2009 at 9:57 PM, Christian
Franke<Christian.Franke@t-online.de> wrote:
> Vladimir 'phcoder' Serbinenko wrote:
>>>
>>> The link test in grub_PROG_TARGET_CC fails due to missing '__main' symbol
>>> from libgcc. According to gcc 4.3.2 man page, '-nostdlib' usually
>>> requires
>>> '-lgcc'.
>>>
>>
>> Try compiling but not linking using -c option. If it works you can
>> commit it since we never do complete linking for target
>>
>
> Complete linking is not used during build but during configure. The
> following tests rely on it:
>
> grub_PROG_LD_BUILD_ID_NONE
> grub_CHECK_BSS_START_SYMBOL
> grub_CHECK_END_SYMBOL

>
> I would suggest to undo commit 2290 for now.
I think we should commit Pavel's patch on using same ld everywhere.
>
> --
> Regards,
> Christian Franke
>
>
>
> _______________________________________________
> Grub-devel mailing list
> Grub-devel@gnu.org
> http://lists.gnu.org/mailman/listinfo/grub-devel
>



-- 
Regards
Vladimir 'phcoder' Serbinenko



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

* Re: [2290] 2009-06-10 Pavel Roskin <proski@gnu.org>
  2009-06-11 19:57     ` Christian Franke
  2009-06-11 20:05       ` Vladimir 'phcoder' Serbinenko
@ 2009-06-11 20:09       ` Pavel Roskin
  1 sibling, 0 replies; 10+ messages in thread
From: Pavel Roskin @ 2009-06-11 20:09 UTC (permalink / raw)
  To: The development of GRUB 2

On Thu, 2009-06-11 at 21:57 +0200, Christian Franke wrote:
> Complete linking is not used during build but during configure. The 
> following tests rely on it:
> 
> grub_PROG_LD_BUILD_ID_NONE
> grub_CHECK_BSS_START_SYMBOL
> grub_CHECK_END_SYMBOL
> 
> I would suggest to undo commit 2290 for now.

OK, I'll undo it unless I find an easy fix today.

-- 
Regards,
Pavel Roskin



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

* Re: [2290] 2009-06-10 Pavel Roskin <proski@gnu.org>
  2009-06-11 20:05       ` Vladimir 'phcoder' Serbinenko
@ 2009-06-11 20:20         ` Pavel Roskin
  2009-06-11 20:27           ` Vladimir 'phcoder' Serbinenko
  0 siblings, 1 reply; 10+ messages in thread
From: Pavel Roskin @ 2009-06-11 20:20 UTC (permalink / raw)
  To: The development of GRUB 2

On Thu, 2009-06-11 at 22:05 +0200, Vladimir 'phcoder' Serbinenko wrote:

> > I would suggest to undo commit 2290 for now.
> I think we should commit Pavel's patch on using same ld everywhere.

You mean the ld script?  I'll try to resurrect it, but now I'll need to
have a special case for the Apple build system.  That should take care
of the BSS clearing.  As for grub_PROG_LD_BUILD_ID_NONE, perhaps we need
to look for another approach.

-- 
Regards,
Pavel Roskin



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

* Re: [2290] 2009-06-10 Pavel Roskin <proski@gnu.org>
  2009-06-11 20:20         ` Pavel Roskin
@ 2009-06-11 20:27           ` Vladimir 'phcoder' Serbinenko
  2009-06-11 20:34             ` Pavel Roskin
  0 siblings, 1 reply; 10+ messages in thread
From: Vladimir 'phcoder' Serbinenko @ 2009-06-11 20:27 UTC (permalink / raw)
  To: The development of GRUB 2

On Thu, Jun 11, 2009 at 10:20 PM, Pavel Roskin<proski@gnu.org> wrote:
> On Thu, 2009-06-11 at 22:05 +0200, Vladimir 'phcoder' Serbinenko wrote:
>
>> > I would suggest to undo commit 2290 for now.
>> I think we should commit Pavel's patch on using same ld everywhere.
>
> You mean the ld script?  I'll try to resurrect it, but now I'll need to
> have a special case for the Apple build system.
Just let the Apple's build system as it is. Unfortunately it doesn't
support ld scripts
>  That should take care
> of the BSS clearing.  As for grub_PROG_LD_BUILD_ID_NONE, perhaps we need
> to look for another approach.
Possibilities
1) to test both with and without -nostdlib and check that at least one
works. I don't like this one
2) rename main to main,start,_start,__start,_main or __main. Just find
one that works by bruteforce in script
>
> --
> Regards,
> Pavel Roskin
>
>
> _______________________________________________
> Grub-devel mailing list
> Grub-devel@gnu.org
> http://lists.gnu.org/mailman/listinfo/grub-devel
>



-- 
Regards
Vladimir 'phcoder' Serbinenko



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

* Re: [2290] 2009-06-10 Pavel Roskin <proski@gnu.org>
  2009-06-11 20:27           ` Vladimir 'phcoder' Serbinenko
@ 2009-06-11 20:34             ` Pavel Roskin
  2009-06-11 20:52               ` Vladimir 'phcoder' Serbinenko
  2009-06-11 21:20               ` Christian Franke
  0 siblings, 2 replies; 10+ messages in thread
From: Pavel Roskin @ 2009-06-11 20:34 UTC (permalink / raw)
  To: The development of GRUB 2

On Thu, 2009-06-11 at 22:27 +0200, Vladimir 'phcoder' Serbinenko wrote:

> Possibilities
> 1) to test both with and without -nostdlib and check that at least one
> works. I don't like this one

Me neither.

> 2) rename main to main,start,_start,__start,_main or __main. Just find
> one that works by bruteforce in script

We can use -Wl,--defsym,___main=0x8100 as it's done elsewhere in
configure.ac.  Let me just check it doesn't break anything.

-- 
Regards,
Pavel Roskin



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

* Re: [2290] 2009-06-10 Pavel Roskin <proski@gnu.org>
  2009-06-11 20:34             ` Pavel Roskin
@ 2009-06-11 20:52               ` Vladimir 'phcoder' Serbinenko
  2009-06-11 21:20               ` Christian Franke
  1 sibling, 0 replies; 10+ messages in thread
From: Vladimir 'phcoder' Serbinenko @ 2009-06-11 20:52 UTC (permalink / raw)
  To: The development of GRUB 2

On Thu, Jun 11, 2009 at 10:34 PM, Pavel Roskin<proski@gnu.org> wrote:
> On Thu, 2009-06-11 at 22:27 +0200, Vladimir 'phcoder' Serbinenko wrote:
>> 2) rename main to main,start,_start,__start,_main or __main. Just find
>> one that works by bruteforce in script
>
> We can use -Wl,--defsym,___main=0x8100 as it's done elsewhere in
> configure.ac.  Let me just check it doesn't break anything.
I'm ok with this one. I have no access to Apple's toolchain right now
but it was reported to me it has a similar problem. There
-Wl,--defsym,start=0x8100 -Wl,--defsym,_start=0x8100 should help. I'll
tell tomorrow exactly
>
> --
> Regards,
> Pavel Roskin
>
>
> _______________________________________________
> Grub-devel mailing list
> Grub-devel@gnu.org
> http://lists.gnu.org/mailman/listinfo/grub-devel
>



-- 
Regards
Vladimir 'phcoder' Serbinenko



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

* Re: [2290] 2009-06-10 Pavel Roskin <proski@gnu.org>
  2009-06-11 20:34             ` Pavel Roskin
  2009-06-11 20:52               ` Vladimir 'phcoder' Serbinenko
@ 2009-06-11 21:20               ` Christian Franke
  1 sibling, 0 replies; 10+ messages in thread
From: Christian Franke @ 2009-06-11 21:20 UTC (permalink / raw)
  To: The development of GRUB 2

Pavel Roskin wrote:
> We can use -Wl,--defsym,___main=0x8100 as it's done elsewhere in
> configure.ac.  Let me just check it doesn't break anything.
>
>   
This (r2310) works on Cygwin, thanks.

-- 
Regards,
Christian Franke




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

end of thread, other threads:[~2009-06-11 21:20 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <E1MESar-000663-Ax@cvs.savannah.gnu.org>
2009-06-11 19:39 ` [2290] 2009-06-10 Pavel Roskin <proski@gnu.org> Christian Franke
2009-06-11 19:45   ` Vladimir 'phcoder' Serbinenko
2009-06-11 19:57     ` Christian Franke
2009-06-11 20:05       ` Vladimir 'phcoder' Serbinenko
2009-06-11 20:20         ` Pavel Roskin
2009-06-11 20:27           ` Vladimir 'phcoder' Serbinenko
2009-06-11 20:34             ` Pavel Roskin
2009-06-11 20:52               ` Vladimir 'phcoder' Serbinenko
2009-06-11 21:20               ` Christian Franke
2009-06-11 20:09       ` Pavel Roskin

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.