summaryrefslogblamecommitdiff
path: root/misc/buildroot/toolchain/gcc/Makefile.in
blob: 0329c199f618e10e6754eb2d026fef7270a5b009 (plain) (tree)
1
2
3
4
5
6
7
8







                                                                               







                                                                         

                                                
                                           
     




                                         
 
                                            
 
                                           
 


                                     
                                                
                                   


                               
     
 
                  
 






                               








                                                                  

     
                               
 



                                                    
 



                                                    
 



                                                   
 


                                
 


                                




                                                             
# 

GCC_VERSION:=$(strip $(subst ",, $(BR2_GCC_VERSION)))
#"))
TARGET_OPTIMIZATION:=$(strip $(subst ",, $(BR2_TARGET_OPTIMIZATION)))
#"))
EXTRA_GCC_CONFIG_OPTIONS:=$(strip $(subst ",, $(BR2_EXTRA_GCC_CONFIG_OPTIONS)))
#"))
#")))

ifeq ($(strip $(BR2_GCC_USE_SJLJ_EXCEPTIONS)),y)
GCC_USE_SJLJ_EXCEPTIONS:=--enable-sjlj-exceptions
endif

ifeq ($(BR2_SOFT_FLOAT),y)
# gcc 3.4.x soft float configuration is different than previous versions.
ifeq ($(findstring x3.4.,x$(GCC_VERSION)),x3.4.)
ifneq ($(BR2_nios2),y)
SOFT_FLOAT_CONFIG_OPTION:=--with-float=soft
endif
else
SOFT_FLOAT_CONFIG_OPTION:=--without-float
endif

# again... there must be a better way

ifeq ($(findstring x4.,x$(GCC_VERSION)),x4.)

SOFT_FLOAT_CONFIG_OPTION:=--with-float=soft

ifeq ($(BR2_SOFT_FLOAT_FP),y)
TARGET_SOFT_FLOAT:=-mfloat-abi=softfp
else # no fp at all
ifeq ($(BR2_arm),y) # only set float-abi for arm
TARGET_SOFT_FLOAT:=-mfloat-abi=soft
else
TARGET_SOFT_FLOAT:=-msoft-float
endif
endif

else # not gcc-4.x

TARGET_SOFT_FLOAT:=-msoft-float
endif
ARCH_FPU_SUFFIX:=_nofpu
else # no softfloat support
SOFT_FLOAT_CONFIG_OPTION:=
TARGET_SOFT_FLOAT:=
ARCH_FPU_SUFFIX:=

endif

# DSA: config gcc to build Cortex-M4 compiler with hard float

ifeq ($(strip $(BR2_GCC_CORTEX_M4F)),y)
TARGET_SOFT_FLOAT:=-mfpu=fpv4-sp-d16 -mfloat-abi=hard -mhard-float
SOFT_FLOAT_CONFIG_OPTION:=--with-float=hard
ARCH_FPU_SUFFIX:=_hf
endif

# some additional tuning values

ifneq ($(strip $(subst ",,$(BR2_GCC_TARGET_ARCH))),)
# ")))
GCC_WITH_ARCH:=--with-arch=$(BR2_GCC_TARGET_ARCH)
endif

ifneq ($(strip $(subst ",,$(BR2_GCC_TARGET_TUNE))),)
# ")))
GCC_WITH_TUNE:=--with-tune=$(BR2_GCC_TARGET_TUNE)
endif

ifneq ($(strip $(subst ",,$(BR2_GCC_TARGET_ABI))),)
# ")))
GCC_WITH_ABI:=--with-abi=$(BR2_GCC_TARGET_ABI)
endif

ifdef BR2_cortex_m0
GCC_WITH_MODE:=--with-mode=thumb
endif

ifdef BR2_cortex_m3
GCC_WITH_MODE:=--with-mode=thumb
endif

# DSA: config gcc to build Cortec-M4 compiler with hard float
ifdef BR2_cortex_m4f
GCC_WITH_MODE:=--with-mode=thumb
endif