Skip to content
This repository
Stephan Raue sraue
file 57 lines (53 sloc) 2.367 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57
# determines TARGET_CPU, if not forced by user
  if [ -z "$TARGET_CPU" ]; then
    TARGET_CPU=cortex-a8
  fi

# TARGET_CPU:
# arm2 arm250 arm3 arm6 arm60 arm600 arm610 arm620 arm7 arm7m arm7d
# arm7dm arm7di arm7dmi arm70 arm700 arm700i arm710 arm710c
# arm7100 arm720 arm7500 arm7500fe arm7tdmi arm7tdmi-s arm710t
# arm720t arm740t strongarm strongarm110 strongarm1100
# strongarm1110 arm8 arm810 arm9 arm9e arm920 arm920t arm922t
# arm946e-s arm966e-s arm968e-s arm926ej-s arm940t arm9tdmi
# arm10tdmi arm1020t arm1026ej-s arm10e arm1020e arm1022e
# arm1136j-s arm1136jf-s mpcore mpcorenovfp arm1156t2-s
# arm1176jz-s arm1176jzf-s cortex-a8 cortex-a9 cortex-r4
# cortex-r4f cortex-m3 cortex-m1 xscale iwmmxt iwmmxt2 ep9312.

# TARGET_FPU:
# This specifies what floating point hardware (or hardware emulation) is
# available on the target. Permissible names are:
# fpa fpe2 fpe3 maverick vfp vfpv3 vfpv3-fp16 vfpv3-d16 vfpv3-d16-fp16
# vfpv3xd vfpv3xd-fp16 neon neon-fp16 vfpv4 vfpv4-d16 fpv4-sp-d16
# neon-vfpv4.

# determine architecture's family
  case $TARGET_CPU in
    arm1176jzf-s)
      TARGET_SUBARCH=armv6zk
      TARGET_ABI=eabi
      TARGET_EXTRA_FLAGS="-mcpu=$TARGET_CPU"
      TARGET_FPU_FLAGS="-mfloat-abi=$TARGET_FLOAT -mfpu=$TARGET_FPU"
      SIMD_SUPPORT="no"
      ;;
    cortex-a7|cortex-a15)
      TARGET_SUBARCH=armv7-a
      TARGET_ABI=eabi
      # It's not currently possible to specify the exact architecture variant (-mcpu)
      # that A7/A15 supports in the command line so use -mtune here.
      # see http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57907
      TARGET_EXTRA_FLAGS="-mtune=$TARGET_CPU"
      TARGET_FPU_FLAGS="-mfloat-abi=$TARGET_FLOAT -mfpu=$TARGET_FPU"
      SIMD_SUPPORT="yes"
      ;;
    cortex-a5|cortex-a8|cortex-a9)
      TARGET_SUBARCH=armv7-a
      TARGET_ABI=eabi
      TARGET_EXTRA_FLAGS="-mcpu=$TARGET_CPU"
      TARGET_FPU_FLAGS="-mfloat-abi=$TARGET_FLOAT -mfpu=$TARGET_FPU"
      SIMD_SUPPORT="yes"
      ;;
  esac

# setup ARCH specific *FLAGS
  TARGET_CFLAGS="-march=$TARGET_SUBARCH -mabi=aapcs-linux -Wno-psabi -Wa,-mno-warn-deprecated $TARGET_EXTRA_FLAGS"
  [ -n "$TARGET_FPU" ] && TARGET_CFLAGS="$TARGET_CFLAGS $TARGET_FPU_FLAGS"
  TARGET_LDFLAGS="-march=$TARGET_SUBARCH -mtune=$TARGET_CPU"
  GCC_OPTS="--with-abi=aapcs-linux --with-arch=$TARGET_SUBARCH --with-float=$TARGET_FLOAT --with-fpu=$TARGET_FPU"
Something went wrong with that request. Please try again.