Share common compilation flags
This commit is contained in:
parent
c395ad834e
commit
5c2ee77128
12 changed files with 16 additions and 34 deletions
|
@ -84,8 +84,8 @@ LDFLAGS = @LDFLAGS@ $(LIBS)
|
|||
CPPFLAGS = @CPPFLAGS@ -I$(builddir) -I$(builddir)/include -I$(srcdir)/gnulib -I$(srcdir)/include -Wall -W \
|
||||
-DGRUB_LIBDIR=\"$(pkglibdir)\" -DLOCALEDIR=\"$(localedir)\"
|
||||
TARGET_CC = @TARGET_CC@
|
||||
TARGET_CFLAGS = @TARGET_CFLAGS@
|
||||
TARGET_ASFLAGS = @TARGET_ASFLAGS@
|
||||
TARGET_CFLAGS = -ffreestanding @TARGET_CFLAGS@
|
||||
TARGET_ASFLAGS = -nostdinc -fno-builtin @TARGET_ASFLAGS@
|
||||
TARGET_MODULE_FORMAT = @TARGET_MODULE_FORMAT@
|
||||
TARGET_APPLE_CC = @TARGET_APPLE_CC@
|
||||
OBJCONV = @OBJCONV@
|
||||
|
@ -93,9 +93,9 @@ TARGET_CPPFLAGS = @TARGET_CPPFLAGS@ -I$(srcdir)/include -I$(builddir) -I$(buildd
|
|||
ifneq ($(platform), emu)
|
||||
TARGET_CPPFLAGS += -nostdinc -isystem $(shell $(TARGET_CC) -print-file-name=include)
|
||||
endif
|
||||
TARGET_LDFLAGS = @TARGET_LDFLAGS@
|
||||
TARGET_LDFLAGS = -nostdlib @TARGET_LDFLAGS@
|
||||
TARGET_IMG_LDSCRIPT = @TARGET_IMG_LDSCRIPT@
|
||||
TARGET_IMG_LDFLAGS = @TARGET_IMG_LDFLAGS@
|
||||
TARGET_IMG_LDFLAGS = -nostdlib @TARGET_IMG_LDFLAGS@
|
||||
TARGET_IMG_CFLAGS = @TARGET_IMG_CFLAGS@
|
||||
TARGET_OBJ2ELF = @TARGET_OBJ2ELF@
|
||||
EXEEXT = @EXEEXT@
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
# -*- makefile -*-
|
||||
|
||||
COMMON_LDFLAGS += -nostdlib
|
||||
COMMON_CFLAGS += -nostdinc -isystem $(shell $(TARGET_CC) -print-file-name=include) -fno-builtin
|
||||
|
||||
util/grub-emu.c_DEPENDENCIES = grub_emu_init.h
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
# -*- makefile -*-
|
||||
|
||||
COMMON_ASFLAGS = -nostdinc -fno-builtin -m32
|
||||
COMMON_CFLAGS = -fno-builtin -mrtd -mregparm=3 -m32
|
||||
COMMON_LDFLAGS = -m32 -nostdlib
|
||||
COMMON_CFLAGS = -mrtd -mregparm=3
|
||||
|
||||
# Images.
|
||||
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
# -*- makefile -*-
|
||||
|
||||
COMMON_ASFLAGS = -nostdinc -fno-builtin -m32
|
||||
COMMON_CFLAGS = -fno-builtin -m32
|
||||
COMMON_LDFLAGS = -melf_i386 -nostdlib
|
||||
COMMON_LDFLAGS = -melf_i386
|
||||
|
||||
include $(srcdir)/conf/x86-efi.mk
|
|
@ -1,8 +1,6 @@
|
|||
# -*- makefile -*-
|
||||
|
||||
COMMON_ASFLAGS = -m32 -nostdinc -fno-builtin
|
||||
COMMON_CFLAGS = -ffreestanding -mrtd -mregparm=3
|
||||
COMMON_LDFLAGS = -nostdlib
|
||||
COMMON_CFLAGS = -mrtd -mregparm=3
|
||||
|
||||
# Images.
|
||||
pkglib_PROGRAMS = kernel.img
|
||||
|
|
|
@ -2,9 +2,7 @@
|
|||
|
||||
GRUB_KERNEL_MACHINE_LINK_ADDR = 0x8200
|
||||
|
||||
COMMON_ASFLAGS = -nostdinc -fno-builtin -m32
|
||||
COMMON_CFLAGS = -fno-builtin -mrtd -mregparm=3 -m32
|
||||
COMMON_LDFLAGS = -m32 -nostdlib
|
||||
COMMON_CFLAGS = -mrtd -mregparm=3
|
||||
|
||||
# Images.
|
||||
pkglib_IMAGES = boot.img cdboot.img diskboot.img kernel.img lnxboot.img \
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
# -*- makefile -*-
|
||||
|
||||
COMMON_ASFLAGS = -nostdinc -fno-builtin -m32
|
||||
COMMON_CFLAGS = -fno-builtin -mrtd -mregparm=3 -m32
|
||||
COMMON_LDFLAGS = -m32 -nostdlib
|
||||
COMMON_CFLAGS = -mrtd -mregparm=3
|
||||
|
||||
# Images.
|
||||
|
||||
|
|
|
@ -1,9 +1,7 @@
|
|||
|
||||
# -*- makefile -*-
|
||||
|
||||
COMMON_ASFLAGS += -nostdinc
|
||||
COMMON_CFLAGS += -ffreestanding -mexplicit-relocs -mflush-func=grub_cpu_flush_cache
|
||||
COMMON_LDFLAGS += -nostdlib
|
||||
COMMON_CFLAGS += -mexplicit-relocs -mflush-func=grub_cpu_flush_cache
|
||||
|
||||
# Images.
|
||||
kernel_img_HEADERS += cpu/libgcc.h cpu/cache.h
|
||||
|
|
|
@ -1,10 +1,6 @@
|
|||
|
||||
# -*- makefile -*-
|
||||
|
||||
COMMON_ASFLAGS = -nostdinc
|
||||
COMMON_CFLAGS = -ffreestanding
|
||||
COMMON_LDFLAGS += -nostdlib
|
||||
|
||||
# Images.
|
||||
|
||||
kernel_img_HEADERS += cpu/libgcc.h ieee1275/ieee1275.h
|
||||
|
|
|
@ -1,9 +1,8 @@
|
|||
|
||||
# -*- makefile -*-
|
||||
|
||||
COMMON_ASFLAGS = -nostdinc -m64
|
||||
COMMON_CFLAGS = -ffreestanding -m64 -mno-app-regs
|
||||
COMMON_LDFLAGS = -melf64_sparc -nostdlib -mno-relax
|
||||
COMMON_CFLAGS = -mno-app-regs
|
||||
COMMON_LDFLAGS = -melf64_sparc -mno-relax
|
||||
|
||||
# Images.
|
||||
pkglib_IMAGES = boot.img diskboot.img kernel.img
|
||||
|
@ -37,7 +36,7 @@ kernel_img_SOURCES = kern/sparc64/ieee1275/crt0.S kern/ieee1275/cmain.c \
|
|||
symlist.c kern/$(target_cpu)/cache.S
|
||||
kernel_img_CFLAGS = $(COMMON_CFLAGS)
|
||||
kernel_img_ASFLAGS = $(COMMON_ASFLAGS)
|
||||
kernel_img_LDFLAGS = -nostdlib -Wl,-N,-Ttext,0x200000,-Bstatic,-melf64_sparc -static-libgcc -lgcc
|
||||
kernel_img_LDFLAGS = -Wl,-N,-Ttext,0x200000,-Bstatic,-melf64_sparc -static-libgcc -lgcc
|
||||
kernel_img_FORMAT = binary
|
||||
|
||||
# Utilities.
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
# -*- makefile -*-
|
||||
|
||||
COMMON_ASFLAGS = -nostdinc -fno-builtin -m64
|
||||
COMMON_CFLAGS = -fno-builtin -m64
|
||||
COMMON_LDFLAGS = -melf_x86_64 -nostdlib
|
||||
COMMON_LDFLAGS = -melf_x86_64
|
||||
|
||||
include $(srcdir)/conf/x86-efi.mk
|
||||
|
|
|
@ -353,6 +353,7 @@ AC_MSG_RESULT([$TARGET_OBJ2ELF])
|
|||
if test "x$target_m32" = x1; then
|
||||
# Force 32-bit mode.
|
||||
TARGET_CFLAGS="$TARGET_CFLAGS -m32"
|
||||
TARGET_ASFLAGS="$TARGET_CFLAGS -m32"
|
||||
TARGET_LDFLAGS="$TARGET_LDFLAGS -m32"
|
||||
TARGET_MODULE_FORMAT="elf32"
|
||||
fi
|
||||
|
@ -360,6 +361,7 @@ fi
|
|||
if test "x$target_m64" = x1; then
|
||||
# Force 64-bit mode.
|
||||
TARGET_CFLAGS="$TARGET_CFLAGS -m64"
|
||||
TARGET_ASFLAGS="$TARGET_ASFLAGS -m64"
|
||||
TARGET_LDFLAGS="$TARGET_LDFLAGS -m64"
|
||||
TARGET_MODULE_FORMAT="elf64"
|
||||
fi
|
||||
|
|
Loading…
Reference in a new issue