Commit 7299257f authored by Csaba Kertesz's avatar Csaba Kertesz

Fix the KStars linking for gslcblas when gcc is used

parent c2d40c03
......@@ -326,6 +326,14 @@ IF (UNIX OR APPLE)
# ld.gold is 2x faster than normal ld
IF (NOT APPLE AND NOT CMAKE_SYSTEM_PROCESSOR MATCHES arm)
SET(LINKER_FLAGS "${LINKER_FLAGS} -fuse-ld=gold")
# We have Gsl library what is a special case for linking:
# The gsl library must be linked with cblas. There are two alternatives for this: libcblas or libgslcblas.
# For example, CMake gets the GSL_LIBRARIES linking flags from the pkgconfig (gsl.pc) file on Ubuntu.
# This file defines -lgsl -lglscblas for linking flags and if KStars is compiled with Clang, the linker
# finds out magically that KStars must be linked against glscblas library, but gslcblas is omitted in linking
# stage if KStars is built with gcc. The linker must be instructed explicitly to link against all libraries
# passed on command line by -Wl,--no-as-needed.
SET(LINKER_FLAGS "${LINKER_FLAGS} -Wl,--no-as-needed")
# Use Identical Code Folding
SET(COMP_FLAGS "${COMP_FLAGS} -ffunction-sections")
SET(LINKER_FLAGS "${LINKER_FLAGS} -Wl,--icf=safe")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment