diff mbox

[09/10] cgcc: use $ccom to set $multiarch_dir if not specified

Message ID 53DFD3A0.10106@ramsay1.demon.co.uk (mailing list archive)
State Mainlined, archived
Headers show

Commit Message

Ramsay Jones Aug. 4, 2014, 6:40 p.m. UTC
Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
---
 cgcc | 2 ++
 1 file changed, 2 insertions(+)
diff mbox

Patch

diff --git a/cgcc b/cgcc
index f330116..d7daa99 100755
--- a/cgcc
+++ b/cgcc
@@ -77,6 +77,8 @@  if ($do_check) {
     chomp($gcc_base_dir);  # possibly remove '\n' from compiler
     $check .= " -gcc-base-dir " . $gcc_base_dir if $gcc_base_dir;
 
+    $multiarch_dir = qx($ccom -print-multiarch) if ! defined $multiarch_dir;
+    chomp($multiarch_dir);  # possibly remove '\n' from compiler
     $check .= " -multiarch-dir " . $multiarch_dir if $multiarch_dir;
 
     print "$check\n" if $verbose;