[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug #32676] Linker error in 'grub-core/kern/i386/pc/startup.S' on a x86
From: |
Andrey |
Subject: |
[bug #32676] Linker error in 'grub-core/kern/i386/pc/startup.S' on a x86_64 system |
Date: |
Tue, 08 Mar 2011 18:47:14 +0000 |
User-agent: |
Mozilla/5.0 (X11; U; FreeBSD amd64; en-US) AppleWebKit/534.3 (KHTML, like Gecko) Chrome/6.0.472.63 Safari/534.3 |
Follow-up Comment #3, bug #32676 (project grub):
Hi,
the same is over here (tried both: trunk and 1.99rc1)
system: FreeBSD 9-Current [amd64]
compiler: gcc version 4.2.1 20070719
gcc -Wall -W -I../include -I../include -DGRUB_MACHINE_PCBIOS=1
-DGRUB_MACHINE=I386_PC -Os -Wall -W -Wshadow -Wpointer-arith
-Wmissing-prototypes -Wundef -Wstrict-prototypes -g -falign-jumps=1
-falign-loops=1 -falign-functions=1 -mno-mmx -mno-sse -mno-sse2 -mno-3dnow
-m32 -fno-stack-protector -mno-stack-arg-probe -Werror -Os -I.. -S
-DSTANDALONE -o rs_decoder.S lib/reed_solomon.c -g0 -mregparm=3
gcc -DHAVE_CONFIG_H -I. -I.. -Wall -W -I../include -I../include
-DGRUB_MACHINE_PCBIOS=1 -DGRUB_MACHINE=I386_PC
-DGRUB_FILE="kern/i386/pc/startup.S" -I. -I. -I.. -I.. -I../include
-I../include -g -m32 -DASM_FILE=1 -MT
kern/i386/pc/kernel_exec-startup.o -MD -MP -MF
kern/i386/pc/.deps-core/kernel_exec-startup.Tpo -c -o
kern/i386/pc/kernel_exec-startup.o `test -f 'kern/i386/pc/startup.S' || echo
'./'`kern/i386/pc/startup.S
reed_solomon.c: Assembler messages:
reed_solomon.c:705: Warning: ignoring changed section attributes for .text
kern/i386/pc/startup.S:161: Error: attempt to move .org backwards
kern/i386/pc/startup.S:456: Error: attempt to move .org backwards
kern/i386/pc/startup.S:458: Error: attempt to move .org backwards
gmake[3]: *** [kern/i386/pc/kernel_exec-startup.o] Ошибка 1
gmake[3]: Leaving directory `/tmp/grub/grub-core'
gmake[2]: *** [all] Ошибка 2
gmake[2]: Leaving directory `/tmp/grub/grub-core'
gmake[1]: *** [all-recursive] Ошибка 1
gmake[1]: Leaving directory `/tmp/grub'
gmake: *** [all] Ошибка 2
to make it actually compile on my system I had to revert all changes on
startup.S starting from -r2859 (inclusive), i.e. I did it like this:
# bzr export /tmp/grub
# bzr diff -r2785 grub-core/kern/i386/pc/startup.S | ( cd /tmp/grub ; patch -u
-R ; )
PS:
btw, there was one more compilation issue I faced to (though I guess it is
rather "peculiarity" of compiler and thus didn't file a PR).
It looked like this:
gcc -DHAVE_CONFIG_H -I. -I.. -Wall -W -I../include -I../include
-DGRUB_MACHINE_PCBIOS=1 -DGRUB_MACHINE=I386_PC
-DGRUB_FILE="video/fb/video_fb.c" -I. -I. -I.. -I.. -I../include -I../include
-Os -Wall -W -Wshadow -Wpointer-arith -Wmissing-prototypes -Wundef
-Wstrict-prototypes -g -falign-jumps=1 -falign-loops=1 -falign-functions=1
-mno-mmx -mno-sse -mno-sse2 -mno-3dnow -m32 -fno-stack-protector
-mno-stack-arg-probe -Werror -mrtd -mregparm=3 -ffreestanding -MT
video/fb/video_fb_module-video_fb.o -MD -MP -MF
video/fb/.deps-core/video_fb_module-video_fb.Tpo -c -o
video/fb/video_fb_module-video_fb.o `test -f 'video/fb/video_fb.c' || echo
'./'`video/fb/video_fb.c
cc1: warnings being treated as errors
video/fb/video_fb.c: In function 'grub_video_fb_setup':
video/fb/video_fb.c:1451: warning: passing argument 4 of
'grub_video_fb_doublebuf_blit_init' discards qualifiers from pointer target
type
gmake[3]: *** [video/fb/video_fb_module-video_fb.o] Ошибка 1
gmake[3]: Leaving directory `/tmp/grub/grub-core'
gmake[2]: *** [all] Ошибка 2
gmake[2]: Leaving directory `/tmp/grub/grub-core'
gmake[1]: *** [all-recursive] Ошибка 1
gmake[1]: Leaving directory `/tmp/grub'
gmake: *** [all] Ошибка 2
I managed to combat the issue in the following way:
--- grub-core/video/fb/video_fb.c.orig 2011-03-08 20:23:25.000000000 +0200
+++ grub-core/video/fb/video_fb.c 2011-03-08 20:24:03.000000000 +0200
@@ -1448,10 +1448,11 @@
mode_info->mode_type |= (GRUB_VIDEO_MODE_TYPE_DOUBLE_BUFFERED
| GRUB_VIDEO_MODE_TYPE_UPDATING_SWAP);
+ void *pg0ptr = (void *) page0_ptr;
err = grub_video_fb_doublebuf_blit_init (&framebuffer.front_target,
&framebuffer.back_target,
*mode_info,
- (void *) page0_ptr);
+ pg0ptr);
if (!err)
{
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?32676>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/