Home | History | Annotate | Download | only in mipsel-linux-android-4.9
      1 # Copyright (C) 2009 The Android Open Source Project
      2 #
      3 # Licensed under the Apache License, Version 2.0 (the "License");
      4 # you may not use this file except in compliance with the License.
      5 # You may obtain a copy of the License at
      6 #
      7 #      http://www.apache.org/licenses/LICENSE-2.0
      8 #
      9 # Unless required by applicable law or agreed to in writing, software
     10 # distributed under the License is distributed on an "AS IS" BASIS,
     11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     12 # See the License for the specific language governing permissions and
     13 # limitations under the License.
     14 #
     15 
     16 # this file is used to prepare the NDK to build with the mipsel gcc-4.9
     17 # toolchain any number of source files
     18 #
     19 # its purpose is to define (or re-define) templates used to build
     20 # various sources into target object files, libraries or executables.
     21 #
     22 # Note that this file may end up being parsed several times in future
     23 # revisions of the NDK.
     24 #
     25 
     26 TARGET_CFLAGS := \
     27         -fpic \
     28         -fno-strict-aliasing \
     29         -finline-functions \
     30         -ffunction-sections \
     31         -funwind-tables \
     32         -fstack-protector-strong \
     33         -fmessage-length=0 \
     34         -fno-inline-functions-called-once \
     35         -fgcse-after-reload \
     36         -frerun-cse-after-loop \
     37         -frename-registers \
     38         -no-canonical-prefixes
     39 
     40 TARGET_LDFLAGS := -no-canonical-prefixes
     41 
     42 TARGET_mips_release_CFLAGS := -O2 \
     43                               -g \
     44                               -DNDEBUG \
     45                               -fomit-frame-pointer \
     46                               -funswitch-loops     \
     47                               -finline-limit=300
     48 
     49 TARGET_mips_debug_CFLAGS := -O0 \
     50                             -g \
     51                             -fno-omit-frame-pointer
     52 
     53 
     54 # This function will be called to determine the target CFLAGS used to build
     55 # a C or Assembler source file, based on its tags.
     56 TARGET-process-src-files-tags = \
     57 $(eval __debug_sources := $(call get-src-files-with-tag,debug)) \
     58 $(eval __release_sources := $(call get-src-files-without-tag,debug)) \
     59 $(call set-src-files-target-cflags, \
     60     $(__debug_sources),\
     61     $(TARGET_mips_debug_CFLAGS)) \
     62 $(call set-src-files-target-cflags,\
     63     $(__release_sources),\
     64     $(TARGET_mips_release_CFLAGS)) \
     65