summaryrefslogtreecommitdiffstats
path: root/source-builder/config/gcc-common-1.cfg
diff options
context:
space:
mode:
authorChris Johns <chrisj@rtems.org>2013-05-15 12:15:14 +1000
committerChris Johns <chrisj@rtems.org>2013-05-15 12:15:14 +1000
commitdb65c6aaf1e73722cfa1327d77419ecc402f096a (patch)
tree282a2cccf62ad776a0f50beaec02ee936c7ed2d5 /source-builder/config/gcc-common-1.cfg
parentAdd better error messages. (diff)
downloadrtems-source-builder-db65c6aaf1e73722cfa1327d77419ecc402f096a.tar.bz2
Support Canadian cross builds on FreeBSD (and other hosts).
Set up the rules to manage the separate host and build setting to allow a Canadian cross to complete. Update the scripts to move the build directory and host/build flags into the defaults so they are common for all build configurations.
Diffstat (limited to 'source-builder/config/gcc-common-1.cfg')
-rw-r--r--source-builder/config/gcc-common-1.cfg23
1 files changed, 3 insertions, 20 deletions
diff --git a/source-builder/config/gcc-common-1.cfg b/source-builder/config/gcc-common-1.cfg
index 52320a4..c63b9ca 100644
--- a/source-builder/config/gcc-common-1.cfg
+++ b/source-builder/config/gcc-common-1.cfg
@@ -110,12 +110,8 @@ BuildRoot: %{_tmppath}/%{name}-root-%(%{__id_u} -n)
cd ..
%build
- # Build directory support.
- if test "%{_build}" != "%{_host}" ; then
- build_dir="build-cxc"
- else
- build_dir="build"
- fi
+ %{build_directory}
+
mkdir -p ${build_dir}
cd ${build_dir}
@@ -140,18 +136,7 @@ BuildRoot: %{_tmppath}/%{name}-root-%(%{__id_u} -n)
languages="$languages,objc"
%endif
- # Host flags
- if test "%{_build}" != "%{_host}" ; then
- CFLAGS_FOR_BUILD="-g -O2 -Wall"
- CC="%{_host}-gcc ${SB_OPT_FLAGS}"
- CXXFLAGS_FOR_BUILD="-g -O2 -Wall"
- CXX="%{_host}-g++ ${SB_OPT_FLAGS}"
- else
- # 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 ,,')
- fi
- export CFLAGS CFLAGS_FOR_BUILD CC CXXFLAGS_FOR_BUILD CXX
+ %{host_build_flags}
../${source_dir_0}/configure \
--prefix=%{_prefix} \
@@ -190,8 +175,6 @@ BuildRoot: %{_tmppath}/%{name}-root-%(%{__id_u} -n)
%{__make} %{?_smp_mflags} all
cd ..
- unset CFLAGS CFLAGS_FOR_BUILD CC CXXFLAGS_FOR_BUILD CXX
-
%install
%{__rmdir} $SB_BUILD_ROOT