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

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

 



Detect when the target is x86-64 and use the appropriate flag '-mx32'.

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');
 	}
 
-- 
2.20.0




[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