Makefile-i386 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. core-y += arch/um/sys-i386/ arch/i386/crypto/
  2. TOP_ADDR := $(CONFIG_TOP_ADDR)
  3. ifeq ($(CONFIG_MODE_SKAS),y)
  4. ifneq ($(CONFIG_MODE_TT),y)
  5. START := 0x8048000
  6. endif
  7. endif
  8. LDFLAGS += -m elf_i386
  9. ELF_ARCH := $(SUBARCH)
  10. ELF_FORMAT := elf32-$(SUBARCH)
  11. OBJCOPYFLAGS := -O binary -R .note -R .comment -S
  12. ifeq ("$(origin SUBARCH)", "command line")
  13. ifneq ("$(shell uname -m | sed -e s/i.86/i386/)", "$(SUBARCH)")
  14. CFLAGS += $(call cc-option,-m32)
  15. AFLAGS += $(call cc-option,-m32)
  16. LINK-y += $(call cc-option,-m32)
  17. UML_OBJCOPYFLAGS += -F $(ELF_FORMAT)
  18. export LDFLAGS HOSTCFLAGS HOSTLDFLAGS UML_OBJCOPYFLAGS
  19. endif
  20. endif
  21. ARCH_KERNEL_DEFINES += -U__$(SUBARCH)__ -U$(SUBARCH)
  22. # First of all, tune CFLAGS for the specific CPU. This actually sets cflags-y.
  23. include $(srctree)/arch/i386/Makefile.cpu
  24. # prevent gcc from keeping the stack 16 byte aligned. Taken from i386.
  25. cflags-y += $(call cc-option,-mpreferred-stack-boundary=2)
  26. # Prevent sprintf in nfsd from being converted to strcpy and resulting in
  27. # an unresolved reference.
  28. cflags-y += -ffreestanding
  29. CFLAGS += $(cflags-y)