bugGNU GRUB - Bugs: bug #14874, gcc 4.02 optimization fails...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #14874: gcc 4.02 optimization fails buildins.c when filesystem was added to stage1_5_map

Submitted by:  None
Submitted on:  Thu 27 Oct 2005 09:07:36 AM UTC  
 
Category: CompilationSeverity: Major
Priority: 5 - NormalItem Group: Software Error
Status: NonePrivacy: Public
Assigned to: NoneOriginator Name: Gerhard Heift
Originator Email: -unavailable-Open/Closed: Closed
Release: 0.97Release: None
Reproducibility: Every TimePlanned Release: None

Sat 15 Dec 2007 09:01:38 PM UTC, comment #2:

We've moved to GRUB 2 as a development platform. Please can you check if this bug still applies there, and if it does, reopen it?

Thanks

Robert Millan <robertmh>
Project Administrator
Tue 21 Mar 2006 10:36:34 AM UTC, comment #1:

Hi,

the problem is likely to be in the grub itself, I have the same symptoms for different filesystems, not only reiser4. I have debug grub a bit and found that the following patch solves the problem for me.

Please check the patch and consider to apply.

Thanks.

Vitaly Fertman <vitaly>
Thu 27 Oct 2005 09:07:36 AM UTC, original submission:

I build an LFS and added Reiser4 Support to my kernel.
I patched grub with the reiser patch an build it with the GCC 4.0.2.

# ./configure --prefix=/usr && make && make install

When i wanted to install the new grub into my MBR by:

# grub
grub> root (hd0,1)
Filesystem type is ext2fs, partition type 0x83

grub> setup (hd0)
Checking if "/boot/grub/stage1" exists... yes
Checking if "/boot/grub/stage2" exists... yes
Checking if "/boot/grub/e2fs_stage1_5" exists... yes
Running "embed /boot/grub/e2fs_stage1_5 (hd0)"... 23 sectors are embedded.
succeeded
Running "install /boot/grub/stage1 (hd0) (hd0)1+23 p (hd0,1)/boot/grub/stage /boot/grub/menu.lst"... failed

Error 15: File not found.

grub>

I checked, where the install was build and found it in stage2/buildins.c, line 4020. So the part "/boot/grub/stage comes from "config_filename".
I added a few grub_printf("Debug: %s\n", config_filename); and noticed after rebuilding grub, that the variable changes somehow in line 4016, where the command sprint_device (installed_drive, installed_partition); is called.

Now i used a clean source-package an rebuild grub and everything worked, when I installed grub in the MBR. The only modification the reiser4-path did in stage2/buildins.c, was adding a filesystem to the "stage1_5_map" variable.
So i added a filesystem "foobar" to the map and rebuild grub. When I tried to install grub in the MBR the error happened again.

The next step was trying an older compiler, I used Knoppix 4.0 with gcc 3.3.4 and it works.
After this I tried to modified the CFLAGS. With -O0 or -O1 the installation worked, with -Os or -O2 not.

Anonymous

 

Attached Files
file #1476:  grub-0.97-strncat.patch added by vitaly (801B - text/x-patch)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by robertmh (Posted a comment)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 3 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sat 15 Dec 2007 09:01:37 PM UTCrobertmhOpen/ClosedOpen=>Closed
    Tue 21 Mar 2006 10:36:34 AM UTCvitalyAttached File-=>Added grub-0.97-strncat.patch, #3510
    Thu 27 Oct 2005 09:07:36 AM UTCNoneCarbon-Copy-=>Added mailing-list --AT-- gheift --PUNKT-- de

    Back to the top


    Powered by Savane 3.1-cleanup1