mirror of
https://git.rtems.org/rtems-source-builder
synced 2024-10-09 07:15:10 +08:00
Fix support for GCC being build as C++.
This commit is contained in:
parent
4f8fb656c4
commit
4f5321fa65
@ -143,10 +143,13 @@ BuildRoot: %{_tmppath}/%{name}-root-%(%{__id_u} -n)
|
||||
%endif
|
||||
%if "%{_build}" != "%{_host}"
|
||||
CFLAGS_FOR_BUILD="-g -O2 -Wall" \
|
||||
CXXFLAGS_FOR_BUILD="-g -O2 -Wall" \
|
||||
CC="%{_host}-gcc ${SB_OPT_FLAGS}" \
|
||||
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 ,,') \
|
||||
%endif
|
||||
../gcc-%{gcc_version}/configure \
|
||||
--prefix=%{_prefix} \
|
||||
|
@ -176,6 +176,7 @@ export SB_BUILD_ROOT
|
||||
%{?_targetcflags:CFLAGS_FOR_TARGET="%{_targetcflags}"}
|
||||
%{?_targetcxxflags:CXXFLAGS_FOR_TARGET="%{_targetcxxflags}"}
|
||||
export CFLAGS_FOR_TARGET
|
||||
export CXXFLAGS_FOR_TARGET
|
||||
# Default environment set up.
|
||||
LANG=C
|
||||
export LANG
|
||||
|
Loading…
x
Reference in New Issue
Block a user