https://github.com/rorth closed https://github.com/llvm/llvm-project/pull/65644
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/banach-space approved this pull request.
LGTM, thanks for all the improvements!
Before merging, could you update the summary and briefly mention the additional
changes made here? Otherwise people might think that these changes are
required, but that's not strictly the case.
https://github.com/rorth updated https://github.com/llvm/llvm-project/pull/65644
>From 31bdd3477d9f54996b71584598bdd75f2cef31db Mon Sep 17 00:00:00 2001
From: Rainer Orth
Date: Thu, 7 Sep 2023 19:19:32 +0200
Subject: [PATCH 1/3] [Driver] Link Flang runtime on Solaris
I noticed that `flang-new`
@@ -21,12 +22,12 @@
! run on any other platform, such as Windows that use a .exe
! suffix. Clang's driver will try to resolve the path to the ld
! executable and may find the GNU linker from MinGW or Cygwin.
-! GNU-LABEL: "{{.*}}ld{{(\.exe)?}}"
-! GNU-SAME: "
@@ -2,8 +2,9 @@
! invocation. These libraries are added on top of other standard runtime
! libraries that the Clang driver will include.
-! RUN: %flang -### -target ppc64le-linux-gnu %S/Inputs/hello.f90 2>&1 |
FileCheck %s --check-prefixes=CHECK,GNU
+! RUN: %flang -### -targe
@@ -2,8 +2,9 @@
! invocation. These libraries are added on top of other standard runtime
! libraries that the Clang driver will include.
-! RUN: %flang -### -target ppc64le-linux-gnu %S/Inputs/hello.f90 2>&1 |
FileCheck %s --check-prefixes=CHECK,GNU
+! RUN: %flang -### -targe
@@ -21,12 +22,12 @@
! run on any other platform, such as Windows that use a .exe
! suffix. Clang's driver will try to resolve the path to the ld
! executable and may find the GNU linker from MinGW or Cygwin.
-! GNU-LABEL: "{{.*}}ld{{(\.exe)?}}"
-! GNU-SAME: "
llvmbot wrote:
@llvm/pr-subscribers-clang
Author: Rainer Orth (rorth)
Changes
I noticed that `flang-new` cannot link Fortran executables on Solaris since the
runtime libs are missing.
This patch fixes this, following `Gnu.cpp`. The `linker-flags.f90` testcase is
augmented to test for t
https://github.com/rorth updated https://github.com/llvm/llvm-project/pull/65644
>From 31bdd3477d9f54996b71584598bdd75f2cef31db Mon Sep 17 00:00:00 2001
From: Rainer Orth
Date: Thu, 7 Sep 2023 19:19:32 +0200
Subject: [PATCH 1/2] [Driver] Link Flang runtime on Solaris
I noticed that `flang-new`
brad0 wrote:
> * renaming the current label from `GNU` to e.g. `UNIX` would be correct.
That would be fine with me.
https://github.com/llvm/llvm-project/pull/65644
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/
rorth wrote:
> I feel that we are bike-shedding here a bit. Please prioritise correctness -
> using `GNU` as a label for Solaris would not be correct. The following would
> be:
>
> * duplicating tests with a different label (e.g. `SOLARIS`) would be
> correct,
>
> * renaming the curr
banach-space wrote:
> > Agreed: AFAICS the only open issue is whether the Solaris test should use
> > the `GNU` label as I have done, introduce an new common one (like `UNIX`;
> > there's nothing GNU-specific in that test), or really introduce a separate
> > copy of the check under a different
brad0 wrote:
> Agreed: AFAICS the only open issue is whether the Solaris test should use the
> `GNU` label as I have done, introduce an new common one (like `UNIX`; there's
> nothing GNU-specific in that test), or really introduce a separate copy of
> the check under a different label per targ
rorth wrote:
> I'd like for this to move forward.
Agreed: AFAICS the only open issue is whether the Solaris test should use the
`GNU` label as I have done, introduce an new common one (like `UNIX`; there's
nothing GNU-specific in that test), or really introduce a separate copy of the
check un
rorth wrote:
> > I wonder how to proceed with the patch at hand.
>
> I'm not a Solaris expert, but based on this discussion I'd consider adding
> support for `-fuse-ld` in Flang. This sort of changes are often as simple as
> updating Options.td. Same for `-r`.
Support of `-fuse-ld` is not Sol
brad0 wrote:
I'd like for this to move forward.
https://github.com/llvm/llvm-project/pull/65644
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
banach-space wrote:
> I wonder how to proceed with the patch at hand.
I'm not a Solaris expert, but based on this discussion I'd consider adding
support for `-fuse-ld` in Flang. This sort of changes are often as simple as
updating Options.td. Same for `-r`.
One important rule of thumb that I'
rorth wrote:
The different behaviour can easily be seen since Solaris `clang` supports
linker selection at compile time:
```
$ clang -r -o hello-r.o hello.o -fuse-ld=gld
/usr/gnu/bin/ld: warning: cannot find entry symbol _start; not setting start
address
$ clang -r -o hello-r.o hello.o
ld: fata
brad0 wrote:
> On top of that, Solaris `clang` doesn't handle `-r` correctly, passing `-e
> _start -Bdynamic` to `ld`, which makes it choke...
Looking at the GNU linker it seems to ignore -Bdynamic once -r is specified.
Not sure how LLD handles things. The OpenBSD driver might need adjustments
rorth wrote:
I'd argue that handling the Flang runtime libs like C++ is the right thing to
do here. However, `flang-new` currently rejects all of `-r`, `-nostdlib`, and
`-nodefaultlibs` on both Linux and Solaris. On top of that, Solaris `clang`
doesn't handle `-r` correctly, passing `-e _sta
https://github.com/brad0 deleted https://github.com/llvm/llvm-project/pull/65644
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/brad0 deleted https://github.com/llvm/llvm-project/pull/65644
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/brad0 deleted https://github.com/llvm/llvm-project/pull/65644
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
brad0 wrote:
Because of where the chunk is being added in the Solaris ToolChain (and what I
had in my tree for *BSD's) it is checking for the ```nostdlib, nodefaultlibs,
or r``` flags, where as the Gnu path does not. I just want to make sure the
behavior is consistent.
tools::gnutools::Linker
https://github.com/brad0 deleted https://github.com/llvm/llvm-project/pull/65644
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
brad0 wrote:
One thing to add to this. I noticed the Gnu addition does not check for
`nostdlib, nodefaultlibs, or r` flags like the C++ library chunk does. With the
proposed diff and what I had initially being right under the C++ chunk in the
Solaris and *BSD ToolChain they would be checking f
https://github.com/brad0 deleted https://github.com/llvm/llvm-project/pull/65644
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -4,6 +4,7 @@
! RUN: %flang -### -target ppc64le-linux-gnu %S/Inputs/hello.f90 2>&1 |
FileCheck %s --check-prefixes=CHECK,GNU
! RUN: %flang -### -target aarch64-apple-darwin %S/Inputs/hello.f90 2>&1 |
FileCheck %s --check-prefixes=CHECK,DARWIN
+! RUN: %flang -### -target s
https://github.com/brad0 edited https://github.com/llvm/llvm-project/pull/65644
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -4,6 +4,7 @@
! RUN: %flang -### -target ppc64le-linux-gnu %S/Inputs/hello.f90 2>&1 |
FileCheck %s --check-prefixes=CHECK,GNU
! RUN: %flang -### -target aarch64-apple-darwin %S/Inputs/hello.f90 2>&1 |
FileCheck %s --check-prefixes=CHECK,DARWIN
+! RUN: %flang -### -target s
@@ -4,6 +4,7 @@
! RUN: %flang -### -target ppc64le-linux-gnu %S/Inputs/hello.f90 2>&1 |
FileCheck %s --check-prefixes=CHECK,GNU
! RUN: %flang -### -target aarch64-apple-darwin %S/Inputs/hello.f90 2>&1 |
FileCheck %s --check-prefixes=CHECK,DARWIN
+! RUN: %flang -### -target s
@@ -4,6 +4,7 @@
! RUN: %flang -### -target ppc64le-linux-gnu %S/Inputs/hello.f90 2>&1 |
FileCheck %s --check-prefixes=CHECK,GNU
! RUN: %flang -### -target aarch64-apple-darwin %S/Inputs/hello.f90 2>&1 |
FileCheck %s --check-prefixes=CHECK,DARWIN
+! RUN: %flang -### -target s
@@ -4,6 +4,7 @@
! RUN: %flang -### -target ppc64le-linux-gnu %S/Inputs/hello.f90 2>&1 |
FileCheck %s --check-prefixes=CHECK,GNU
! RUN: %flang -### -target aarch64-apple-darwin %S/Inputs/hello.f90 2>&1 |
FileCheck %s --check-prefixes=CHECK,DARWIN
+! RUN: %flang -### -target s
@@ -4,6 +4,7 @@
! RUN: %flang -### -target ppc64le-linux-gnu %S/Inputs/hello.f90 2>&1 |
FileCheck %s --check-prefixes=CHECK,GNU
! RUN: %flang -### -target aarch64-apple-darwin %S/Inputs/hello.f90 2>&1 |
FileCheck %s --check-prefixes=CHECK,DARWIN
+! RUN: %flang -### -target s
@@ -4,6 +4,7 @@
! RUN: %flang -### -target ppc64le-linux-gnu %S/Inputs/hello.f90 2>&1 |
FileCheck %s --check-prefixes=CHECK,GNU
! RUN: %flang -### -target aarch64-apple-darwin %S/Inputs/hello.f90 2>&1 |
FileCheck %s --check-prefixes=CHECK,DARWIN
+! RUN: %flang -### -target s
@@ -4,6 +4,7 @@
! RUN: %flang -### -target ppc64le-linux-gnu %S/Inputs/hello.f90 2>&1 |
FileCheck %s --check-prefixes=CHECK,GNU
! RUN: %flang -### -target aarch64-apple-darwin %S/Inputs/hello.f90 2>&1 |
FileCheck %s --check-prefixes=CHECK,DARWIN
+! RUN: %flang -### -target s
@@ -4,6 +4,7 @@
! RUN: %flang -### -target ppc64le-linux-gnu %S/Inputs/hello.f90 2>&1 |
FileCheck %s --check-prefixes=CHECK,GNU
! RUN: %flang -### -target aarch64-apple-darwin %S/Inputs/hello.f90 2>&1 |
FileCheck %s --check-prefixes=CHECK,DARWIN
+! RUN: %flang -### -target s
https://github.com/rorth edited https://github.com/llvm/llvm-project/pull/65644
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -4,6 +4,7 @@
! RUN: %flang -### -target ppc64le-linux-gnu %S/Inputs/hello.f90 2>&1 |
FileCheck %s --check-prefixes=CHECK,GNU
! RUN: %flang -### -target aarch64-apple-darwin %S/Inputs/hello.f90 2>&1 |
FileCheck %s --check-prefixes=CHECK,DARWIN
+! RUN: %flang -### -target s
@@ -4,6 +4,7 @@
! RUN: %flang -### -target ppc64le-linux-gnu %S/Inputs/hello.f90 2>&1 |
FileCheck %s --check-prefixes=CHECK,GNU
! RUN: %flang -### -target aarch64-apple-darwin %S/Inputs/hello.f90 2>&1 |
FileCheck %s --check-prefixes=CHECK,DARWIN
+! RUN: %flang -### -target s
https://github.com/github-actions[bot] labeled
https://github.com/llvm/llvm-project/pull/65644
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/github-actions[bot] labeled
https://github.com/llvm/llvm-project/pull/65644
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/github-actions[bot] labeled
https://github.com/llvm/llvm-project/pull/65644
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/rorth review_requested
https://github.com/llvm/llvm-project/pull/65644
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/rorth created
https://github.com/llvm/llvm-project/pull/65644:
I noticed that `flang-new` cannot link Fortran executables on Solaris since the
runtime libs are missing.
This patch fixes this, following `Gnu.cpp`. The `linker-flags.f90` testcase is
augmented to test for thi
https://github.com/rorth review_requested
https://github.com/llvm/llvm-project/pull/65644
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/rorth review_requested
https://github.com/llvm/llvm-project/pull/65644
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
47 matches
Mail list logo