Re: [PATCH 5/7] cgcc: add support for x86-x32

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 17/02/2019 15:31, Luc Van Oostenryck wrote:
> Detect when the target is x86-64 and use the appropriate flag '-mx32'.

Hmm, 'Detect when the target is 32-bit user-space on an x86-64 and
pass the appropriate '-mx32' flag.'

Maybe.

[I told you the comments were minor (apart from the last two
patches, of course). ;-) ]

ATB,
Ramsay Jones

> 
> Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@xxxxxxxxx>
> ---
>  cgcc | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/cgcc b/cgcc
> index 69380c60d..d178e3bc3 100755
> --- a/cgcc
> +++ b/cgcc
> @@ -356,7 +356,9 @@ sub add_specs {
>  	    return &add_specs ('ppc64+le');
>  	} elsif ($gccmachine =~ '^s390x-') {
>  	    return &add_specs ('s390x');
> -	} elsif ($gccmachine eq 'x86_64-linux-gnu') {
> +	} elsif ($gccmachine eq 'x86_64-linux-gnux32') {
> +	    return &add_specs ('x86_64') . ' -mx32';
> +	} elsif ($gccmachine =~ '^x86_64-') {
>  	    return &add_specs ('x86_64');
>  	}
>  
> 



[Index of Archives]     [Newbies FAQ]     [LKML]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Trinity Fuzzer Tool]

  Powered by Linux