MaskRay wrote:

> @FHe
> 
> > > > @MaskRay Got it.
> > > > The problem with that solution is that if you use --target you won't 
> > > > get the correct arch. This would be a problem for any cross 
> > > > compilation. For example, say you cross compile from zLinux (which 
> > > > wouldn't have the config file), the arch would be arch8. And if you 
> > > > cross compiled from z/OS (with the config file) to zLinux then the 
> > > > default arch would be arch10. Both of these would be incorrect.
> > > > We also use the config files for installation specific information. It 
> > > > is common for users to have their own config files. If we require that 
> > > > the option be in the config file then we would be creating a very error 
> > > > prone situation.
> > > > We need to be able to change the arch default based on the target 
> > > > triple.
> > > 
> > > 
> > > Sorry for the late reply. Such driver defaults via cmake variable would 
> > > make testing brittle. Users expect that `check-clang` pass regardless of 
> > > the cmake variable setting. If a test changes behavior due to different 
> > > `-march=`, there are a few choices:
> > > 
> > > * add a `REQUIRES: zos-new-default-march` directive
> > > * hard code a `-march=`
> > > 
> > > Neither is immediately noticeable. In the past clang/test/Driver has had 
> > > many such tests that require fixup. We have tried removing some 
> > > unnecessary `CLANG_DEFAULT_*`.
> > 
> > 
> > I just realized that 
> > [reviews.llvm.org/D75914](https://reviews.llvm.org/D75914) added 
> > `CLANG_SYSTEMZ_DEFAULT_ARCH` for Ubuntu. @xnox @uweigand
> > I think we want to avoid such CMake options/clang `config.h`
> > As an alternative, if the clang executable is at `/tmp/Rel/bin/clang`, you 
> > can add `/tmp/Rel/bin/s390x-unknown-linux-gnu.cfg` with content 
> > `-march=z13`.
> > Once we drop `CLANG_SYSTEMZ_DEFAULT_ARCH`, the `config.h` include will not 
> > be needed.
> 
> I don't understand your proposal. In Ubuntu we need to set built-in default 
> arch value, to a higher one than upstream has it at, for all builds without 
> any toolchain configs. Such that any builds with any toolchain configs by 
> default target a higher arch setting.
> 
> arch10 is way too old and slow.
> 
> and z13 might not be enough either for latest devel distributions, i.e. next 
> development ubuntu release may be bumping further above z13.
> 
> Does your proposal address above needs?

Yes. See this part:

> As an alternative, if the clang executable is at /tmp/Rel/bin/clang, you can 
> add /tmp/Rel/bin/s390x-unknown-linux-gnu.cfg with content -march=z13.

We should then remove  CLANG_SYSTEMZ_DEFAULT_ARCH 
(https://reviews.llvm.org/D75914)

https://github.com/llvm/llvm-project/pull/89854
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to