On 01.03.22 12:20, Chen, Hongzhan wrote:
>> -----Original Message-----
>> From: Jan Kiszka <[email protected]> 
>> Sent: Tuesday, March 1, 2022 3:31 PM
>> To: Chen, Hongzhan <[email protected]>; [email protected]
>> Subject: Re: [PATCH 1/4] build: Add c++ build support
>>
>> On 28.02.22 06:40, Hongzhan Chen wrote:
>>> Add c++ build support or use specific c++ compiler
>>>
>>> Signed-off-by: Hongzhan Chen <[email protected]>
>>> ---
>>>  configure.ac | 12 ++++++++++++
>>>  1 file changed, 12 insertions(+)
>>>
>>> diff --git a/configure.ac b/configure.ac
>>> index 0389cf008..16cffd8f8 100644
>>> --- a/configure.ac
>>> +++ b/configure.ac
>>> @@ -79,6 +79,18 @@ AC_ARG_WITH(cc,
>>>      ])
>>>  AC_PROG_CC
>>>  
>>> +AC_ARG_WITH(cxx,
>>> +    AS_HELP_STRING([--with-cxx=compiler],[use specific C++ compiler]),
>>> +    [
>>> +   case "$withval" in
>>> +   "" | y | ye | yes | n | no)
>>> +       AC_MSG_ERROR([You must supply an argument to --with-cxx])
>>> +     ;;
>>> +   esac
>>> +   CXX="$withval"
>>> +    ])
>>> +AC_PROG_CXX
>>> +
>>>  # Do not let autoconf set the default value of CFLAGS
>>>  if $XENO_EMPTY_CFLAGS; then
>>>     CFLAGS=""
>>
>> Will that make a C++ compiler mandatory for the build? Or only when
> 
> No. According to description of sector 6.2 of [1], libtool tries to 
> automatically infer what tag to use from 
> the compiler command being used to compile or link. CC is the default tag. In 
> our case, only kernelshark
> would use CXX.
> 
> [1]: 
> https://www.gnu.org/software/libtool/manual/libtool.html#C_002b_002b-libraries
> 

Perfect, thanks for clarifying!

Jan

-- 
Siemens AG, Technology
Competence Center Embedded Linux

Reply via email to