Makefile.arch 775 B

1234567891011121314151617181920212223
  1. uname_M := $(shell uname -m 2>/dev/null || echo not)
  2. ARCH ?= $(shell echo $(uname_M) | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ \
  3. -e s/arm.*/arm/ -e s/sa110/arm/ \
  4. -e s/s390x/s390/ -e s/parisc64/parisc/ \
  5. -e s/ppc.*/powerpc/ -e s/mips.*/mips/ \
  6. -e s/sh[234].*/sh/ -e s/aarch64.*/arm64/ \
  7. -e s/tile.*/tile/ )
  8. # Additional ARCH settings for x86
  9. ifeq ($(ARCH),i386)
  10. override ARCH := x86
  11. endif
  12. ifeq ($(ARCH),x86_64)
  13. override ARCH := x86
  14. IS_X86_64 := 0
  15. ifeq (, $(findstring m32,$(CFLAGS)))
  16. IS_X86_64 := $(shell echo __x86_64__ | ${CC} -E -x c - | tail -n 1)
  17. RAW_ARCH := x86_64
  18. endif
  19. endif