Removed hard coded values of toolchain and gcc cpu flags

This commit is contained in:
Amit Mahajan
2009-10-27 15:35:37 +05:30
parent 2b29170633
commit 91c617d0b2
26 changed files with 162 additions and 89 deletions

View File

@@ -5,17 +5,20 @@
# Copyright © 2009 B Labs Ltd
import os, sys, shelve
from configure import *
arch = 'arm'
subarch = 'v5'
platform = 'pb926'
variant = "baremetal"
config = configuration_retrieve()
arch = config.arch
subarch = config.subarch
platform = config.platform
gcc_cpu_flag = config.gcc_cpu_flag
env = Environment(CC = 'arm-none-eabi-gcc',
env = Environment(CC = config.kernel_toolchain + 'gcc',
# We don't use -nostdinc because sometimes we need standard headers,
# such as stdarg.h e.g. for variable args, as in printk().
CCFLAGS = ['-g', '-mcpu=arm926ej-s', '-nostdlib', '-ffreestanding', \
'-std=gnu99', '-Wall', '-Werror'],
CCFLAGS = ['-g', '-nostdlib', '-ffreestanding', '-std=gnu99', '-Wall', \
'-Werror', ('-mcpu=' + gcc_cpu_flag)],
LINKFLAGS = ['-nostdlib', '-T' + "include/l4/arch/arm/linker.lds"],
ASFLAGS = ['-D__ASSEMBLY__'],
PROGSUFFIX = '.elf', # The suffix to use for final executable

View File

@@ -6,9 +6,11 @@
import os, sys, shelve
from os.path import join
from configure import *
arch = 'arm'
platform = 'pb926'
config = configuration_retrieve()
arch = config.arch
platform = config.platform
# Get global paths
PROJRELROOT="../../../"
@@ -19,7 +21,7 @@ LIBC_LIBPATH = LIBC_PATH
LIBC_INCPATH = [join(LIBC_PATH, 'include'), \
join(LIBC_PATH, 'include/arch/' + arch)]
env = Environment(CC = 'arm-none-linux-gnueabi-gcc',
env = Environment(CC = config.user_toolchain + 'gcc',
CCFLAGS = ['-g', '-nostdinc', '-nostdlib', '-ffreestanding'],
LINKFLAGS = ['-nostdlib'],
ENV = {'PATH' : os.environ['PATH']},