- Updated -linux-rvct targets to support RVDS 4.0 and later.
- Changed optimization flag to -Otime because -O3 ruined performance
  for RVCT linux targets.
- Added support for --enable-small for RVCT
- RVCT created library should be able to link with GCC
- Supports building shared linux libraries

Change-Id: Ic62589950d86c3420fd4d908b8efb870806d1233
This commit is contained in:
Tero Rintaluoma 2011-06-14 11:29:35 +03:00
Родитель 532c30c83e
Коммит 5405bd9793
2 изменённых файлов: 23 добавлений и 36 удалений

Просмотреть файл

@ -689,7 +689,7 @@ process_common_toolchain() {
if enabled armv7 if enabled armv7
then then
check_add_cflags --cpu=Cortex-A8 --fpu=softvfp+vfpv3 check_add_cflags --cpu=Cortex-A8 --fpu=softvfp+vfpv3
check_add_asflags --cpu=Cortex-A8 --fpu=none check_add_asflags --cpu=Cortex-A8 --fpu=softvfp+vfpv3
else else
check_add_cflags --cpu=${tgt_isa##armv} check_add_cflags --cpu=${tgt_isa##armv}
check_add_asflags --cpu=${tgt_isa##armv} check_add_asflags --cpu=${tgt_isa##armv}
@ -751,41 +751,24 @@ process_common_toolchain() {
linux*) linux*)
enable linux enable linux
if enabled rvct; then if enabled rvct; then
# Compiling with RVCT requires an alternate libc (glibc) when # Check if we have CodeSourcery GCC in PATH. Needed for
# targetting linux. # libraries
disabled builtin_libc \ hash arm-none-linux-gnueabi-gcc 2>&- || \
|| die "Must supply --libc when targetting *-linux-rvct" die "Couldn't find CodeSourcery GCC from PATH"
# Set up compiler # Use armcc as a linker to enable translation of
add_cflags --library_interface=aeabi_glibc # some gcc specific options such as -lm and -lpthread.
add_cflags --no_hide_all LD="armcc --translate_gcc"
add_cflags --dwarf2
# Set up linker # create configuration file (uses path to CodeSourcery GCC)
add_ldflags --sysv --no_startup --no_ref_cpp_init armcc --arm_linux_configure --arm_linux_config_file=arm_linux.cfg
add_ldflags --entry=_start
add_ldflags --keep '"*(.init)"' --keep '"*(.fini)"'
add_ldflags --keep '"*(.init_array)"' --keep '"*(.fini_array)"'
add_ldflags --dynamiclinker=/lib/ld-linux.so.3
add_extralibs libc.so.6 -lc_nonshared crt1.o crti.o crtn.o
# Add the paths for the alternate libc add_cflags --arm_linux_paths --arm_linux_config_file=arm_linux.cfg
for d in usr/include; do add_asflags --no_hide_all --apcs=/interwork
try_dir="${alt_libc}/${d}" add_ldflags --arm_linux_paths --arm_linux_config_file=arm_linux.cfg
[ -d "${try_dir}" ] && add_cflags -J"${try_dir}" enabled pic && add_cflags --apcs=/fpic
done enabled pic && add_asflags --apcs=/fpic
add_cflags -J"${RVCT31INC}" enabled shared && add_cflags --shared
for d in lib usr/lib; do
try_dir="${alt_libc}/${d}"
[ -d "${try_dir}" ] && add_ldflags -L"${try_dir}"
done
# glibc has some struct members named __align, which is a
# storage modifier in RVCT. If we need to use this modifier,
# we'll have to #undef it in our code. Note that this must
# happen AFTER all libc inclues.
add_cflags -D__align=x_align_x
fi fi
;; ;;
@ -953,9 +936,13 @@ process_common_toolchain() {
enabled gcov && enabled gcov &&
check_add_cflags -fprofile-arcs -ftest-coverage && check_add_cflags -fprofile-arcs -ftest-coverage &&
check_add_ldflags -fprofile-arcs -ftest-coverage check_add_ldflags -fprofile-arcs -ftest-coverage
if enabled optimizations; then if enabled optimizations; then
enabled rvct && check_add_cflags -Otime if enabled rvct; then
enabled small && check_add_cflags -O2 || check_add_cflags -O3 enabled small && check_add_cflags -Ospace || check_add_cflags -Otime
else
enabled small && check_add_cflags -O2 || check_add_cflags -O3
fi
fi fi
# Position Independent Code (PIC) support, for building relocatable # Position Independent Code (PIC) support, for building relocatable

Просмотреть файл

@ -184,7 +184,7 @@ BUILD_LIBVPX_SO := $(if $(BUILD_LIBVPX),$(CONFIG_SHARED))
LIBVPX_SO := libvpx.so.$(VERSION_MAJOR).$(VERSION_MINOR).$(VERSION_PATCH) LIBVPX_SO := libvpx.so.$(VERSION_MAJOR).$(VERSION_MINOR).$(VERSION_PATCH)
LIBS-$(BUILD_LIBVPX_SO) += $(BUILD_PFX)$(LIBVPX_SO) LIBS-$(BUILD_LIBVPX_SO) += $(BUILD_PFX)$(LIBVPX_SO)
$(BUILD_PFX)$(LIBVPX_SO): $(LIBVPX_OBJS) libvpx.ver $(BUILD_PFX)$(LIBVPX_SO): $(LIBVPX_OBJS) libvpx.ver
$(BUILD_PFX)$(LIBVPX_SO): extralibs += -lm -pthread $(BUILD_PFX)$(LIBVPX_SO): extralibs += -lm
$(BUILD_PFX)$(LIBVPX_SO): SONAME = libvpx.so.$(VERSION_MAJOR) $(BUILD_PFX)$(LIBVPX_SO): SONAME = libvpx.so.$(VERSION_MAJOR)
$(BUILD_PFX)$(LIBVPX_SO): SO_VERSION_SCRIPT = libvpx.ver $(BUILD_PFX)$(LIBVPX_SO): SO_VERSION_SCRIPT = libvpx.ver
LIBVPX_SO_SYMLINKS := $(addprefix $(LIBSUBDIR)/, \ LIBVPX_SO_SYMLINKS := $(addprefix $(LIBSUBDIR)/, \