https://bugs.kde.org/show_bug.cgi?id=338252

--- Comment #30 from Дилян Палаузов <dilyan.palau...@aegee.org> ---
For the record, with /usr/local/etc/config.site containing

CC=clang CXX=clang++ CFLAGS="-Wall -pipe -O3" CXXFLAGS="-pipe -O3"
LDFLAGS="-L/usr/local/lib64 -Wl,-O1,-s -fuse-ld=gold"

and this changes:

diff --git a/configure.ac b/configure.ac
--- a/configure.ac
+++ b/configure.ac
@@ -47,7 +47,7 @@ AC_PROG_CXX
 AC_PROG_RANLIB
 # Set LTO_RANLIB variable to an lto enabled ranlib
 if test "x$LTO_RANLIB" = "x"; then
-  AC_PATH_PROGS([LTO_RANLIB], [gcc-ranlib])
+  AC_PATH_PROGS([LTO_RANLIB], [ranlib])
 fi
 AC_ARG_VAR([LTO_RANLIB],[Library indexer command for link time optimisation])

@@ -68,7 +68,7 @@ AC_ARG_VAR([AR],[Archiver command])

 # same for LTO_AR variable for lto enabled archiver
 if test "x$LTO_AR" = "x"; then
-  AC_PATH_PROGS([LTO_AR], [gcc-ar])
+  AC_PATH_PROGS([LTO_AR], [ar])
 fi
 AC_ARG_VAR([LTO_AR],[Archiver command for link time optimisation])

valgrind does compile and link using clang, after being ./configure'd with
--enable-lto.

Likewise, having in /usr/local/etc/config.site

CFLAGS="-Wall -pipe -O3" CXXFLAGS="-pipe -O3" LDFLAGS="-L/usr/local/lib64
-Wl,-O1,-s -fuse-ld=gold"

and thus implicitly using gcc, ./configure --enable-lto also compiles and
links.

So it is a matter of installing the linker plugin at the right place, uring the
installation of the  compiler, assuming a recent version of binutils (I think
the support for linker plugins is there for 3-4 years now).

If the compilers' linker plugins are not installed where the
linker+ar+nm+ranlib searches them, consider asking your distribution to do so.

I use clang 6.0.0 and have not run any tests.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to