Skip to content

Commit

Permalink
add APX support for configure targets
Browse files Browse the repository at this point in the history
  • Loading branch information
fenrus75 committed Feb 5, 2024
1 parent 750e50d commit 957525b
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions autospec/specfiles.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@

AVX2_CFLAGS = "-march=x86-64-v3"
AVX2_LFLAGS = "-Wl,-z,x86-64-v3"
AVX2_LCFLAGS = "-march=x86-64-v3"
AVX512_CFLAGS = "-march=x86-64-v4 -mprefer-vector-width=512"
AVX512_FCFLAGS = "-march=x86-64-v4 -mprefer-vector-width=256"
AVX512_LFLAGS = "-Wl,-z,x86-64-v4"
Expand Down Expand Up @@ -1057,6 +1058,24 @@ def write_configure_pattern(self):
self.write_make_line()
self._write_strip("popd")

if self.config.config_opts['use_apx']:
self._write_strip("unset PKG_CONFIG_PATH")
self._write_strip("pushd ../buildapx/" + self.config.subdir)
self.write_build_prepend()
self._write_strip(f'CC="/usr/bin/gcc-14"')
self._write_strip(f'HOSTCC="/usr/bin/gcc"')
self._write_strip(f'HOSTCFLAGS="-O2"')
self._write_strip(f'CFLAGS="$CLEAR_INTERMEDIATE_CFLAGS {APX_CFLAGS} {APX_LFLAGS} "')
self._write_strip(f'CXXFLAGS="$CLEAR_INTERMEDIATE_CXXFLAGS {AVX2_CFLAGS} {AVX2_LFLAGS} "')
self._write_strip(f'LDFLAGS="$CLEAR_INTERMEDIATE_LDFLAGS {AVX2_LCFLAGS} "')
self._write_strip("%configure --host=x86_64-clr-linux-gnu {0} {1} {2} "
.format(self.config.disable_static,
self.config.extra_configure,
self.config.extra_configure_avx512))
self.write_make_line()
self._write_strip(f'unset CC')
self._write_strip("popd")

if self.config.config_opts['openmpi']:
self._write_strip("pushd ../build-openmpi/" + self.config.subdir)
self._write_strip(". /usr/share/defaults/etc/profile.d/modules.sh")
Expand Down

0 comments on commit 957525b

Please sign in to comment.