diff mbox series

[1/7] cgcc: -dumpmachine should be fetched with '$ccom'

Message ID 20190217153131.94556-2-luc.vanoostenryck@gmail.com (mailing list archive)
State Mainlined, archived
Headers show
Series cgcc: use gcc -dumpmachine | expand

Commit Message

Luc Van Oostenryck Feb. 17, 2019, 3:31 p.m. UTC
The variable '$ccom' is used to hold the compiler command only
while '$cc' hold the compiler and it's options.

So, use '$ccom' to fetch '-dumpmachine' instead of '$cc'.

Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
---
 cgcc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/cgcc b/cgcc
index c42fee6de..456b97e37 100755
--- a/cgcc
+++ b/cgcc
@@ -322,7 +322,7 @@  sub add_specs {
 		&define_size_t ("long unsigned int") .
 		' -D__SIZEOF_POINTER__=' . ($m64 ? '8' : '4'));
     } elsif ($spec eq 'arm') {
-	chomp (my $gccmachine = `$cc -dumpmachine`);
+	chomp (my $gccmachine = `$ccom -dumpmachine`);
 	my $cppsymbols = ' -m32';
 
 	if ($gccmachine eq 'arm-linux-gnueabihf') {