Changeset b31d5e2 in rtems-source-builder


Ignore:
Timestamp:
Jan 23, 2015, 3:31:25 AM (5 years ago)
Author:
Chris Johns <chrisj@…>
Branches:
4.10, 4.11, 4.9, master
Children:
8a7428c
Parents:
db6d3eb
Message:

Fix C++ build support for cross-compiling RTEMS 3rd party packages.

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • rtems/config/rtems-bsp.cfg

    rdb6d3eb rb31d5e2  
    4848%define rtems_bsp_libs      %{pkgconfig libs    %{_host}-%{rtems_bsp}}
    4949
     50%if %{rtems_bsp_ccflags} == %{nil}
     51  %define rtems_bsp_ccflags %{rtems_bsp_cflags}
     52%endif
     53
    5054#
    5155# Map to names used for cross compiling.
    5256#
    53 %define host_cflags  %{rtems_bsp_cflags}
    54 %define host_ldflags %{rtems_bsp_ldflags}
    55 %define host_libs    %{rtems_bsp_libs}
     57%define host_cflags   %{rtems_bsp_cflags}
     58%define host_cxxflags %{rtems_bsp_ccflags}
     59%define host_ldflags  %{rtems_bsp_ldflags}
     60%define host_libs     %{rtems_bsp_libs}
    5661
    5762#
  • source-builder/defaults.mc

    rdb6d3eb rb31d5e2  
    5858# the tools will run on and build is the host building the tools.
    5959host_cflags:         none,    convert,  '-O2 -pipe'
     60host_cxxflags:       none,    convert,  '-O2 -pipe'
    6061host_includes:       none,    convert,  ''
    6162build_cflags:        none,    convert,  '-O2 -pipe'
     
    191192# host == build, use build; host != build , host uses host and build uses build
    192193SB_HOST_CFLAGS="%{host_cflags} %{host_includes}"
     194SB_HOST_CXXFLAGS="%{host_cxxflags} %{host_includes}"
    193195SB_HOST_LDFLAGS="%{?host_ldflags:%{host_ldflags}}%{?_tmproot:-L%{_tmproot}/${SB_PREFIX_CLEAN}/lib}"
    194196SB_BUILD_CFLAGS="%{build_cflags} %{?_tmproot:-I%{_tmproot}/${SB_PREFIX_CLEAN}/include}"
     
    200202SB_OS="%{_os}"
    201203export SB_SOURCE_DIR SB_BUILD_DIR SB_ARCH SB_OS
    202 export SB_HOST_CFLAGS SB_HOST_LDFLAGS SB_BUILD_CFLAGS SB_BUILD_CXXFLAGS SB_BUILD_LDFLAGS SB_CFLAGS SB_CXXFLAGS
     204export SB_HOST_CFLAGS SB_HOST_CXXFLAGS SB_HOST_LDFLAGS
     205export SB_BUILD_CFLAGS SB_BUILD_CXXFLAGS SB_BUILD_LDFLAGS
     206export SB_CFLAGS SB_CXXFLAGS
    203207# Documentation
    204208SB_DOC_DIR="%{_docdir}"
     
    305309  CXX=$(echo "%{_host}-%{_host_cxx}" | sed -e 's,-std=gnu99 ,,')
    306310  CFLAGS="${SB_HOST_CFLAGS}"
     311  CXXFLAGS="${SB_HOST_CXXFLAGS}"
    307312  LDFLAGS="${SB_HOST_LDFLAGS}"
    308313  # Host
     
    327332  CXX_FOR_BUILD=${CXX}
    328333fi
    329 export CC CXX CFLAGS LDFLAGS
     334export CC CXX CFLAGS CXXFLAGS LDFLAGS
    330335export CC_FOR_HOST CXX_FOR_HOST CFLAGS_FOR_HOST CXXFLAGS_FOR_HOST LDFLAGS_FOR_HOST
    331336export CC_FOR_BUILD CXX_FOR_BUILD CFLAGS_FOR_BUILD CXXFLAGS_FOR_BUILD LDFLAGS_FOR_BUILD'''
Note: See TracChangeset for help on using the changeset viewer.