public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [arm-embedded][PATCH, GCC/ARM, 2/3] Error out for incompatible ARM multilibs
@ 2015-12-17  9:32 Thomas Preud'homme
  2016-04-27 14:17 ` Thomas Preudhomme
  2016-11-22 14:43 ` Thomas Preudhomme
  0 siblings, 2 replies; 6+ messages in thread
From: Thomas Preud'homme @ 2015-12-17  9:32 UTC (permalink / raw)
  To: gcc-patches

Hi,

We decided to apply the following patch to the ARM embedded 5 branch.

Best regards,

Thomas

> -----Original Message-----
> From: gcc-patches-owner@gcc.gnu.org [mailto:gcc-patches-
> owner@gcc.gnu.org] On Behalf Of Thomas Preud'homme
> Sent: Wednesday, December 16, 2015 7:59 PM
> To: gcc-patches@gcc.gnu.org; Richard Earnshaw; Ramana Radhakrishnan;
> Kyrylo Tkachov
> Subject: [PATCH, GCC/ARM, 2/3] Error out for incompatible ARM
> multilibs
> 
> Currently in config.gcc, only the first multilib in a multilib list is checked for
> validity and the following elements are ignored due to the break which
> only breaks out of loop in shell. A loop is also done over the multilib list
> elements despite no combination being legal. This patch rework the code
> to address both issues.
> 
> ChangeLog entry is as follows:
> 
> 
> 2015-11-24  Thomas Preud'homme  <thomas.preudhomme@arm.com>
> 
>         * config.gcc: Error out when conflicting multilib is detected.  Do not
>         loop over multilibs since no combination is legal.
> 
> 
> diff --git a/gcc/config.gcc b/gcc/config.gcc
> index 59aee2c..be3c720 100644
> --- a/gcc/config.gcc
> +++ b/gcc/config.gcc
> @@ -3772,38 +3772,40 @@ case "${target}" in
>  		# Add extra multilibs
>  		if test "x$with_multilib_list" != x; then
>  			arm_multilibs=`echo $with_multilib_list | sed -e
> 's/,/ /g'`
> -			for arm_multilib in ${arm_multilibs}; do
> -				case ${arm_multilib} in
> -				aprofile)
> +			case ${arm_multilibs} in
> +			aprofile)
>  				# Note that arm/t-aprofile is a
>  				# stand-alone make file fragment to be
>  				# used only with itself.  We do not
>  				# specifically use the
>  				# TM_MULTILIB_OPTION framework
> because
>  				# this shorthand is more
> -				# pragmatic. Additionally it is only
> -				# designed to work without any
> -				# with-cpu, with-arch with-mode
> +				# pragmatic.
> +				tmake_profile_file="arm/t-aprofile"
> +				;;
> +			default)
> +				;;
> +			*)
> +				echo "Error: --with-multilib-
> list=${with_multilib_list} not supported." 1>&2
> +				exit 1
> +				;;
> +			esac
> +
> +			if test "x${tmake_profile_file}" != x ; then
> +				# arm/t-aprofile is only designed to work
> +				# without any with-cpu, with-arch, with-
> mode,
>  				# with-fpu or with-float options.
> -					if test "x$with_arch" != x \
> -					    || test "x$with_cpu" != x \
> -					    || test "x$with_float" != x \
> -					    || test "x$with_fpu" != x \
> -					    || test "x$with_mode" != x ;
> then
> -					    echo "Error: You cannot use
> any of --with-arch/cpu/fpu/float/mode with --with-multilib-list=aprofile"
> 1>&2
> -					    exit 1
> -					fi
> -					tmake_file="${tmake_file}
> arm/t-aprofile"
> -					break
> -					;;
> -				default)
> -					;;
> -				*)
> -					echo "Error: --with-multilib-
> list=${with_multilib_list} not supported." 1>&2
> -					exit 1
> -					;;
> -				esac
> -			done
> +				if test "x$with_arch" != x \
> +				    || test "x$with_cpu" != x \
> +				    || test "x$with_float" != x \
> +				    || test "x$with_fpu" != x \
> +				    || test "x$with_mode" != x ; then
> +				    echo "Error: You cannot use any of --
> with-arch/cpu/fpu/float/mode with --with-multilib-list=${arm_multilib}"
> 1>&2
> +				    exit 1
> +				fi
> +
> +				tmake_file="${tmake_file}
> ${tmake_profile_file}"
> +			fi
>  		fi
>  		;;
> 
> 
> Tested with the following multilib lists:
>   + foo -> "Error: --with-multilib-list=foo not supported" as expected
>   + default,aprofile -> "Error: --with-multilib-list=default,aprofile not
> supported" as expected
>   + aprofile,default -> "Error: --with-multilib-list=aprofile,default not
> supported" as expected
>   + (nothing) -> libraries in $installdir/arm-none-eabi/lib{,fpu,thumb}
>   + default -> libraries in $installdir/arm-none-eabi/lib{,fpu,thumb} as
> expected
>   + aprofile -> $installdir/arm-none-eabi/lib contains all supported multilib
> 
> Is this ok for trunk?
> 
> Best regards,
> 
> Thomas


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [arm-embedded][PATCH, GCC/ARM, 2/3] Error out for incompatible ARM multilibs
  2015-12-17  9:32 [arm-embedded][PATCH, GCC/ARM, 2/3] Error out for incompatible ARM multilibs Thomas Preud'homme
@ 2016-04-27 14:17 ` Thomas Preudhomme
  2016-04-29  7:07   ` Jasmin J.
  2016-04-29 15:07   ` Kyrill Tkachov
  2016-11-22 14:43 ` Thomas Preudhomme
  1 sibling, 2 replies; 6+ messages in thread
From: Thomas Preudhomme @ 2016-04-27 14:17 UTC (permalink / raw)
  To: gcc-patches, kyrylo.tkachov, ramana.radhakrishnan, richard.earnshaw

Ping?

Best regards,

Thomas

On Thursday 17 December 2015 17:32:48 Thomas Preud'homme wrote:
> Hi,
> 
> We decided to apply the following patch to the ARM embedded 5 branch.
> 
> Best regards,
> 
> Thomas
> 
> > -----Original Message-----
> > From: gcc-patches-owner@gcc.gnu.org [mailto:gcc-patches-
> > owner@gcc.gnu.org] On Behalf Of Thomas Preud'homme
> > Sent: Wednesday, December 16, 2015 7:59 PM
> > To: gcc-patches@gcc.gnu.org; Richard Earnshaw; Ramana Radhakrishnan;
> > Kyrylo Tkachov
> > Subject: [PATCH, GCC/ARM, 2/3] Error out for incompatible ARM
> > multilibs
> > 
> > Currently in config.gcc, only the first multilib in a multilib list is
> > checked for validity and the following elements are ignored due to the
> > break which only breaks out of loop in shell. A loop is also done over
> > the multilib list elements despite no combination being legal. This patch
> > rework the code to address both issues.
> > 
> > ChangeLog entry is as follows:
> > 
> > 
> > 2015-11-24  Thomas Preud'homme  <thomas.preudhomme@arm.com>
> > 
> >         * config.gcc: Error out when conflicting multilib is detected.  Do
> >         not
> >         loop over multilibs since no combination is legal.
> > 
> > diff --git a/gcc/config.gcc b/gcc/config.gcc
> > index 59aee2c..be3c720 100644
> > --- a/gcc/config.gcc
> > +++ b/gcc/config.gcc
> > @@ -3772,38 +3772,40 @@ case "${target}" in
> > 
> >  		# Add extra multilibs
> >  		if test "x$with_multilib_list" != x; then
> >  		
> >  			arm_multilibs=`echo $with_multilib_list | sed -e
> > 
> > 's/,/ /g'`
> > -			for arm_multilib in ${arm_multilibs}; do
> > -				case ${arm_multilib} in
> > -				aprofile)
> > +			case ${arm_multilibs} in
> > +			aprofile)
> > 
> >  				# Note that arm/t-aprofile is a
> >  				# stand-alone make file fragment to be
> >  				# used only with itself.  We do not
> >  				# specifically use the
> >  				# TM_MULTILIB_OPTION framework
> > 
> > because
> > 
> >  				# this shorthand is more
> > 
> > -				# pragmatic. Additionally it is only
> > -				# designed to work without any
> > -				# with-cpu, with-arch with-mode
> > +				# pragmatic.
> > +				tmake_profile_file="arm/t-aprofile"
> > +				;;
> > +			default)
> > +				;;
> > +			*)
> > +				echo "Error: --with-multilib-
> > list=${with_multilib_list} not supported." 1>&2
> > +				exit 1
> > +				;;
> > +			esac
> > +
> > +			if test "x${tmake_profile_file}" != x ; then
> > +				# arm/t-aprofile is only designed to work
> > +				# without any with-cpu, with-arch, with-
> > mode,
> > 
> >  				# with-fpu or with-float options.
> > 
> > -					if test "x$with_arch" != x \
> > -					    || test "x$with_cpu" != x \
> > -					    || test "x$with_float" != x \
> > -					    || test "x$with_fpu" != x \
> > -					    || test "x$with_mode" != x ;
> > then
> > -					    echo "Error: You cannot use
> > any of --with-arch/cpu/fpu/float/mode with --with-multilib-list=aprofile"
> > 1>&2
> > -					    exit 1
> > -					fi
> > -					tmake_file="${tmake_file}
> > arm/t-aprofile"
> > -					break
> > -					;;
> > -				default)
> > -					;;
> > -				*)
> > -					echo "Error: --with-multilib-
> > list=${with_multilib_list} not supported." 1>&2
> > -					exit 1
> > -					;;
> > -				esac
> > -			done
> > +				if test "x$with_arch" != x \
> > +				    || test "x$with_cpu" != x \
> > +				    || test "x$with_float" != x \
> > +				    || test "x$with_fpu" != x \
> > +				    || test "x$with_mode" != x ; then
> > +				    echo "Error: You cannot use any of --
> > with-arch/cpu/fpu/float/mode with --with-multilib-list=${arm_multilib}"
> > 1>&2
> > +				    exit 1
> > +				fi
> > +
> > +				tmake_file="${tmake_file}
> > ${tmake_profile_file}"
> > +			fi
> > 
> >  		fi
> >  		;;
> > 
> > Tested with the following multilib lists:
> >   + foo -> "Error: --with-multilib-list=foo not supported" as expected
> >   + default,aprofile -> "Error: --with-multilib-list=default,aprofile not
> > 
> > supported" as expected
> > 
> >   + aprofile,default -> "Error: --with-multilib-list=aprofile,default not
> > 
> > supported" as expected
> > 
> >   + (nothing) -> libraries in $installdir/arm-none-eabi/lib{,fpu,thumb}
> >   + default -> libraries in $installdir/arm-none-eabi/lib{,fpu,thumb} as
> > 
> > expected
> > 
> >   + aprofile -> $installdir/arm-none-eabi/lib contains all supported
> >   multilib
> > 
> > Is this ok for trunk?
> > 
> > Best regards,
> > 
> > Thomas

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [arm-embedded][PATCH, GCC/ARM, 2/3] Error out for incompatible ARM multilibs
  2016-04-27 14:17 ` Thomas Preudhomme
@ 2016-04-29  7:07   ` Jasmin J.
  2016-04-29 15:07   ` Kyrill Tkachov
  1 sibling, 0 replies; 6+ messages in thread
From: Jasmin J. @ 2016-04-29  7:07 UTC (permalink / raw)
  To: Thomas Preudhomme, gcc-patches, kyrylo.tkachov,
	ramana.radhakrishnan, richard.earnshaw

Hi!

I would really like to see this in GCC, because this is the base for the
next patch "Add multilib support for bare-metal ARM architectures".

BR
    Jasmin

*********************************************************************

On 04/27/2016 04:17 PM, Thomas Preudhomme wrote:
> Ping?
>
> Best regards,
>
> Thomas
>
> On Thursday 17 December 2015 17:32:48 Thomas Preud'homme wrote:
>> Hi,
>>
>> We decided to apply the following patch to the ARM embedded 5 branch.
>>
>> Best regards,
>>
>> Thomas
>>
>>> -----Original Message-----
>>> From: gcc-patches-owner@gcc.gnu.org [mailto:gcc-patches-
>>> owner@gcc.gnu.org] On Behalf Of Thomas Preud'homme
>>> Sent: Wednesday, December 16, 2015 7:59 PM
>>> To: gcc-patches@gcc.gnu.org; Richard Earnshaw; Ramana Radhakrishnan;
>>> Kyrylo Tkachov
>>> Subject: [PATCH, GCC/ARM, 2/3] Error out for incompatible ARM
>>> multilibs
>>>
>>> Currently in config.gcc, only the first multilib in a multilib list is
>>> checked for validity and the following elements are ignored due to the
>>> break which only breaks out of loop in shell. A loop is also done over
>>> the multilib list elements despite no combination being legal. This patch
>>> rework the code to address both issues.
>>>
>>> ChangeLog entry is as follows:
>>>
>>>
>>> 2015-11-24  Thomas Preud'homme  <thomas.preudhomme@arm.com>
>>>
>>>          * config.gcc: Error out when conflicting multilib is detected.  Do
>>>          not
>>>          loop over multilibs since no combination is legal.
>>>
>>> diff --git a/gcc/config.gcc b/gcc/config.gcc
>>> index 59aee2c..be3c720 100644
>>> --- a/gcc/config.gcc
>>> +++ b/gcc/config.gcc
>>> @@ -3772,38 +3772,40 @@ case "${target}" in
>>>
>>>   		# Add extra multilibs
>>>   		if test "x$with_multilib_list" != x; then
>>>   		
>>>   			arm_multilibs=`echo $with_multilib_list | sed -e
>>>
>>> 's/,/ /g'`
>>> -			for arm_multilib in ${arm_multilibs}; do
>>> -				case ${arm_multilib} in
>>> -				aprofile)
>>> +			case ${arm_multilibs} in
>>> +			aprofile)
>>>
>>>   				# Note that arm/t-aprofile is a
>>>   				# stand-alone make file fragment to be
>>>   				# used only with itself.  We do not
>>>   				# specifically use the
>>>   				# TM_MULTILIB_OPTION framework
>>>
>>> because
>>>
>>>   				# this shorthand is more
>>>
>>> -				# pragmatic. Additionally it is only
>>> -				# designed to work without any
>>> -				# with-cpu, with-arch with-mode
>>> +				# pragmatic.
>>> +				tmake_profile_file="arm/t-aprofile"
>>> +				;;
>>> +			default)
>>> +				;;
>>> +			*)
>>> +				echo "Error: --with-multilib-
>>> list=${with_multilib_list} not supported." 1>&2
>>> +				exit 1
>>> +				;;
>>> +			esac
>>> +
>>> +			if test "x${tmake_profile_file}" != x ; then
>>> +				# arm/t-aprofile is only designed to work
>>> +				# without any with-cpu, with-arch, with-
>>> mode,
>>>
>>>   				# with-fpu or with-float options.
>>>
>>> -					if test "x$with_arch" != x \
>>> -					    || test "x$with_cpu" != x \
>>> -					    || test "x$with_float" != x \
>>> -					    || test "x$with_fpu" != x \
>>> -					    || test "x$with_mode" != x ;
>>> then
>>> -					    echo "Error: You cannot use
>>> any of --with-arch/cpu/fpu/float/mode with --with-multilib-list=aprofile"
>>> 1>&2
>>> -					    exit 1
>>> -					fi
>>> -					tmake_file="${tmake_file}
>>> arm/t-aprofile"
>>> -					break
>>> -					;;
>>> -				default)
>>> -					;;
>>> -				*)
>>> -					echo "Error: --with-multilib-
>>> list=${with_multilib_list} not supported." 1>&2
>>> -					exit 1
>>> -					;;
>>> -				esac
>>> -			done
>>> +				if test "x$with_arch" != x \
>>> +				    || test "x$with_cpu" != x \
>>> +				    || test "x$with_float" != x \
>>> +				    || test "x$with_fpu" != x \
>>> +				    || test "x$with_mode" != x ; then
>>> +				    echo "Error: You cannot use any of --
>>> with-arch/cpu/fpu/float/mode with --with-multilib-list=${arm_multilib}"
>>> 1>&2
>>> +				    exit 1
>>> +				fi
>>> +
>>> +				tmake_file="${tmake_file}
>>> ${tmake_profile_file}"
>>> +			fi
>>>
>>>   		fi
>>>   		;;
>>>
>>> Tested with the following multilib lists:
>>>    + foo -> "Error: --with-multilib-list=foo not supported" as expected
>>>    + default,aprofile -> "Error: --with-multilib-list=default,aprofile not
>>>
>>> supported" as expected
>>>
>>>    + aprofile,default -> "Error: --with-multilib-list=aprofile,default not
>>>
>>> supported" as expected
>>>
>>>    + (nothing) -> libraries in $installdir/arm-none-eabi/lib{,fpu,thumb}
>>>    + default -> libraries in $installdir/arm-none-eabi/lib{,fpu,thumb} as
>>>
>>> expected
>>>
>>>    + aprofile -> $installdir/arm-none-eabi/lib contains all supported
>>>    multilib
>>>
>>> Is this ok for trunk?
>>>
>>> Best regards,
>>>
>>> Thomas
>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [arm-embedded][PATCH, GCC/ARM, 2/3] Error out for incompatible ARM multilibs
  2016-04-27 14:17 ` Thomas Preudhomme
  2016-04-29  7:07   ` Jasmin J.
@ 2016-04-29 15:07   ` Kyrill Tkachov
  2016-05-04 13:36     ` Thomas Preudhomme
  1 sibling, 1 reply; 6+ messages in thread
From: Kyrill Tkachov @ 2016-04-29 15:07 UTC (permalink / raw)
  To: Thomas Preudhomme, gcc-patches, ramana.radhakrishnan, richard.earnshaw


On 27/04/16 15:17, Thomas Preudhomme wrote:
> Ping?
>
> Best regards,
>
> Thomas
>
> On Thursday 17 December 2015 17:32:48 Thomas Preud'homme wrote:
>> Hi,
>>
>> We decided to apply the following patch to the ARM embedded 5 branch.
>>
>> Best regards,
>>
>> Thomas
>>
>>> -----Original Message-----
>>> From: gcc-patches-owner@gcc.gnu.org [mailto:gcc-patches-
>>> owner@gcc.gnu.org] On Behalf Of Thomas Preud'homme
>>> Sent: Wednesday, December 16, 2015 7:59 PM
>>> To: gcc-patches@gcc.gnu.org; Richard Earnshaw; Ramana Radhakrishnan;
>>> Kyrylo Tkachov
>>> Subject: [PATCH, GCC/ARM, 2/3] Error out for incompatible ARM
>>> multilibs
>>>
>>> Currently in config.gcc, only the first multilib in a multilib list is
>>> checked for validity and the following elements are ignored due to the
>>> break which only breaks out of loop in shell. A loop is also done over
>>> the multilib list elements despite no combination being legal. This patch
>>> rework the code to address both issues.
>>>
>>> ChangeLog entry is as follows:
>>>
>>>
>>> 2015-11-24  Thomas Preud'homme  <thomas.preudhomme@arm.com>
>>>
>>>          * config.gcc: Error out when conflicting multilib is detected.  Do
>>>          not
>>>          loop over multilibs since no combination is legal.

Ok for trunk.
Thanks,
Kyrill

>>> diff --git a/gcc/config.gcc b/gcc/config.gcc
>>> index 59aee2c..be3c720 100644
>>> --- a/gcc/config.gcc
>>> +++ b/gcc/config.gcc
>>> @@ -3772,38 +3772,40 @@ case "${target}" in
>>>
>>>   		# Add extra multilibs
>>>   		if test "x$with_multilib_list" != x; then
>>>   		
>>>   			arm_multilibs=`echo $with_multilib_list | sed -e
>>>
>>> 's/,/ /g'`
>>> -			for arm_multilib in ${arm_multilibs}; do
>>> -				case ${arm_multilib} in
>>> -				aprofile)
>>> +			case ${arm_multilibs} in
>>> +			aprofile)
>>>
>>>   				# Note that arm/t-aprofile is a
>>>   				# stand-alone make file fragment to be
>>>   				# used only with itself.  We do not
>>>   				# specifically use the
>>>   				# TM_MULTILIB_OPTION framework
>>>
>>> because
>>>
>>>   				# this shorthand is more
>>>
>>> -				# pragmatic. Additionally it is only
>>> -				# designed to work without any
>>> -				# with-cpu, with-arch with-mode
>>> +				# pragmatic.
>>> +				tmake_profile_file="arm/t-aprofile"
>>> +				;;
>>> +			default)
>>> +				;;
>>> +			*)
>>> +				echo "Error: --with-multilib-
>>> list=${with_multilib_list} not supported." 1>&2
>>> +				exit 1
>>> +				;;
>>> +			esac
>>> +
>>> +			if test "x${tmake_profile_file}" != x ; then
>>> +				# arm/t-aprofile is only designed to work
>>> +				# without any with-cpu, with-arch, with-
>>> mode,
>>>
>>>   				# with-fpu or with-float options.
>>>
>>> -					if test "x$with_arch" != x \
>>> -					    || test "x$with_cpu" != x \
>>> -					    || test "x$with_float" != x \
>>> -					    || test "x$with_fpu" != x \
>>> -					    || test "x$with_mode" != x ;
>>> then
>>> -					    echo "Error: You cannot use
>>> any of --with-arch/cpu/fpu/float/mode with --with-multilib-list=aprofile"
>>> 1>&2
>>> -					    exit 1
>>> -					fi
>>> -					tmake_file="${tmake_file}
>>> arm/t-aprofile"
>>> -					break
>>> -					;;
>>> -				default)
>>> -					;;
>>> -				*)
>>> -					echo "Error: --with-multilib-
>>> list=${with_multilib_list} not supported." 1>&2
>>> -					exit 1
>>> -					;;
>>> -				esac
>>> -			done
>>> +				if test "x$with_arch" != x \
>>> +				    || test "x$with_cpu" != x \
>>> +				    || test "x$with_float" != x \
>>> +				    || test "x$with_fpu" != x \
>>> +				    || test "x$with_mode" != x ; then
>>> +				    echo "Error: You cannot use any of --
>>> with-arch/cpu/fpu/float/mode with --with-multilib-list=${arm_multilib}"
>>> 1>&2
>>> +				    exit 1
>>> +				fi
>>> +
>>> +				tmake_file="${tmake_file}
>>> ${tmake_profile_file}"
>>> +			fi
>>>
>>>   		fi
>>>   		;;
>>>
>>> Tested with the following multilib lists:
>>>    + foo -> "Error: --with-multilib-list=foo not supported" as expected
>>>    + default,aprofile -> "Error: --with-multilib-list=default,aprofile not
>>>
>>> supported" as expected
>>>
>>>    + aprofile,default -> "Error: --with-multilib-list=aprofile,default not
>>>
>>> supported" as expected
>>>
>>>    + (nothing) -> libraries in $installdir/arm-none-eabi/lib{,fpu,thumb}
>>>    + default -> libraries in $installdir/arm-none-eabi/lib{,fpu,thumb} as
>>>
>>> expected
>>>
>>>    + aprofile -> $installdir/arm-none-eabi/lib contains all supported
>>>    multilib
>>>
>>> Is this ok for trunk?
>>>
>>> Best regards,
>>>
>>> Thomas

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [arm-embedded][PATCH, GCC/ARM, 2/3] Error out for incompatible ARM multilibs
  2016-04-29 15:07   ` Kyrill Tkachov
@ 2016-05-04 13:36     ` Thomas Preudhomme
  0 siblings, 0 replies; 6+ messages in thread
From: Thomas Preudhomme @ 2016-05-04 13:36 UTC (permalink / raw)
  To: Kyrill Tkachov; +Cc: gcc-patches, ramana.radhakrishnan, richard.earnshaw

On Friday 29 April 2016 16:07:23 Kyrill Tkachov wrote:

> 
> Ok for trunk.
> Thanks,
> Kyrill

Committed with the following obvious fix:


> 
> >>> diff --git a/gcc/config.gcc b/gcc/config.gcc
> >>> index 59aee2c..be3c720 100644
> >>> --- a/gcc/config.gcc
> >>> +++ b/gcc/config.gcc
> >>> @@ -3772,38 +3772,40 @@ case "${target}" in
> >>> 
> >>>   		# Add extra multilibs
> >>>   		if test "x$with_multilib_list" != x; then
> >>>   		
> >>>   			arm_multilibs=`echo $with_multilib_list | sed -e
> >>> 
> >>> 's/,/ /g'`
> >>> -			for arm_multilib in ${arm_multilibs}; do
> >>> -				case ${arm_multilib} in
> >>> -				aprofile)
> >>> +			case ${arm_multilibs} in
> >>> +			aprofile)
> >>> 
> >>>   				# Note that arm/t-aprofile is a
> >>>   				# stand-alone make file fragment to be
> >>>   				# used only with itself.  We do not
> >>>   				# specifically use the
> >>>   				# TM_MULTILIB_OPTION framework
> >>> 
> >>> because
> >>> 
> >>>   				# this shorthand is more
> >>> 
> >>> -				# pragmatic. Additionally it is only
> >>> -				# designed to work without any
> >>> -				# with-cpu, with-arch with-mode
> >>> +				# pragmatic.
> >>> +				tmake_profile_file="arm/t-aprofile"
> >>> +				;;
> >>> +			default)
> >>> +				;;
> >>> +			*)
> >>> +				echo "Error: --with-multilib-
> >>> list=${with_multilib_list} not supported." 1>&2
> >>> +				exit 1
> >>> +				;;
> >>> +			esac
> >>> +
> >>> +			if test "x${tmake_profile_file}" != x ; then
> >>> +				# arm/t-aprofile is only designed to work
> >>> +				# without any with-cpu, with-arch, with-
> >>> mode,
> >>> 
> >>>   				# with-fpu or with-float options.
> >>> 
> >>> -					if test "x$with_arch" != x \
> >>> -					    || test "x$with_cpu" != x \
> >>> -					    || test "x$with_float" != x \
> >>> -					    || test "x$with_fpu" != x \
> >>> -					    || test "x$with_mode" != x ;
> >>> then
> >>> -					    echo "Error: You cannot use
> >>> any of --with-arch/cpu/fpu/float/mode with
> >>> --with-multilib-list=aprofile"
> >>> 1>&2
> >>> -					    exit 1
> >>> -					fi
> >>> -					tmake_file="${tmake_file}
> >>> arm/t-aprofile"
> >>> -					break
> >>> -					;;
> >>> -				default)
> >>> -					;;
> >>> -				*)
> >>> -					echo "Error: --with-multilib-
> >>> list=${with_multilib_list} not supported." 1>&2
> >>> -					exit 1
> >>> -					;;
> >>> -				esac
> >>> -			done
> >>> +				if test "x$with_arch" != x \
> >>> +				    || test "x$with_cpu" != x \
> >>> +				    || test "x$with_float" != x \
> >>> +				    || test "x$with_fpu" != x \
> >>> +				    || test "x$with_mode" != x ; then
> >>> +				    echo "Error: You cannot use any of --
> >>> with-arch/cpu/fpu/float/mode with --with-multilib-list=${arm_multilib}"
> >>> 1>&2

Use ${with_multilib_list} instead of ${arm_multilib} which is not in scope 
here.

Best regards,

Thomas

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [arm-embedded][PATCH, GCC/ARM, 2/3] Error out for incompatible ARM multilibs
  2015-12-17  9:32 [arm-embedded][PATCH, GCC/ARM, 2/3] Error out for incompatible ARM multilibs Thomas Preud'homme
  2016-04-27 14:17 ` Thomas Preudhomme
@ 2016-11-22 14:43 ` Thomas Preudhomme
  1 sibling, 0 replies; 6+ messages in thread
From: Thomas Preudhomme @ 2016-11-22 14:43 UTC (permalink / raw)
  To: gcc-patches

Hi,

We decided to also apply this patch to the ARM embedded 6 branch.

Best regards,

Thomas

On 17/12/15 09:32, Thomas Preud'homme wrote:
> Hi,
>
> We decided to apply the following patch to the ARM embedded 5 branch.
>
> Best regards,
>
> Thomas
>
>> -----Original Message-----
>> From: gcc-patches-owner@gcc.gnu.org [mailto:gcc-patches-
>> owner@gcc.gnu.org] On Behalf Of Thomas Preud'homme
>> Sent: Wednesday, December 16, 2015 7:59 PM
>> To: gcc-patches@gcc.gnu.org; Richard Earnshaw; Ramana Radhakrishnan;
>> Kyrylo Tkachov
>> Subject: [PATCH, GCC/ARM, 2/3] Error out for incompatible ARM
>> multilibs
>>
>> Currently in config.gcc, only the first multilib in a multilib list is checked for
>> validity and the following elements are ignored due to the break which
>> only breaks out of loop in shell. A loop is also done over the multilib list
>> elements despite no combination being legal. This patch rework the code
>> to address both issues.
>>
>> ChangeLog entry is as follows:
>>
>>
>> 2015-11-24  Thomas Preud'homme  <thomas.preudhomme@arm.com>
>>
>>         * config.gcc: Error out when conflicting multilib is detected.  Do not
>>         loop over multilibs since no combination is legal.
>>
>>
>> diff --git a/gcc/config.gcc b/gcc/config.gcc
>> index 59aee2c..be3c720 100644
>> --- a/gcc/config.gcc
>> +++ b/gcc/config.gcc
>> @@ -3772,38 +3772,40 @@ case "${target}" in
>>  		# Add extra multilibs
>>  		if test "x$with_multilib_list" !=; then
>>  			arm_multilibs=cho $with_multilib_list | sed -e
>> 's/,/ /g'`
>> -			for arm_multilib in ${arm_multilibs}; do
>> -				case ${arm_multilib} in
>> -				aprofile)
>> +			case ${arm_multilibs} in
>> +			aprofile)
>>  				# Note that arm/t-aprofile is a
>>  				# stand-alone make file fragment to be
>>  				# used only with itself.  We do not
>>  				# specifically use the
>>  				# TM_MULTILIB_OPTION framework
>> because
>>  				# this shorthand is more
>> -				# pragmatic. Additionally it is only
>> -				# designed to work without any
>> -				# with-cpu, with-arch with-mode
>> +				# pragmatic.
>> +				tmake_profile_file=rm/t-aprofile"
>> +				;;
>> +			default)
>> +				;;
>> +			*)
>> +				echo "Error: --with-multilib-
>> list=with_multilib_list} not supported." 1>&2
>> +				exit 1
>> +				;;
>> +			esac
>> +
>> +			if test "x${tmake_profile_file}" != ; then
>> +				# arm/t-aprofile is only designed to work
>> +				# without any with-cpu, with-arch, with-
>> mode,
>>  				# with-fpu or with-float options.
>> -					if test "x$with_arch" != \
>> -					    || test "x$with_cpu" != \
>> -					    || test "x$with_float" != \
>> -					    || test "x$with_fpu" != \
>> -					    || test "x$with_mode" != ;
>> then
>> -					    echo "Error: You cannot use
>> any of --with-arch/cpu/fpu/float/mode with --with-multilib-list=rofile"
>> 1>&2
>> -					    exit 1
>> -					fi
>> -					tmake_file={tmake_file}
>> arm/t-aprofile"
>> -					break
>> -					;;
>> -				default)
>> -					;;
>> -				*)
>> -					echo "Error: --with-multilib-
>> list=with_multilib_list} not supported." 1>&2
>> -					exit 1
>> -					;;
>> -				esac
>> -			done
>> +				if test "x$with_arch" != \
>> +				    || test "x$with_cpu" != \
>> +				    || test "x$with_float" != \
>> +				    || test "x$with_fpu" != \
>> +				    || test "x$with_mode" != ; then
>> +				    echo "Error: You cannot use any of --
>> with-arch/cpu/fpu/float/mode with --with-multilib-list=arm_multilib}"
>> 1>&2
>> +				    exit 1
>> +				fi
>> +
>> +				tmake_file={tmake_file}
>> ${tmake_profile_file}"
>> +			fi
>>  		fi
>>  		;;
>>
>>
>> Tested with the following multilib lists:
>>   + foo -> "Error: --with-multilib-list=o not supported" as expected
>>   + default,aprofile -> "Error: --with-multilib-list�fault,aprofile not
>> supported" as expected
>>   + aprofile,default -> "Error: --with-multilib-list=rofile,default not
>> supported" as expected
>>   + (nothing) -> libraries in $installdir/arm-none-eabi/lib{,fpu,thumb}
>>   + default -> libraries in $installdir/arm-none-eabi/lib{,fpu,thumb} as
>> expected
>>   + aprofile -> $installdir/arm-none-eabi/lib contains all supported multilib
>>
>> Is this ok for trunk?
>>
>> Best regards,
>>
>> Thomas
>
>

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2016-11-22 14:43 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-12-17  9:32 [arm-embedded][PATCH, GCC/ARM, 2/3] Error out for incompatible ARM multilibs Thomas Preud'homme
2016-04-27 14:17 ` Thomas Preudhomme
2016-04-29  7:07   ` Jasmin J.
2016-04-29 15:07   ` Kyrill Tkachov
2016-05-04 13:36     ` Thomas Preudhomme
2016-11-22 14:43 ` Thomas Preudhomme

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).