Skip to content

Commit 7ee23f2

Browse files
committed
disable -flto=auto during link on OpenSUSE
1 parent 321a7b0 commit 7ee23f2

File tree

3 files changed

+8
-0
lines changed

3 files changed

+8
-0
lines changed

inst/NEWS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
RcppParallel 5.0.1 (UNRELEASED)
22
------------------------------------------------------------------------
3+
* Fixed compilation issue on OpenSUSE Tumbleweed with -flto=auto
34
* Fixed compilation when CPPFLAGS = -I/usr/local/include and a version
45
of libtbb is installed there
56

src/Makevars.in

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
PKG_CPPFLAGS = -I../inst/include
33
PKG_CXXFLAGS = @CXX11STD@
44

5+
override LDFLAGS = @LDFLAGS@
6+
57
ifeq ($(OS), Windows_NT)
68

79
USE_TBB=Windows

tools/config/configure.R

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,11 @@ if (Sys.info()[["sysname"]] == "Windows") {
7575

7676
}
7777

78+
# override LDFLAGS (disable LTO on OpenSUSE)
79+
ldflags <- read_r_config("LDFLAGS", envir = NULL)[[1]]
80+
ldflags <- gsub("-flto=auto", "", ldflags, fixed = TRUE)
81+
define(LDFLAGS = ldflags)
82+
7883
# use c++0x for compatibility with older compilers
7984
define(STDVER = "c++0x")
8085

0 commit comments

Comments
 (0)