Repository: spack/spack

Issue:
Installation issue: m4 (failures in system headers with %intel@20)
<!-- Thanks for taking the time to report this build failure. To proceed with the report please:

1. Title the issue "Installation issue: <name-of-the-package>".
2. Provide the information required below.

We encourage you to try, as much as possible, to reduce your problem to the minimal example that still reproduces the issue. That would help us a lot in fixing it quickly and effectively! -->

This appears similar to #18854, in that getting (the same) odd errors in system header files
when compiling with intel@20.  Again, the issue appears to be due to the inclusion of a
"--no-gcc" flag by the package.  Presumably such was needed with older intel compilers, but does not appear needed with recent ones.

### Steps to reproduce the issue

<!-- Fill in the exact spec you are trying to build and the relevant part of the error message -->
```console
$ spack install  m4@1.4.18%intel@20.0.1 cflags="-gcc-name=/usr/bin/gcc" cxxflags="-gxx-name=/usr/bin/g++" fflags="-gcc-name=/usr/bin/gcc" +sigsegv
```
fails, with errors like
```console
  >> 986     /usr/include/bits/floatn-common.h(268): error: invalid combination of type specifiers
     987       typedef double _Float32x;
```

### Information on your system
```console
 spack debug report
* **Spack:** 0.14.2
* **Python:** 3.6.8
* **Platform:** linux-rhel8-ivybridge
```

<!-- Please include the output of `spack debug report` -->

<!-- If you have any relevant configuration detail (custom `packages.yaml` or `modules.yaml`, etc.) you can add that here as well. -->

### Additional information

<!-- Please upload the following files. They should be present in the stage directory of the failing build. Also upload any config.log or similar file if one exists. -->
* [spack-build-env.txt](https://github.com/spack/spack/files/5269267/spack-build-env.txt)
* [spack-build-out.txt](https://github.com/spack/spack/files/5269268/spack-build-out.txt)

<!-- Some packages have maintainers who have volunteered to debug build failures. Run `spack maintainers <name-of-the-package>` and @mention them here if they exist. -->
No maintainers
### General information

<!-- These boxes can be checked by replacing [ ] with [x] or by clicking them after submitting the issue. -->
- [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/m4/package.py b/var/spack/repos/builtin/packages/m4/package.py
--- a/var/spack/repos/builtin/packages/m4/package.py
+++ b/var/spack/repos/builtin/packages/m4/package.py
@@ -60,7 +60,7 @@ def configure_args(self):
         if spec.satisfies('%fj') and not spec.satisfies('platform=darwin'):
             args.append('LDFLAGS=-rtlib=compiler-rt')
 
-        if spec.satisfies('%intel'):
+        if spec.satisfies('%intel@:18.999'):
             args.append('CFLAGS=-no-gcc')
 
         if '+sigsegv' in spec:
@@ -72,7 +72,7 @@ def configure_args(self):
         # http://lists.gnu.org/archive/html/bug-m4/2016-09/msg00002.html
         arch = spec.architecture
         if (arch.platform == 'darwin' and arch.os == 'sierra' and
-            '%gcc' in spec):
+                '%gcc' in spec):
             args.append('ac_cv_type_struct_sched_param=yes')
 
         return args


Test patch: