1get_gcc_configure_options() 2{ 3 local CTARGET=$1; shift 4 local confgcc=$(get_gcc_common_options) 5 case ${CTARGET} in 6 arm*) #264534 7 local arm_arch="${CTARGET%%-*}" 8 # Only do this if arm_arch is armv* 9 if [[ ${arm_arch} == armv* ]] ; then 10 # Convert armv7{a,r,m} to armv7-{a,r,m} 11 [[ ${arm_arch} == armv7? ]] && arm_arch=${arm_arch/7/7-} 12 # Remove endian ('l' / 'eb') 13 [[ ${arm_arch} == *l ]] && arm_arch=${arm_arch%l} 14 [[ ${arm_arch} == *eb ]] && arm_arch=${arm_arch%eb} 15 confgcc="${confgcc} --with-arch=${arm_arch}" 16 confgcc="${confgcc} --disable-esp" 17 fi 18 ;; 19 i?86*) 20 # Hardened is enabled for x86, but disabled for ARM. 21 confgcc="${confgcc} --with-arch=atom" 22 confgcc="${confgcc} --enable-esp" 23 ;; 24 esac 25 echo ${confgcc} 26} 27 28get_gcc_common_options() 29{ 30 local confgcc 31 # TODO(asharif): Build without these options. 32 confgcc="${confgcc} --disable-libmudflap" 33 confgcc="${confgcc} --disable-libssp" 34 confgcc="${confgcc} --disable-libgomp" 35 confgcc="${confgcc} --enable-__cxa_atexit" 36 confgcc="${confgcc} --enable-checking=release" 37 confgcc="${confgcc} --disable-libquadmath" 38 echo ${confgcc} 39} 40 41