diff --git a/tensorflow.spec b/tensorflow.spec index 05520ab0feb8ccc8e1d981c2cf1688836019b7e2..dd67ea1f037fc00dc2783cb4f1b16796e8ac3ada 100644 --- a/tensorflow.spec +++ b/tensorflow.spec @@ -1,7 +1,7 @@ %global _empty_manifest_terminate_build 0 Name: tensorflow Version: 2.12.1 -Release: 0 +Release: 1 Summary: An Open Source Machine Learning Framework for Everyone License: Apache License 2.0 URL: https://www.tensorflow.org/ @@ -47,6 +47,9 @@ tar xf external.tar.bz2 -C ${extdir} %ifarch aarch64 patch -d ${extdir} -p0 < %{SOURCE4} %endif +gcc_machine=$(gcc -dumpmachine) +sed -i -e "s/x86_64-openEuler-linux/${gcc_machine}/g" $extdir/external/local_config_cc/BUILD +sed -i -e "s/x86_64-openEuler-linux/${gcc_machine}/g" $extdir/external/local_config_cc/builtin_include_directory_paths ln -sfn ${instdir}/embedded_tools ${extdir}/external/bazel_tools for f in $(find $extdir/external -lname "*/external/*"); do OLDLINK=$(readlink $f); echo $OLDLINK; NEWLINK=${extdir}/external/${OLDLINK#*external}; ln -sf $NEWLINK $f-newlink; mv -Tf $f-newlink $f; done for f in $(find $extdir/external -lname "*/rpmbuild/*"); do OLDLINK=$(readlink $f); echo $OLDLINK; NEWLINK=${HOME}/rpmbuild/${OLDLINK#*rpmbuild}; ln -sf $NEWLINK $f-newlink; mv -Tf $f-newlink $f;done @@ -67,6 +70,9 @@ bazel --output_user_root=`pwd`/../output_user_root build --nofetch --host_copt=- %{_bindir}/* %changelog +* Wed Apr 24 2024 shaojiansong - 2.12.1-1 +- Replace x86_64-openEuler-linux with dynamic gcc target using 'gcc -dumpmachine' + * Wed Sep 13 2023 Jincheng Miao - 2.12.1-0 - update version to 2.12.1