Repository: spack/spack

Issue:
Installation issue: julia (missing LLVM cpu mapping for 'zen')
Julia package uses LLVM-style CPU names.  PR #19549 added mapping for 'zen2' architecture, but omitted 'zen'.

### Steps to reproduce the issue

```console
$ spack install julia@1.5.4%gcc@8.4.0 +cxx ~mkl arch=linux-rhel8-zen
...    
    CC ui/repl.o
    LINK usr/bin/julia
Warning: git information unavailable; versioning information limited
    JULIA usr/lib/julia/corecompiler.ji
ERROR: Invalid CPU name zen.
make[1]: *** [sysimage.mk:61: /tmp/devspackswinst/spack-stage/spack-stage-julia-1.5.4-uxsnud6t4mvcfprlrvd7ecmlf3hh6vs4/spack-src/usr/lib/julia/corecompiler.ji] Error 1
make: *** [Makefile:81: julia-sysimg-ji] Error 2
```

### Information on your system

<!-- Please include the output of `spack debug report` -->
```console
spack debug report
* **Spack:** 0.16.1-2429-f5e6c32495
* **Python:** 3.6.8
* **Platform:** linux-rhel8-zen2
* **Concretizer:** original
```
(Although on a zen2 system, was using an older gcc which only supports zen, not zen2, hence the issue)

### Additional information

* [spack-build-01-install-out.txt](https://github.com/spack/spack/files/6593992/spack-build-01-install-out.txt)
* [spack-build-env.txt](https://github.com/spack/spack/files/6593993/spack-build-env.txt)
* [spack-build-out.txt](https://github.com/spack/spack/files/6593994/spack-build-out.txt)

Maintainers of julia: @glennpj 

### General information

- [x ] I have run `spack debug report` and reported the version of Spack/Python/Platform
- [x ] I have run `spack maintainers <name-of-the-package>` and @mentioned any maintainers
- [x ] I have uploaded the build log and environment files
- [x ] I have searched the issues of this repo and believe this is not a duplicate



Discussion:

Resolving patch:
diff --git a/var/spack/repos/builtin/packages/julia/package.py b/var/spack/repos/builtin/packages/julia/package.py
--- a/var/spack/repos/builtin/packages/julia/package.py
+++ b/var/spack/repos/builtin/packages/julia/package.py
@@ -20,7 +20,7 @@ class Julia(Package):
     version('master', branch='master')
     version('1.6.1', sha256='71d8e40611361370654e8934c407b2dec04944cf3917c5ecb6482d6b85ed767f')
     version('1.6.0', sha256='1b05f42c9368bc2349c47363b7ddc175a2da3cd162d52b6e24c4f5d4d6e1232c')
-    version('1.5.4', sha256='26a5f7d53a05c5f69a2877c3b489646807e0c0b29141ba90cd359aa1d37bf77b')
+    version('1.5.4', sha256='dbfb8cd544b223eff70f538da7bb9d5b6f76fd0b00dd2385e6254e74ad4e892f')
     version('1.5.3', sha256='fb69337ca037576758547c7eed9ae8f153a9c052318327b6b7f1917408c14d91')
     version('1.5.2', sha256='850aed3fe39057488ec633f29af705f5ada87e3058fd65e48ad26f91b713a19a')
     version('1.5.1', sha256='1d0debfccfc7cd07047aa862dd2b1a96f7438932da1f5feff6c1033a63f9b1d4')
@@ -168,6 +168,8 @@ def install(self, spec, prefix):
                 ]
             else:
                 target_str = str(spec.target).replace('_', '-')
+                if target_str == "zen":
+                    target_str = "znver1"
                 if target_str == "zen2":
                     target_str = "znver2"
                 options += [


Test patch: