https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97290
--- Comment #5 from Markus Rothe <markus.rothe at rite dot cc> --- The spec file is available here: https://github.com/markus289/aws-sdk-cpp-rpms But I was also able to reproduce the problem on a Fedora 32 machine without rpm/mock/etc involved as follows: [ Note, that this would install some files in ${HOME}/test-error/ when running 'make' as it downloads dependencies and installs them to the prefix (e.g. aws-c-common). ] curl -L https://github.com/aws/aws-sdk-cpp/archive/1.8.61.tar.gz|tar xz cd aws-sdk-cpp-1.8.61 && mkdir build && cd build CFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection' export CFLAGS CXXFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection' export CXXFLAGS FFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -I/usr/lib64/gfortran/modules' export FFLAGS FCFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -I/usr/lib64/gfortran/modules' export FCFLAGS LDFLAGS='-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld ' export LDFLAGS LT_SYS_LIBRARY_PATH=/usr/lib64: export LT_SYS_LIBRARY_PATH CC=gcc export CC CXX=g++ export CXX /usr/bin/cmake ../ -DCMAKE_C_FLAGS_RELEASE:STRING=-DNDEBUG -DCMAKE_CXX_FLAGS_RELEASE:STRING=-DNDEBUG -DCMAKE_Fortran_FLAGS_RELEASE:STRING=-DNDEBUG -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON -DCMAKE_INSTALL_PREFIX:PATH=${HOME}/test-error/usr -DINCLUDE_INSTALL_DIR:PATH=${HOME}/test-error/usr/include -DLIB_INSTALL_DIR:PATH=${HOME}/test-error/usr/lib64 -DSYSCONF_INSTALL_DIR:PATH=${HOME}/test-error/etc -DSHARE_INSTALL_PREFIX:PATH=${HOME}/test-error/usr/share -DLIB_SUFFIX=64 -DBUILD_SHARED_LIBS:BOOL=ON -DBUILD_DEPS:BOOL=TRUE -DAUTORUN_UNIT_TESTS:BOOL=FALSE -DCUSTOM_MEMORY_MANAGEMENT:BOOL=FALSE -DBUILD_ONLY=ec2 make [...] /usr/bin/ld: error: lto-wrapper failed collect2: error: ld returned 1 exit status Does this help? I know that the *FLAGS are quite specific to Fedora...