64bits compilation
This commit is contained in:
parent
c60f7450eb
commit
181d97eb6b
7
Makefile
7
Makefile
@ -17,9 +17,10 @@
|
|||||||
|
|
||||||
CC=gcc
|
CC=gcc
|
||||||
LD=ld
|
LD=ld
|
||||||
CFLAGS = -Wall -nostdinc -ffreestanding -DKERNEL_SOS
|
CFLAGS = -Wall -nostdinc -ffreestanding -DKERNEL_SOS -m32 \
|
||||||
LIBGCC := $(shell $(CC) -print-libgcc-file-name) # To benefit from FP/64bits artihm.
|
-fno-asynchronous-unwind-tables
|
||||||
LDFLAGS = --warn-common -nostdlib
|
LIBGCC := $(shell $(CC) -print-libgcc-file-name -m32) # To benefit from FP/64bits artihm.
|
||||||
|
LDFLAGS = --warn-common -nostdlib -m elf_i386
|
||||||
OBJECTS = bootstrap/multiboot.o \
|
OBJECTS = bootstrap/multiboot.o \
|
||||||
hwcore/idt.o hwcore/gdt.o \
|
hwcore/idt.o hwcore/gdt.o \
|
||||||
hwcore/swintr.o hwcore/swintr_wrappers.o \
|
hwcore/swintr.o hwcore/swintr_wrappers.o \
|
||||||
|
@ -49,7 +49,7 @@ print_usage () {
|
|||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
grub_dirs_common="/usr/local/share/grub/i386-freebsd /usr/local/share/grub/i386-pc /usr/share/grub/i386-pc /usr/lib/grub/i386-pc /usr/local/grub /usr/share/grub/i386-redhat /usr/local/src/grub-0.5.94 $HOME/share/grub/i386-pc/"
|
grub_dirs_common="/usr/local/share/grub/i386-freebsd /usr/local/share/grub/i386-pc /usr/share/grub/i386-pc /usr/lib/grub/i386-pc /usr/local/grub /usr/share/grub/i386-redhat /usr/local/src/grub-0.5.94 $HOME/share/grub/i386-pc/ /usr/lib/grub/x86_64-unknown"
|
||||||
sbin_grub_path="/usr/local/sbin /usr/sbin /sbin $HOME/sbin"
|
sbin_grub_path="/usr/local/sbin /usr/sbin /sbin $HOME/sbin"
|
||||||
|
|
||||||
PATH=$PATH:/sbin:/usr/sbin:/usr/local/sbin
|
PATH=$PATH:/sbin:/usr/sbin:/usr/local/sbin
|
||||||
@ -66,7 +66,7 @@ IMG_FNAME=fd.img
|
|||||||
## Format disk image
|
## Format disk image
|
||||||
##
|
##
|
||||||
init_image () {
|
init_image () {
|
||||||
echo "Initialize disk image $IMG_FILE..."
|
echo "Initialize disk image $IMG_FNAME..."
|
||||||
if [ ! -f $IMG_FNAME ] ; then
|
if [ ! -f $IMG_FNAME ] ; then
|
||||||
dd if=/dev/zero of=$IMG_FNAME bs=18k count=80 1>/dev/null 2>&1
|
dd if=/dev/zero of=$IMG_FNAME bs=18k count=80 1>/dev/null 2>&1
|
||||||
fi
|
fi
|
||||||
|
@ -18,9 +18,9 @@
|
|||||||
CC=gcc
|
CC=gcc
|
||||||
AR=ar
|
AR=ar
|
||||||
OBJCOPY=objcopy
|
OBJCOPY=objcopy
|
||||||
CFLAGS = -Wall -nostdinc -ffreestanding -I. -I..
|
CFLAGS = -Wall -nostdinc -ffreestanding -I. -I.. -m32 -fno-asynchronous-unwind-tables
|
||||||
LIBGCC := $(shell $(CC) -print-libgcc-file-name) # To benefit from FP/64bits artihm.
|
LIBGCC := $(shell $(CC) -print-libgcc-file-name -m32) # To benefit from FP/64bits artihm.
|
||||||
LDFLAGS = -Wl,--warn-common -nostdlib -Wl,-Tldscript.lds
|
LDFLAGS = -Wl,--warn-common -nostdlib -Wl,-Tldscript.lds -m32 -fno-asynchronous-unwind-tables
|
||||||
|
|
||||||
# Main target
|
# Main target
|
||||||
all: userprogs.kimg
|
all: userprogs.kimg
|
||||||
@ -69,7 +69,7 @@ userprogs.kimg: $(PROGS)
|
|||||||
>> .userprogs.lds
|
>> .userprogs.lds
|
||||||
@echo "} /DISCARD/ : { *(.text) *(.data) *(.bss) } }" \
|
@echo "} /DISCARD/ : { *(.text) *(.data) *(.bss) } }" \
|
||||||
>> .userprogs.lds
|
>> .userprogs.lds
|
||||||
@$(LD) -r -o $@ -T.userprogs.lds
|
@$(LD) -r -o $@ -T.userprogs.lds -m elf_i386
|
||||||
|
|
||||||
# Create libraries from object files
|
# Create libraries from object files
|
||||||
%.a:
|
%.a:
|
||||||
|
Loading…
Reference in New Issue
Block a user