Procházet zdrojové kódy

build: tune code for cortex-a7 cpu

Signed-off-by: svoboda18 <dev.svoboda18@gmail.com>
svoboda18 před 2 roky
rodič
revize
4a646c3532

+ 2 - 0
arch/arm/exceptions.S

@@ -22,6 +22,8 @@
  */
 #include <asm.h>
 
+.arch_extension sec
+
 FUNCTION(arm_undefined)
 	stmfd 	sp!, { r0-r12, r14 }
 	sub		sp, sp, #12

+ 1 - 1
arch/arm/rules.mk

@@ -50,7 +50,7 @@ DEFINES += \
         ARM_WITH_THUMB2=1 \
         ARM_WITH_CACHE=1 \
         ARM_WITH_L2=1
-CFLAGS += -mcpu=cortex-a9
+CFLAGS += -march=armv7-a -mtune=cortex-a7
 #CFLAGS += -mcpu=arm1136jf-s # compiler doesn't understand cortex yet
 HANDLED_CORE := true
 #CFLAGS += -mfpu=vfp -mfloat-abi=softfp

+ 0 - 7
gcc/bin/arm-linux-androideabi-gcc

@@ -50,15 +50,8 @@ class CompilerWrapper():
   def add_flags(self):
     self.args = self.prepend_flags + self.args + self.append_flags
 
-  def print_deprecation_warning(self):
-    print("Android GCC has been deprecated in favor of Clang, and will be removed from\n"
-          "Android in 2020-01 as per the deprecation plan in:\n"
-          "https://android.googlesource.com/platform/prebuilts/clang/host/linux-x86/+/master/GCC_4_9_DEPRECATION.md\n\n",
-          file=sys.stderr)
-
 
   def invoke_compiler(self):
-    self.print_deprecation_warning()
     self.set_real_compiler()
     self.parse_custom_flags()
     self.process_gomacc_command()

+ 1 - 2
makefile

@@ -50,8 +50,7 @@ ifeq ($(ENABLE_TRUSTZONE),1)
 endif
 
 INCLUDES := -I$(BUILDDIR) -Iinclude
-CFLAGS := -O2 -g -gdwarf-2 -fno-builtin -finline -W -Wall -Wno-multichar -Wno-unused-parameter -Wno-unused-function -include $(CONFIGHEADER) -include $(VERSIONHEADER)
-#CFLAGS += -Werror
+CFLAGS := -O3 -fno-builtin -finline -Wno-multichar -Wno-unused-parameter -Wno-unused-function -include $(CONFIGHEADER) -include $(VERSIONHEADER)
 
 ifeq ($(EMMC_BOOT),1)
   CFLAGS += -D_EMMC_BOOT=1

+ 2 - 1
platform/common/atf/atf_ramdump.c

@@ -130,7 +130,8 @@ void atf_log_init(void)
 #ifdef MTK_SMC_ID_MGMT
 	atf_log_buf_addr = mt_secure_call_ret3(smc_id, 0, 0, 0, 0, &atf_log_buf_size, &atf_crash_flag_addr);
 #else
-	__asm__ volatile("mov r0, %[smcid]\n"
+	__asm__ volatile(".arch_extension sec\n"
+			"mov r0, %[smcid]\n"
 			"smc #0x0\n"
 			"mov %[addr], r0\n"
 			"mov %[size], r1\n"