Skip to content

Commit 5a76017

Browse files
tskeithjeanPerier
authored andcommitted
Fix -rpath for macos
The linker on macos doesn't accept `-rpath=...`, it wants the library as a separate argument. That seems to work okay on linux too. Also replace `%temp` with `%t` where that was intended.
1 parent ec2c3ee commit 5a76017

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

flang/test/Examples/hello.f90

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
! default when they are available.
44

55
! RUN: bbc %s -o - | tco | llc --relocation-model=pic --filetype=obj -o %t.o
6-
! RUN: %CC %t.o -L%L -Wl,-rpath=%L -lFortran_main -lFortranRuntime -lFortranDecimal -lm -o hello
6+
! RUN: %CC %t.o -L%L -Wl,-rpath -Wl,%L -lFortran_main -lFortranRuntime -lFortranDecimal -lm -o hello
77
! RUN: ./hello | FileCheck %s
88

99
! CHECK: Hello, World!

flang/test/Lower/associate-construct.f90

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
! RUN: bbc %s -o - | tco | llc --relocation-model=pic --filetype=obj -o %t.o
2-
! RUN: %CC %t.o -L%L -Wl,-rpath=%L -lFortran_main -lFortranRuntime -lFortranDecimal -lm -o %t.out
2+
! RUN: %CC %t.o -L%L -Wl,-rpath -Wl,%L -lFortran_main -lFortranRuntime -lFortranDecimal -lm -o %t.out
33
! RUN: %t.out | FileCheck %s
44

55
program p

flang/test/Lower/end-to-end-always-exec-loopbody.f90

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
! RUN: bbc --always-execute-loop-body %s -o - | tco | llc --relocation-model=pic --filetype=obj -o %temp.o
2-
! RUN: %CC %temp.o -L%L -Wl,-rpath=%L -lFortran_main -lFortranRuntime -lFortranDecimal -lm -o %temp.loop
3-
! RUN: %temp.loop | FileCheck %s
1+
! RUN: bbc --always-execute-loop-body %s -o - | tco | llc --relocation-model=pic --filetype=obj -o %t.o
2+
! RUN: %CC %t.o -L%L -Wl,-rpath -Wl,%L -lFortran_main -lFortranRuntime -lFortranDecimal -lm -o %t.loop
3+
! RUN: %t.loop | FileCheck %s
44

55
program alwaysexecuteloopbody
66
implicit none

0 commit comments

Comments
 (0)