diff --git a/src/arch/armv7/Makefile.inc b/src/arch/armv7/Makefile.inc index 245cd8a299..9e57244e37 100644 --- a/src/arch/armv7/Makefile.inc +++ b/src/arch/armv7/Makefile.inc @@ -138,6 +138,16 @@ endif ################################################################################ # done +CFLAGS += \ + -fno-common\ + -ffixed-r8\ + -mabi=aapcs-linux\ + -march=armv7-a\ + -marm\ + -mno-unaligned-access\ + -mthumb\ + -mthumb-interwork + # For various headers imported from Linux CFLAGS += -D__KERNEL__ CFLAGS += -D__LINUX_ARM_ARCH__=7 diff --git a/util/xcompile/xcompile b/util/xcompile/xcompile index 42391764c5..ea975ecab8 100644 --- a/util/xcompile/xcompile +++ b/util/xcompile/xcompile @@ -106,14 +106,9 @@ detect_special_flags() { CFLAGS="$CFLAGS -Wl,--build-id=none" case "$architecture" in - arm ) - # testcc "$CC" "$CFLAGS -mcpu=cortex-a9" && - # CFLAGS="$CFLAGS -mcpu=cortex-a9" - testcc "$CC" "\ -$CFLAGS -ffixed-r8 -msoft-float -marm -mabi=aapcs-linux \ --mno-thumb-interwork -march=armv7 -mno-thumb-interwork" && CFLAGS="\ -$CFLAGS -ffixed-r8 -msoft-float -marm -mabi=aapcs-linux \ --mno-thumb-interwork -march=armv7 -mno-thumb-interwork" + armv7 ) + ARMFLAGS="" + testcc "$CC" "$CFLAGS $ARMFLAGS"&&CFLAGS="$CFLAGS $ARMFLAGS" ;; esac }