tce-load -i automake libtool-dev cd libatomic_ops-7.2 sed -i 's#AM_CONFIG_HEADER#AC_CONFIG_HEADERS#' configure.ac sed -i 's#AC_PROG_RANLIB#AC_LIBTOOL_DLOPEN\nAC_PROG_LIBTOOL#' configure.ac sed -i 's#b_L#b_LTL#;s#\.a#.la#g;s#_a_#_la_#' src/Makefile.am sed -i 's#\.a#.so#g;s#\.\./src/#../src/.libs/#g' tests/Makefile.am sed -i 's#pkgdata#doc#' doc/Makefile.am autoreconf -fi CC="gcc -flto -fuse-linker-plugin -mtune=generic -Os -pipe" CXX="g++ -flto -fuse-linker-plugin -mtune=generic -Os -pipe -fno-exceptions -fno-rtti" ./configure --prefix=/usr/local --disable-static find . -name Makefile -type f -exec sed -i 's/-O2/ /g' {} \; make sudo make install