config.mk 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. # SPDX-License-Identifier: GPL-2.0+
  2. #
  3. # (C) Copyright 2000-2010
  4. # Wolfgang Denk, DENX Software Engineering, wd@denx.de.
  5. CONFIG_STANDALONE_LOAD_ADDR ?= 0x40000
  6. LDFLAGS_FINAL += --gc-sections
  7. LDFLAGS_FINAL += --bss-plt
  8. PLATFORM_RELFLAGS += -fpic -mrelocatable -ffunction-sections \
  9. -fdata-sections -mcall-linux
  10. PF_CPPFLAGS_POWERPC := $(call cc-option,-fno-ira-hoist-pressure,)
  11. PLATFORM_CPPFLAGS += -D__powerpc__ -ffixed-r2 -m32 $(PF_CPPFLAGS_POWERPC)
  12. KBUILD_LDFLAGS += -m32 -melf32ppclinux
  13. #
  14. # When cross-compiling on NetBSD, we have to define __PPC__ or else we
  15. # will pick up a va_list declaration that is incompatible with the
  16. # actual argument lists emitted by the compiler.
  17. #
  18. # [Tested on NetBSD/i386 1.5 + cross-powerpc-netbsd-1.3]
  19. ifeq ($(CROSS_COMPILE),powerpc-netbsd-)
  20. PLATFORM_CPPFLAGS+= -D__PPC__
  21. endif
  22. ifeq ($(CROSS_COMPILE),powerpc-openbsd-)
  23. PLATFORM_CPPFLAGS+= -D__PPC__
  24. endif
  25. # Only test once
  26. ifneq ($(CONFIG_SPL_BUILD),y)
  27. archprepare: checkgcc4
  28. # GCC 3.x is reported to have problems generating the type of relocation
  29. # that U-Boot wants.
  30. # See http://lists.denx.de/pipermail/u-boot/2012-September/135156.html
  31. checkgcc4:
  32. @if test "$(call cc-name)" = "gcc" -a \
  33. $(call cc-version) -lt 0400; then \
  34. echo -n '*** Your GCC is too old, please upgrade to GCC 4.x or newer'; \
  35. false; \
  36. fi
  37. endif