2007-11-10 Vesa Jaaskelainen <chaac@nic.fi>

* conf/i386-pc.rmk (boot_img_LDFLAGS): Use COMMON_LDFLAGS for target
        flags.
        (pxeboot_img_LDFLAGS): Likewise.
        (diskboot_img_LDFLAGS): Likewise.
        (kernel_img_LDFLAGS): Likewise.
This commit is contained in:
chaac 2007-11-10 18:30:40 +00:00
parent 4917851111
commit 6433b448ac
4 changed files with 87 additions and 9 deletions

View file

@ -1,3 +1,11 @@
2007-11-10 Vesa Jaaskelainen <chaac@nic.fi>
* conf/i386-pc.rmk (boot_img_LDFLAGS): Use COMMON_LDFLAGS for target
flags.
(pxeboot_img_LDFLAGS): Likewise.
(diskboot_img_LDFLAGS): Likewise.
(kernel_img_LDFLAGS): Likewise.
2007-11-06 Robert Millan <rmh@aybabtu.com> 2007-11-06 Robert Millan <rmh@aybabtu.com>
* term/i386/pc/serial.c (serial_hw_put): Switch order of arguments * term/i386/pc/serial.c (serial_hw_put): Switch order of arguments

View file

@ -23,7 +23,7 @@ boot_img-boot_i386_pc_boot.o: boot/i386/pc/boot.S
-include boot_img-boot_i386_pc_boot.d -include boot_img-boot_i386_pc_boot.d
boot_img_ASFLAGS = $(COMMON_ASFLAGS) boot_img_ASFLAGS = $(COMMON_ASFLAGS)
boot_img_LDFLAGS = -nostdlib -Wl,-N,-Ttext,7C00 boot_img_LDFLAGS = $(COMMON_LDFLAGS) -Wl,-N,-Ttext,7C00
# For pxeboot.img # For pxeboot.img
pxeboot_img_SOURCES = boot/i386/pc/pxeboot.S pxeboot_img_SOURCES = boot/i386/pc/pxeboot.S
@ -41,7 +41,7 @@ pxeboot_img-boot_i386_pc_pxeboot.o: boot/i386/pc/pxeboot.S
-include pxeboot_img-boot_i386_pc_pxeboot.d -include pxeboot_img-boot_i386_pc_pxeboot.d
pxeboot_img_ASFLAGS = $(COMMON_ASFLAGS) pxeboot_img_ASFLAGS = $(COMMON_ASFLAGS)
pxeboot_img_LDFLAGS = -nostdlib -Wl,-N,-Ttext,7C00 pxeboot_img_LDFLAGS = $(COMMON_LDFLAGS) -Wl,-N,-Ttext,7C00
# For diskboot.img. # For diskboot.img.
diskboot_img_SOURCES = boot/i386/pc/diskboot.S diskboot_img_SOURCES = boot/i386/pc/diskboot.S
@ -59,7 +59,7 @@ diskboot_img-boot_i386_pc_diskboot.o: boot/i386/pc/diskboot.S
-include diskboot_img-boot_i386_pc_diskboot.d -include diskboot_img-boot_i386_pc_diskboot.d
diskboot_img_ASFLAGS = $(COMMON_ASFLAGS) diskboot_img_ASFLAGS = $(COMMON_ASFLAGS)
diskboot_img_LDFLAGS = -nostdlib -Wl,-N,-Ttext,8000 diskboot_img_LDFLAGS = $(COMMON_LDFLAGS) -Wl,-N,-Ttext,8000
# For kernel.img. # For kernel.img.
kernel_img_SOURCES = kern/i386/pc/startup.S kern/main.c kern/device.c \ kernel_img_SOURCES = kern/i386/pc/startup.S kern/main.c kern/device.c \
@ -165,7 +165,7 @@ kernel_img_HEADERS = arg.h boot.h cache.h device.h disk.h dl.h elf.h elfload.h \
machine/memory.h machine/loader.h machine/vga.h machine/vbe.h machine/memory.h machine/loader.h machine/vga.h machine/vbe.h
kernel_img_CFLAGS = $(COMMON_CFLAGS) kernel_img_CFLAGS = $(COMMON_CFLAGS)
kernel_img_ASFLAGS = $(COMMON_ASFLAGS) kernel_img_ASFLAGS = $(COMMON_ASFLAGS)
kernel_img_LDFLAGS = -nostdlib -Wl,-N,-Ttext,8200 $(COMMON_CFLAGS) kernel_img_LDFLAGS = $(COMMON_LDFLAGS) -Wl,-N,-Ttext,8200 $(COMMON_CFLAGS)
MOSTLYCLEANFILES += symlist.c kernel_syms.lst MOSTLYCLEANFILES += symlist.c kernel_syms.lst
DEFSYMFILES += kernel_syms.lst DEFSYMFILES += kernel_syms.lst

View file

@ -10,17 +10,17 @@ pkgdata_IMAGES = boot.img diskboot.img kernel.img pxeboot.img
# For boot.img. # For boot.img.
boot_img_SOURCES = boot/i386/pc/boot.S boot_img_SOURCES = boot/i386/pc/boot.S
boot_img_ASFLAGS = $(COMMON_ASFLAGS) boot_img_ASFLAGS = $(COMMON_ASFLAGS)
boot_img_LDFLAGS = -nostdlib -Wl,-N,-Ttext,7C00 boot_img_LDFLAGS = $(COMMON_LDFLAGS) -Wl,-N,-Ttext,7C00
# For pxeboot.img # For pxeboot.img
pxeboot_img_SOURCES = boot/i386/pc/pxeboot.S pxeboot_img_SOURCES = boot/i386/pc/pxeboot.S
pxeboot_img_ASFLAGS = $(COMMON_ASFLAGS) pxeboot_img_ASFLAGS = $(COMMON_ASFLAGS)
pxeboot_img_LDFLAGS = -nostdlib -Wl,-N,-Ttext,7C00 pxeboot_img_LDFLAGS = $(COMMON_LDFLAGS) -Wl,-N,-Ttext,7C00
# For diskboot.img. # For diskboot.img.
diskboot_img_SOURCES = boot/i386/pc/diskboot.S diskboot_img_SOURCES = boot/i386/pc/diskboot.S
diskboot_img_ASFLAGS = $(COMMON_ASFLAGS) diskboot_img_ASFLAGS = $(COMMON_ASFLAGS)
diskboot_img_LDFLAGS = -nostdlib -Wl,-N,-Ttext,8000 diskboot_img_LDFLAGS = $(COMMON_LDFLAGS) -Wl,-N,-Ttext,8000
# For kernel.img. # For kernel.img.
kernel_img_SOURCES = kern/i386/pc/startup.S kern/main.c kern/device.c \ kernel_img_SOURCES = kern/i386/pc/startup.S kern/main.c kern/device.c \
@ -37,7 +37,7 @@ kernel_img_HEADERS = arg.h boot.h cache.h device.h disk.h dl.h elf.h elfload.h \
machine/memory.h machine/loader.h machine/vga.h machine/vbe.h machine/memory.h machine/loader.h machine/vga.h machine/vbe.h
kernel_img_CFLAGS = $(COMMON_CFLAGS) kernel_img_CFLAGS = $(COMMON_CFLAGS)
kernel_img_ASFLAGS = $(COMMON_ASFLAGS) kernel_img_ASFLAGS = $(COMMON_ASFLAGS)
kernel_img_LDFLAGS = -nostdlib -Wl,-N,-Ttext,8200 $(COMMON_CFLAGS) kernel_img_LDFLAGS = $(COMMON_LDFLAGS) -Wl,-N,-Ttext,8200 $(COMMON_CFLAGS)
MOSTLYCLEANFILES += symlist.c kernel_syms.lst MOSTLYCLEANFILES += symlist.c kernel_syms.lst
DEFSYMFILES += kernel_syms.lst DEFSYMFILES += kernel_syms.lst

72
configure vendored
View file

@ -6676,7 +6676,77 @@ CPPFLAGS="$TARGET_CPPFLAGS"
LDFLAGS="$TARGET_LDFLAGS" LDFLAGS="$TARGET_LDFLAGS"
# Defined in aclocal.m4. # Defined in aclocal.m4.
#grub_PROG_OBJCOPY_ABSOLUTE { echo "$as_me:$LINENO: checking whether ${OBJCOPY} works for absolute addresses" >&5
echo $ECHO_N "checking whether ${OBJCOPY} works for absolute addresses... $ECHO_C" >&6; }
if test "${grub_cv_prog_objcopy_absolute+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat > conftest.c <<\EOF
void
cmain (void)
{
*((int *) 0x1000) = 2;
}
EOF
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && test -s conftest.o; then :
else
{ { echo "$as_me:$LINENO: error: ${CC-cc} cannot compile C source code" >&5
echo "$as_me: error: ${CC-cc} cannot compile C source code" >&2;}
{ (exit 1); exit 1; }; }
fi
grub_cv_prog_objcopy_absolute=yes
for link_addr in 2000 8000 7C00; do
if { ac_try='${CC-cc} ${CFLAGS} -nostdlib -Wl,-N -Wl,-Ttext -Wl,$link_addr conftest.o -o conftest.exec'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then :
else
{ { echo "$as_me:$LINENO: error: ${CC-cc} cannot link at address $link_addr" >&5
echo "$as_me: error: ${CC-cc} cannot link at address $link_addr" >&2;}
{ (exit 1); exit 1; }; }
fi
if { ac_try='${OBJCOPY-objcopy} -O binary conftest.exec conftest'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then :
else
{ { echo "$as_me:$LINENO: error: ${OBJCOPY-objcopy} cannot create binary files" >&5
echo "$as_me: error: ${OBJCOPY-objcopy} cannot create binary files" >&2;}
{ (exit 1); exit 1; }; }
fi
if test ! -f conftest.old || { ac_try='cmp -s conftest.old conftest'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
mv -f conftest conftest.old
else
grub_cv_prog_objcopy_absolute=no
break
fi
done
rm -f conftest*
fi
{ echo "$as_me:$LINENO: result: $grub_cv_prog_objcopy_absolute" >&5
echo "${ECHO_T}$grub_cv_prog_objcopy_absolute" >&6; }
if test "x$grub_cv_prog_objcopy_absolute" = xno; then
{ { echo "$as_me:$LINENO: error: GRUB requires a working absolute objcopy; upgrade your binutils" >&5
echo "$as_me: error: GRUB requires a working absolute objcopy; upgrade your binutils" >&2;}
{ (exit 1); exit 1; }; }
fi
{ echo "$as_me:$LINENO: checking if C symbols get an underscore after compilation" >&5 { echo "$as_me:$LINENO: checking if C symbols get an underscore after compilation" >&5
echo $ECHO_N "checking if C symbols get an underscore after compilation... $ECHO_C" >&6; } echo $ECHO_N "checking if C symbols get an underscore after compilation... $ECHO_C" >&6; }