Fix the Cxc build configuration for the DTC tool.

This commit is contained in:
Chris Johns 2013-07-14 09:11:21 +10:00
parent 023b5df870
commit 2626dbae7c
2 changed files with 12 additions and 1 deletions

View File

@ -39,7 +39,7 @@ Source0: http://www.jdl.com/software/dtc-v%{dtc_version}.tgz
%build
cd dtc-v%{dtc_version}
%{host_build_flags}
%{build_build_flags}
%{__make} PREFIX=%{_prefix}

View File

@ -263,6 +263,7 @@ else
build_dir="build"
fi'''
# Host/build flags.
host_build_flags: none, none, '''
# Host and build flags
if test "%{_build}" != "%{_host}" ; then
@ -281,6 +282,16 @@ else
fi
export CC CXX CC_FOR_BUILD CXX_FOR_BUILD CFLAGS CFLAGS_FOR_BUILD CXXFLAGS_FOR_BUILD'''
# Build/build flags.
build_build_flags: none, none, '''
# Build and build flags means force build == host
# gcc is not ready to be compiled with -std=gnu99
CC=$(echo "%{__cc} ${SB_OPT_FLAGS}" | sed -e 's,-std=gnu99 ,,')
CXX=$(echo "%{__cxx} ${SB_OPT_FLAGS}" | sed -e 's,-std=gnu99 ,,')
CC_FOR_BUILD=${CC}
CXX_FOR_BUILD=${CXX}
export CC CXX CC_FOR_BUILD CXX_FOR_BUILD CFLAGS'''
# Default package settings
_forced_static: none, none, '-Xlinker -Bstatic ${LIBS_STATIC} -Xlinker -Bdynamic'
__xz: exe, required, '/usr/bin/xz'