From a30fbde2c90a46d37f24a47006fc0822a2a9ade7 Mon Sep 17 00:00:00 2001 From: Nick Curtis Date: Tue, 8 Jun 2021 14:24:22 -0400 Subject: [PATCH] SWDEV-290252 - Fix for incorrect call to ar in mixed shared / static link Corrects an invalid call to 'ar', which results in link failures for mixed shared and static link invocations using hipcc. Change-Id: I51c33438106af066a13e5ff9533721cdc326790d [ROCm/hip commit: 6d20ee19c7cb650273ad978d9a5523b62e15b3c8] --- projects/hip/bin/hipcc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/projects/hip/bin/hipcc b/projects/hip/bin/hipcc index 2f290fbe68..8915ce2289 100755 --- a/projects/hip/bin/hipcc +++ b/projects/hip/bin/hipcc @@ -428,7 +428,7 @@ foreach $arg (@ARGV) } elsif ($realObjs) { my($libBaseName, $libDir, $libExt) = fileparse($libFile); $libBaseName = mktemp($libBaseName . "XXXX") . $libExt; - system("cd $tmpdir; ar c $libBaseName $realObjs"); + system("cd $tmpdir; ar rc $libBaseName $realObjs"); print $out "$tmpdir/$libBaseName\n"; } } elsif ($line =~ m/\.o$/) { @@ -490,7 +490,7 @@ foreach $arg (@ARGV) } elsif ($realObjs) { my($libBaseName, $libDir, $libExt) = fileparse($libFile); $libBaseName = mktemp($libBaseName . "XXXX") . $libExt; - system("cd $tmpdir; ar c $libBaseName $realObjs"); + system("cd $tmpdir; ar rc $libBaseName $realObjs"); $new_arg .= " $tmpdir/$libBaseName"; } $arg = "$new_arg";