Repository: spack/spack

Issue:
hpx@1.9.0 fails build on ARM64: coroutines/detail/context_linux_x86.hpp: error: static assertion failed: static_assert(sizeof(void*) == 4);
### Steps to reproduce the issue

`hpx@1.9.0 networking=mpi` build fails using:
* `spack@develop` (09e1258ed42f00ea9bde9857f233eeda5c61a895 from `Sat Jul 8 15:36:27 2023 -0500`)
* GCC 11.1.0
* Ubuntu 20.04, ARM64

Spack environment: [spack.yaml.txt](https://github.com/spack/spack/files/11992633/spack.yaml.txt)

<details><summary>Concretization</summary>
<pre>
 -   ldehaqw  hpx@1.9.0%gcc@11.1.0~async_cuda~async_mpi~cuda~examples~generic_coroutines~ipo~rocm~tools build_system=cmake build_type=Release cxxstd=17 generator=ninja instrumentation=none malloc=tcmalloc max_cpu_count=64 networking=mpi arch=linux-ubuntu20.04-aarch64
[+]  5oxmqja      ^asio@1.28.0%gcc@11.1.0~boost_coroutine~boost_regex~separate_compilation build_system=autotools cxxstd=17 arch=linux-ubuntu20.04-aarch64
[+]  qbsn4gd          ^autoconf@2.69%gcc@11.1.0 build_system=autotools patches=35c4492,7793209,a49dd5b arch=linux-ubuntu20.04-aarch64
[+]  2e2so7h          ^automake@1.16.5%gcc@11.1.0 build_system=autotools arch=linux-ubuntu20.04-aarch64
[+]  67iy4j5          ^gnuconfig@2022-09-17%gcc@11.1.0 build_system=generic arch=linux-ubuntu20.04-aarch64
[+]  jkbd2o4          ^libtool@2.4.7%gcc@11.1.0 build_system=autotools arch=linux-ubuntu20.04-aarch64
[+]  uhlwdot          ^m4@1.4.19%gcc@11.1.0+sigsegv build_system=autotools patches=9dc5fbd,bfdffa7 arch=linux-ubuntu20.04-aarch64
[+]  xx5z4xk              ^diffutils@3.9%gcc@11.1.0 build_system=autotools arch=linux-ubuntu20.04-aarch64
[+]  gbmzhic              ^libsigsegv@2.14%gcc@11.1.0 build_system=autotools arch=linux-ubuntu20.04-aarch64
[+]  ywqxz7k      ^boost@1.79.0%gcc@11.1.0+atomic+chrono~clanglibcpp+container~context~contract~coroutine+date_time~debug+exception~fiber+filesystem+graph~graph_parallel~icu+iostreams~json+locale+log+math+mpi+multithreaded~nowide~numpy~pic+program_options~python+random+regex+serialization+shared+signals~singlethreaded+stacktrace+system~taggedlayout+test+thread+timer~type_erasure~versionedlayout+wave build_system=generic cxxstd=17 patches=a440f96,b8569d7 visibility=global arch=linux-ubuntu20.04-aarch64
[+]  hcntjnj          ^bzip2@1.0.8%gcc@11.1.0~debug~pic+shared build_system=generic arch=linux-ubuntu20.04-aarch64
[+]  izauomq          ^xz@5.4.1%gcc@11.1.0+pic build_system=autotools libs=shared,static arch=linux-ubuntu20.04-aarch64
[+]  c7nojld          ^zlib@1.2.13%gcc@11.1.0+optimize+pic+shared build_system=makefile arch=linux-ubuntu20.04-aarch64
[+]  dzvxsh7          ^zstd@1.5.5%gcc@11.1.0+programs build_system=makefile compression=none libs=shared,static arch=linux-ubuntu20.04-aarch64
[+]  cib64fo      ^cmake@3.26.3%gcc@11.1.0~doc+ncurses+ownlibs~qt build_system=generic build_type=Release arch=linux-ubuntu20.04-aarch64
[+]  tq4s2d2          ^ncurses@6.3%gcc@11.1.0~symlinks+termlib abi=none build_system=autotools arch=linux-ubuntu20.04-aarch64
[+]  2yo52cd          ^openssl@1.1.1u%gcc@11.1.0~docs~shared build_system=generic certs=mozilla arch=linux-ubuntu20.04-aarch64
[+]  esd7eb6              ^ca-certificates-mozilla@2023-01-10%gcc@11.1.0 build_system=generic arch=linux-ubuntu20.04-aarch64
[+]  ium5qg6      ^git@2.40.0%gcc@11.1.0+man+nls+perl+subtree~svn~tcltk build_system=autotools arch=linux-ubuntu20.04-aarch64
[+]  cw5x6vs          ^curl@8.1.2%gcc@11.1.0~gssapi~ldap~libidn2~librtmp~libssh~libssh2~nghttp2 build_system=autotools libs=shared,static tls=openssl arch=linux-ubuntu20.04-aarch64
[+]  ljb5exf          ^expat@2.5.0%gcc@11.1.0+libbsd build_system=autotools arch=linux-ubuntu20.04-aarch64
[+]  euclh35              ^libbsd@0.11.7%gcc@11.1.0 build_system=autotools arch=linux-ubuntu20.04-aarch64
[+]  oms2klk                  ^libmd@1.0.4%gcc@11.1.0 build_system=autotools arch=linux-ubuntu20.04-aarch64
[+]  vy4wcv5          ^gettext@0.21.1%gcc@11.1.0+bzip2+curses+git~libunistring+libxml2+tar+xz build_system=autotools arch=linux-ubuntu20.04-aarch64
[+]  fxfhemw              ^tar@1.34%gcc@11.1.0 build_system=autotools zip=pigz arch=linux-ubuntu20.04-aarch64
[+]  h3c7ba6                  ^pigz@2.7%gcc@11.1.0 build_system=makefile arch=linux-ubuntu20.04-aarch64
[+]  hrknc7y          ^libiconv@1.17%gcc@11.1.0 build_system=autotools libs=shared,static arch=linux-ubuntu20.04-aarch64
[+]  wqzdi3b          ^libidn2@2.3.4%gcc@11.1.0 build_system=autotools arch=linux-ubuntu20.04-aarch64
[+]  itbixnx              ^libunistring@1.1%gcc@11.1.0 build_system=autotools arch=linux-ubuntu20.04-aarch64
[+]  avkdbtt          ^openssh@9.3p1%gcc@11.1.0+gssapi build_system=autotools arch=linux-ubuntu20.04-aarch64
[+]  r4u3ira              ^krb5@1.20.1%gcc@11.1.0+shared build_system=autotools arch=linux-ubuntu20.04-aarch64
[+]  e4sewoc                  ^bison@3.8.2%gcc@11.1.0 build_system=autotools arch=linux-ubuntu20.04-aarch64
[+]  yepkzgk              ^libedit@3.1-20210216%gcc@11.1.0 build_system=autotools arch=linux-ubuntu20.04-aarch64
[+]  wku63pi          ^pcre2@10.42%gcc@11.1.0~jit+multibyte build_system=autotools arch=linux-ubuntu20.04-aarch64
[+]  x52hmjj          ^perl@5.38.0%gcc@11.1.0+cpanm+open+shared+threads build_system=generic arch=linux-ubuntu20.04-aarch64
[+]  rke2xrc              ^berkeley-db@18.1.40%gcc@11.1.0+cxx~docs+stl build_system=autotools patches=26090f4,b231fcc arch=linux-ubuntu20.04-aarch64
[+]  ue3q3ey      ^gperftools@2.10%gcc@11.1.0+debugalloc~dynamic_sized_delete_support+libunwind~sized_delete build_system=autotools arch=linux-ubuntu20.04-aarch64
[+]  xcgji7w          ^libunwind@1.6.2%gcc@11.1.0~block_signals~conservative_checks~cxx_exceptions~debug~debug_frame+docs+pic+tests+weak_backtrace+xz~zlib build_system=autotools components=none libs=shared,static arch=linux-ubuntu20.04-aarch64
[+]  xirl3tc      ^hwloc@2.9.1%gcc@11.1.0~cairo~cuda~gl~libudev+libxml2~netloc~nvml~oneapi-level-zero~opencl+pci~rocm build_system=autotools libs=shared,static arch=linux-ubuntu20.04-aarch64
[+]  rn4yory          ^libpciaccess@0.17%gcc@11.1.0 build_system=autotools arch=linux-ubuntu20.04-aarch64
[+]  ywapq5v              ^util-macros@1.19.3%gcc@11.1.0 build_system=autotools arch=linux-ubuntu20.04-aarch64
[+]  k5yt2z5          ^libxml2@2.10.3%gcc@11.1.0~python build_system=autotools arch=linux-ubuntu20.04-aarch64
[+]  la56q6q      ^mpich@4.1.1%gcc@11.1.0~argobots~cuda+fortran~hwloc+hydra+libxml2+pci~rocm+romio~slurm~two_level_namespace~vci~verbs~wrapperrpath build_system=autotools datatype-engine=auto device=ch4 netmod=ofi pmi=pmi arch=linux-ubuntu20.04-aarch64
[+]  jyhftkv          ^findutils@4.9.0%gcc@11.1.0 build_system=autotools patches=440b954 arch=linux-ubuntu20.04-aarch64
[+]  wr2tvqh          ^libfabric@1.18.1%gcc@11.1.0~debug~kdreg build_system=autotools fabrics=rxm,sockets,tcp,udp arch=linux-ubuntu20.04-aarch64
[+]  g33gvtp          ^yaksa@0.2%gcc@11.1.0~cuda~rocm build_system=autotools arch=linux-ubuntu20.04-aarch64
[+]  lg2vzqm      ^ninja@1.11.1%gcc@11.1.0+re2c build_system=generic arch=linux-ubuntu20.04-aarch64
[+]  glttrzx          ^re2c@2.2%gcc@11.1.0 build_system=generic arch=linux-ubuntu20.04-aarch64
[+]  352xzo3      ^pkgconf@1.9.5%gcc@11.1.0 build_system=autotools arch=linux-ubuntu20.04-aarch64
[+]  5crj7v2      ^python@3.10.12%gcc@11.1.0+bz2+crypt+ctypes+dbm~debug+libxml2+lzma~nis~optimizations+pic+pyexpat+pythoncmd+readline+shared+sqlite3+ssl~tkinter+uuid+zlib build_system=generic patches=0d98e93,7d40923,f2fd060 arch=linux-ubuntu20.04-aarch64
[+]  qhmcs6x          ^gdbm@1.23%gcc@11.1.0 build_system=autotools arch=linux-ubuntu20.04-aarch64
[+]  amu3day          ^libffi@3.4.4%gcc@11.1.0 build_system=autotools arch=linux-ubuntu20.04-aarch64
[+]  rqy5l5i          ^libxcrypt@4.4.35%gcc@11.1.0~obsolete_api build_system=autotools patches=4885da3 arch=linux-ubuntu20.04-aarch64
[+]  rugrrau          ^readline@8.2%gcc@11.1.0 build_system=autotools patches=bbf97f1 arch=linux-ubuntu20.04-aarch64
[+]  nxqd2ih          ^sqlite@3.42.0%gcc@11.1.0+column_metadata+dynamic_extensions+fts~functions+rtree build_system=autotools arch=linux-ubuntu20.04-aarch64
[+]  2jofsst          ^util-linux-uuid@2.38.1%gcc@11.1.0 build_system=autotools arch=linux-ubuntu20.04-aarch64
</pre>
</details>

Error:
```
$> spack -e . install
...
==> Installing hpx-1.9.0-ldehaqw5ez3vznp2x2qfhyogvz2hylyn
==> No binary for hpx-1.9.0-ldehaqw5ez3vznp2x2qfhyogvz2hylyn found: installing from source
==> Using cached archive: /spack/var/spack/cache/_source-cache/archive/2a/2a8dca78172fbb15eae5a5e9facf26ab021c845f9c09e61b1912e6cf9e72915a.tar.gz
==> No patches needed for hpx
==> hpx: Executing phase: 'cmake'
==> hpx: Executing phase: 'build'
==> Error: ProcessError: Command exited with status 1:
    '/spack/opt/spack/linux-ubuntu20.04-aarch64/gcc-11.1.0/ninja-1.11.1-lg2vzqmbdfh3y6bza6s7hgdbqqfudlyw/bin/ninja' '-j32' '-v'
...
  >> 327    FAILED: libs/core/coroutines/CMakeFiles/hpx_coroutines.dir/src/detail/coroutine_self.cpp.o
     328    /spack/lib/spack/env/gcc/g++ -DHPX_CORE_EXPORTS -DNDEBUG -D_GNU_SOURCE -I/tmp/root/spack-stage/spack-stage-hpx-1.9.0-ldehaqw5ez3vznp2x2qfhyogvz2hylyn/spa
            ck-src/libs/core/coroutines/include -I/tmp/root/spack-stage/spack-stage-hpx-1.9.0-ldehaqw5ez3vznp2x2qfhyogvz2hylyn/spack-build-ldehaqw/libs/core/coroutin
            es/include -I/tmp/root/spack-stage/spack-stage-hpx-1.9.0-ldehaqw5ez3vznp2x2qfhyogvz2hylyn/spack-build-ldehaqw/libs/core/coroutines/include_compatibility
            -I/tmp/root/spack-stage/spack-stage-hpx-1.9.0-ldehaqw5ez3vznp2x2qfhyogvz2hylyn/spack-src/libs/core/assertion/include -I/tmp/root/spack-stage/spack-stage-
            hpx-1.9.0-ldehaqw5ez3vznp2x2qfhyogvz2hylyn/spack-build-ldehaqw/libs/core/assertion/include -I/tmp/root/spack-stage/spack-stage-hpx-1.9.0-ldehaqw5ez3vznp2
            x2qfhyogvz2hylyn/spack-build-ldehaqw/libs/core/assertion/include_compatibility -I/tmp/root/spack-stage/spack-stage-hpx-1.9.0-ldehaqw5ez3vznp2x2qfhyogvz2h
            ylyn/spack-src/libs/core/config/include -I/tmp/root/spack-stage/spack-stage-hpx-1.9.0-ldehaqw5ez3vznp2x2qfhyogvz2hylyn/spack-build-ldehaqw/libs/core/conf
            ig/include -I/tmp/root/spack-stage/spack-stage-hpx-1.9.0-ldehaqw5ez3vznp2x2qfhyogvz2hylyn/spack-src/libs/core/preprocessor/include -I/tmp/root/spack-stag
            e/spack-stage-hpx-1.9.0-ldehaqw5ez3vznp2x2qfhyogvz2hylyn/spack-build-ldehaqw/libs/core/preprocessor/include -I/tmp/root/spack-stage/spack-stage-hpx-1.9.0
            -ldehaqw5ez3vznp2x2qfhyogvz2hylyn/spack-build-ldehaqw/libs/core/preprocessor/include_compatibility -I/tmp/root/spack-stage/spack-stage-hpx-1.9.0-ldehaqw5
            ez3vznp2x2qfhyogvz2hylyn/spack-src/libs/core/config_registry/include -I/tmp/root/spack-stage/spack-stage-hpx-1.9.0-ldehaqw5ez3vznp2x2qfhyogvz2hylyn/spack
            -build-ldehaqw/libs/core/config_registry/include -I/tmp/root/spack-stage/spack-stage-hpx-1.9.0-ldehaqw5ez3vznp2x2qfhyogvz2hylyn/spack-src/libs/core/debug
            ging/include -I/tmp/root/spack-stage/spack-stage-hpx-1.9.0-ldehaqw5ez3vznp2x2qfhyogvz2hylyn/spack-build-ldehaqw/libs/core/debugging/include -I/tmp/root/s
            pack-stage/spack-stage-hpx-1.9.0-ldehaqw5ez3vznp2x2qfhyogvz2hylyn/spack-build-ldehaqw/libs/core/debugging/include_compatibility -I/tmp/root/spack-stage/s
            pack-stage-hpx-1.9.0-ldehaqw5ez3vznp2x2qfhyogvz2hylyn/spack-src/libs/core/errors/include -I/tmp/root/spack-stage/spack-stage-hpx-1.9.0-ldehaqw5ez3vznp2x2
            qfhyogvz2hylyn/spack-build-ldehaqw/libs/core/errors/include -I/tmp/root/spack-stage/spack-stage-hpx-1.9.0-ldehaqw5ez3vznp2x2qfhyogvz2hylyn/spack-build-ld
            ehaqw/libs/core/errors/include_compatibility -I/tmp/root/spack-stage/spack-stage-hpx-1.9.0-ldehaqw5ez3vznp2x2qfhyogvz2hylyn/spack-src/libs/core/filesyste
            m/include -I/tmp/root/spack-stage/spack-stage-hpx-1.9.0-ldehaqw5ez3vznp2x2qfhyogvz2hylyn/spack-build-ldehaqw/libs/core/filesystem/include -I/tmp/root/spa
            ck-stage/spack-stage-hpx-1.9.0-ldehaqw5ez3vznp2x2qfhyogvz2hylyn/spack-build-ldehaqw/libs/core/filesystem/include_compatibility -I/tmp/root/spack-stage/sp
            ack-stage-hpx-1.9.0-ldehaqw5ez3vznp2x2qfhyogvz2hylyn/spack-src/libs/core/format/include -I/tmp/root/spack-stage/spack-stage-hpx-1.9.0-ldehaqw5ez3vznp2x2q
            fhyogvz2hylyn/spack-build-ldehaqw/libs/core/format/include -I/tmp/root/spack-stage/spack-stage-hpx-1.9.0-ldehaqw5ez3vznp2x2qfhyogvz2hylyn/spack-build-lde
            haqw/libs/core/format/include_compatibility -I/tmp/root/spack-stage/spack-stage-hpx-1.9.0-ldehaqw5ez3vznp2x2qfhyogvz2hylyn/spack-src/libs/core/type_suppo
            rt/include -I/tmp/root/spack-stage/spack-stage-hpx-1.9.0-ldehaqw5ez3vznp2x2qfhyogvz2hylyn/spack-build-ldehaqw/libs/core/type_support/include -I/tmp/root/
            spack-stage/spack-stage-hpx-1.9.0-ldehaqw5ez3vznp2x2qfhyogvz2hylyn/spack-build-ldehaqw/libs/core/type_support/include_compatibility -I/tmp/root/spack-sta
            ge/spack-stage-hpx-1.9.0-ldehaqw5ez3vznp2x2qfhyogvz2hylyn/spack-src/libs/core/concepts/include -I/tmp/root/spack-stage/spack-stage-hpx-1.9.0-ldehaqw5ez3v
            znp2x2qfhyogvz2hylyn/spack-build-ldehaqw/libs/core/concepts/include -I/tmp/root/spack-stage/spack-stage-hpx-1.9.0-ldehaqw5ez3vznp2x2qfhyogvz2hylyn/spack-
            build-ldehaqw/libs/core/concepts/include_compatibility -I/tmp/root/spack-stage/spack-stage-hpx-1.9.0-ldehaqw5ez3vznp2x2qfhyogvz2hylyn/spack-src/libs/core
            /logging/include -I/tmp/root/spack-stage/spack-stage-hpx-1.9.0-ldehaqw5ez3vznp2x2qfhyogvz2hylyn/spack-build-ldehaqw/libs/core/logging/include -I/tmp/root
            /spack-stage/spack-stage-hpx-1.9.0-ldehaqw5ez3vznp2x2qfhyogvz2hylyn/spack-build-ldehaqw/libs/core/logging/include_compatibility -I/tmp/root/spack-stage/s
            pack-stage-hpx-1.9.0-ldehaqw5ez3vznp2x2qfhyogvz2hylyn/spack-src/libs/core/timing/include -I/tmp/root/spack-stage/spack-stage-hpx-1.9.0-ldehaqw5ez3vznp2x2
            qfhyogvz2hylyn/spack-build-ldehaqw/libs/core/timing/include -I/tmp/root/spack-stage/spack-stage-hpx-1.9.0-ldehaqw5ez3vznp2x2qfhyogvz2hylyn/spack-build-ld
            ehaqw/libs/core/timing/include_compatibility -I/tmp/root/spack-stage/spack-stage-hpx-1.9.0-ldehaqw5ez3vznp2x2qfhyogvz2hylyn/spack-src/libs/core/hardware/
            include -I/tmp/root/spack-stage/spack-stage-hpx-1.9.0-ldehaqw5ez3vznp2x2qfhyogvz2hylyn/spack-build-ldehaqw/libs/core/hardware/include -I/tmp/root/spack-s
            tage/spack-stage-hpx-1.9.0-ldehaqw5ez3vznp2x2qfhyogvz2hylyn/spack-build-ldehaqw/libs/core/hardware/include_compatibility -I/tmp/root/spack-stage/spack-st
            age-hpx-1.9.0-ldehaqw5ez3vznp2x2qfhyogvz2hylyn/spack-src/libs/core/thread_support/include -I/tmp/root/spack-stage/spack-stage-hpx-1.9.0-ldehaqw5ez3vznp2x
            2qfhyogvz2hylyn/spack-build-ldehaqw/libs/core/thread_support/include -I/tmp/root/spack-stage/spack-stage-hpx-1.9.0-ldehaqw5ez3vznp2x2qfhyogvz2hylyn/spack
            -build-ldehaqw/libs/core/thread_support/include_compatibility -I/tmp/root/spack-stage/spack-stage-hpx-1.9.0-ldehaqw5ez3vznp2x2qfhyogvz2hylyn/spack-src/li
            bs/core/functional/include -I/tmp/root/spack-stage/spack-stage-hpx-1.9.0-ldehaqw5ez3vznp2x2qfhyogvz2hylyn/spack-build-ldehaqw/libs/core/functional/includ
            e -I/tmp/root/spack-stage/spack-stage-hpx-1.9.0-ldehaqw5ez3vznp2x2qfhyogvz2hylyn/spack-build-ldehaqw/libs/core/functional/include_compatibility -I/tmp/ro
            ot/spack-stage/spack-stage-hpx-1.9.0-ldehaqw5ez3vznp2x2qfhyogvz2hylyn/spack-src/libs/core/datastructures/include -I/tmp/root/spack-stage/spack-stage-hpx-
            1.9.0-ldehaqw5ez3vznp2x2qfhyogvz2hylyn/spack-build-ldehaqw/libs/core/datastructures/include -I/tmp/root/spack-stage/spack-stage-hpx-1.9.0-ldehaqw5ez3vznp
            2x2qfhyogvz2hylyn/spack-build-ldehaqw/libs/core/datastructures/include_compatibility -I/tmp/root/spack-stage/spack-stage-hpx-1.9.0-ldehaqw5ez3vznp2x2qfhy
            ogvz2hylyn/spack-src/libs/core/serialization/include -I/tmp/root/spack-stage/spack-stage-hpx-1.9.0-ldehaqw5ez3vznp2x2qfhyogvz2hylyn/spack-build-ldehaqw/l
            ibs/core/serialization/include -I/tmp/root/spack-stage/spack-stage-hpx-1.9.0-ldehaqw5ez3vznp2x2qfhyogvz2hylyn/spack-build-ldehaqw/libs/core/serialization
            /include_compatibility -I/tmp/root/spack-stage/spack-stage-hpx-1.9.0-ldehaqw5ez3vznp2x2qfhyogvz2hylyn/spack-src/libs/core/itt_notify/include -I/tmp/root/
            spack-stage/spack-stage-hpx-1.9.0-ldehaqw5ez3vznp2x2qfhyogvz2hylyn/spack-build-ldehaqw/libs/core/itt_notify/include -I/tmp/root/spack-stage/spack-stage-h
            px-1.9.0-ldehaqw5ez3vznp2x2qfhyogvz2hylyn/spack-build-ldehaqw/libs/core/itt_notify/include_compatibility -I/tmp/root/spack-stage/spack-stage-hpx-1.9.0-ld
            ehaqw5ez3vznp2x2qfhyogvz2hylyn/spack-src/libs/core/tag_invoke/include -I/tmp/root/spack-stage/spack-stage-hpx-1.9.0-ldehaqw5ez3vznp2x2qfhyogvz2hylyn/spac
            k-build-ldehaqw/libs/core/tag_invoke/include -I/tmp/root/spack-stage/spack-stage-hpx-1.9.0-ldehaqw5ez3vznp2x2qfhyogvz2hylyn/spack-build-ldehaqw/libs/core
            /tag_invoke/include_compatibility -I/tmp/root/spack-stage/spack-stage-hpx-1.9.0-ldehaqw5ez3vznp2x2qfhyogvz2hylyn/spack-src/libs/core/memory/include -I/tm
            p/root/spack-stage/spack-stage-hpx-1.9.0-ldehaqw5ez3vznp2x2qfhyogvz2hylyn/spack-build-ldehaqw/libs/core/memory/include -I/tmp/root/spack-stage/spack-stag
            e-hpx-1.9.0-ldehaqw5ez3vznp2x2qfhyogvz2hylyn/spack-build-ldehaqw/libs/core/memory/include_compatibility -I/tmp/root/spack-stage/spack-stage-hpx-1.9.0-lde
            haqw5ez3vznp2x2qfhyogvz2hylyn/spack-src/libs/core/util/include -I/tmp/root/spack-stage/spack-stage-hpx-1.9.0-ldehaqw5ez3vznp2x2qfhyogvz2hylyn/spack-build
            -ldehaqw/libs/core/util/include -I/tmp/root/spack-stage/spack-stage-hpx-1.9.0-ldehaqw5ez3vznp2x2qfhyogvz2hylyn/spack-build-ldehaqw/libs/core/util/include
            _compatibility -I/tmp/root/spack-stage/spack-stage-hpx-1.9.0-ldehaqw5ez3vznp2x2qfhyogvz2hylyn/spack-src/libs/core/iterator_support/include -I/tmp/root/sp
            ack-stage/spack-stage-hpx-1.9.0-ldehaqw5ez3vznp2x2qfhyogvz2hylyn/spack-build-ldehaqw/libs/core/iterator_support/include -I/tmp/root/spack-stage/spack-sta
            ge-hpx-1.9.0-ldehaqw5ez3vznp2x2qfhyogvz2hylyn/spack-build-ldehaqw/libs/core/iterator_support/include_compatibility -I/tmp/root/spack-stage/spack-stage-hp
            x-1.9.0-ldehaqw5ez3vznp2x2qfhyogvz2hylyn/spack-src/libs/core/version/include -I/tmp/root/spack-stage/spack-stage-hpx-1.9.0-ldehaqw5ez3vznp2x2qfhyogvz2hyl
            yn/spack-build-ldehaqw/libs/core/version/include -I/tmp/root/spack-stage/spack-stage-hpx-1.9.0-ldehaqw5ez3vznp2x2qfhyogvz2hylyn/spack-src/libs/core/prefi
            x/include -I/tmp/root/spack-stage/spack-stage-hpx-1.9.0-ldehaqw5ez3vznp2x2qfhyogvz2hylyn/spack-build-ldehaqw/libs/core/prefix/include -I/tmp/root/spack-s
            tage/spack-stage-hpx-1.9.0-ldehaqw5ez3vznp2x2qfhyogvz2hylyn/spack-build-ldehaqw/libs/core/prefix/include_compatibility -I/tmp/root/spack-stage/spack-stag
            e-hpx-1.9.0-ldehaqw5ez3vznp2x2qfhyogvz2hylyn/spack-src/libs/core/plugin/include -I/tmp/root/spack-stage/spack-stage-hpx-1.9.0-ldehaqw5ez3vznp2x2qfhyogvz2
            hylyn/spack-build-ldehaqw/libs/core/plugin/include -I/tmp/root/spack-stage/spack-stage-hpx-1.9.0-ldehaqw5ez3vznp2x2qfhyogvz2hylyn/spack-build-ldehaqw/lib
            s/core/plugin/include_compatibility -I/tmp/root/spack-stage/spack-stage-hpx-1.9.0-ldehaqw5ez3vznp2x2qfhyogvz2hylyn/spack-src/libs/core/string_util/includ
            e -I/tmp/root/spack-stage/spack-stage-hpx-1.9.0-ldehaqw5ez3vznp2x2qfhyogvz2hylyn/spack-build-ldehaqw/libs/core/string_util/include -isystem /spack/opt/sp
            ack/linux-ubuntu20.04-aarch64/gcc-11.1.0/boost-1.79.0-ywqxz7k7fiagjlavzdnpjtops5slwhmg/include -isystem /spack/opt/spack/linux-ubuntu20.04-aarch64/gcc-11
            .1.0/asio-1.28.0-5oxmqjagiajzyujldezzkc7llze2l32q/include -isystem /spack/opt/spack/linux-ubuntu20.04-aarch64/gcc-11.1.0/hwloc-2.9.1-xirl3tcdd5s47tr75hbv
            qusgdt3crf7f/include -isystem /spack/opt/spack/linux-ubuntu20.04-aarch64/gcc-11.1.0/mpich-4.1.1-la56q6qmhnlgtwksq4vpn6mnewxxgzg3/include -O3 -DNDEBUG -st
            d=c++17 -fPIC -pthread -Wall -Wextra -Wpedantic -Wno-strict-aliasing -Wno-sign-promo -Wno-attributes -Wno-cast-align -Wno-use-after-free -Wno-noexcept-ty
            pe -Wformat=2 -Wno-format-nonliteral -Winit-self -Wdouble-promotion -Wcast-qual -Wcast-align -Werror=trampolines -Werror=parentheses -Werror=reorder -Wer
            ror=return-type -Werror=sequence-point -Werror=uninitialized -Werror=format -Werror=missing-braces -Werror=sign-compare -fdiagnostics-show-option -Werror
            =vla -Wno-unused-but-set-parameter -Wno-unused-but-set-variable -Wno-unused-local-typedefs -Wno-maybe-uninitialized -Wno-sync-nand -Wno-delete-non-virtua
            l-dtor -fvisibility=hidden -MD -MT libs/core/coroutines/CMakeFiles/hpx_coroutines.dir/src/detail/coroutine_self.cpp.o -MF libs/core/coroutines/CMakeFiles
            /hpx_coroutines.dir/src/detail/coroutine_self.cpp.o.d -o libs/core/coroutines/CMakeFiles/hpx_coroutines.dir/src/detail/coroutine_self.cpp.o -c /tmp/root/
            spack-stage/spack-stage-hpx-1.9.0-ldehaqw5ez3vznp2x2qfhyogvz2hylyn/spack-src/libs/core/coroutines/src/detail/coroutine_self.cpp
     329    In file included from /tmp/root/spack-stage/spack-stage-hpx-1.9.0-ldehaqw5ez3vznp2x2qfhyogvz2hylyn/spack-src/libs/core/coroutines/include/hpx/coroutines/
            detail/context_impl.hpp:122,
     330                     from /tmp/root/spack-stage/spack-stage-hpx-1.9.0-ldehaqw5ez3vznp2x2qfhyogvz2hylyn/spack-src/libs/core/coroutines/include/hpx/coroutines/
            detail/context_base.hpp:36,
     331                     from /tmp/root/spack-stage/spack-stage-hpx-1.9.0-ldehaqw5ez3vznp2x2qfhyogvz2hylyn/spack-src/libs/core/coroutines/include/hpx/coroutines/
            detail/coroutine_impl.hpp:36,
     332                     from /tmp/root/spack-stage/spack-stage-hpx-1.9.0-ldehaqw5ez3vznp2x2qfhyogvz2hylyn/spack-src/libs/core/coroutines/include/hpx/coroutines/
            detail/coroutine_self.hpp:34,
     333                     from /tmp/root/spack-stage/spack-stage-hpx-1.9.0-ldehaqw5ez3vznp2x2qfhyogvz2hylyn/spack-src/libs/core/coroutines/src/detail/coroutine_se
            lf.cpp:8:
     334    /tmp/root/spack-stage/spack-stage-hpx-1.9.0-ldehaqw5ez3vznp2x2qfhyogvz2hylyn/spack-src/libs/core/coroutines/include/hpx/coroutines/detail/context_linux_x
            86.hpp: In member function 'void hpx::threads::coroutines::detail::lx::x86_linux_context_impl_base::prefetch() const':
  >> 335    /tmp/root/spack-stage/spack-stage-hpx-1.9.0-ldehaqw5ez3vznp2x2qfhyogvz2hylyn/spack-src/libs/core/coroutines/include/hpx/coroutines/detail/context_linux_x
            86.hpp:206:41: error: static assertion failed
     336      206 |             static_assert(sizeof(void*) == 4);
     337          |                           ~~~~~~~~~~~~~~^~~~
     338    At global scope:
     339    cc1plus: note: unrecognized command-line option '-Wno-use-after-free' may have been intended to silence earlier diagnostics
...
```

### Error message

<details><summary>Error message</summary>
<pre>
... see above
</pre></details>


### Information on your system

* **Spack:** 0.21.0.dev0 (09e1258ed42f00ea9bde9857f233eeda5c61a895)
* **Python:** 3.8.10
* **Platform:** linux-ubuntu20.04-neoverse_n1
* **Concretizer:** clingo

### Additional information

[spack-build-env.txt](https://github.com/spack/spack/files/11992631/spack-build-env.txt)
[spack-build-out.txt](https://github.com/spack/spack/files/11992632/spack-build-out.txt)

@albestro @hkaiser @msimberg @teonnik @wspear

### 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/hpx/package.py b/var/spack/repos/builtin/packages/hpx/package.py
--- a/var/spack/repos/builtin/packages/hpx/package.py
+++ b/var/spack/repos/builtin/packages/hpx/package.py
@@ -195,8 +195,13 @@ class Hpx(CMakePackage, CudaPackage, ROCmPackage):
     # https://github.com/spack/spack/pull/17654
     # https://github.com/STEllAR-GROUP/hpx/issues/4829
     depends_on("boost+context", when="+generic_coroutines")
-    _msg_generic_coroutines = "This platform requires +generic_coroutines"
-    conflicts("~generic_coroutines", when="platform=darwin", msg=_msg_generic_coroutines)
+
+    _msg_generic_coroutines_platform = "This platform requires +generic_coroutines"
+    conflicts("~generic_coroutines", when="platform=darwin", msg=_msg_generic_coroutines_platform)
+
+    _msg_generic_coroutines_target = "This target requires +generic_coroutines"
+    conflicts("~generic_coroutines", when="target=aarch64:", msg=_msg_generic_coroutines_target)
+    conflicts("~generic_coroutines", when="target=arm:", msg=_msg_generic_coroutines_target)
 
     # Patches APEX
     patch("git_external.patch", when="@1.3.0 instrumentation=apex")


Test patch: