Skip to content

Commit

Permalink
fixed portability issue with gcc10's default linker behavior (new def…
Browse files Browse the repository at this point in the history
…ault is -fno-common, so had to add extern keyword to some headerfile declarations); added CRAN-check instructions for adding that flag to the devtools::check()
  • Loading branch information
ekalosak committed Feb 8, 2020
1 parent fb388a0 commit 9d8c8f4
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
14 changes: 13 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,22 @@ install_github("opsani/soobench")

If you make changes, before you submit a PR, please help me out by running
```
./do check package
./do check
```
to ensure the changes will be accepted by the CRAN team.

### Portability concerns
To check using the `gcc10 -fno-common` [requirement](https://cran.r-project.org/doc/manuals/r-release/R-exts.html#Portable-C-and-C_002b_002b-code),
use
```
withr::with_makevars(
c(
"CFLAGS"="-Wall -pedantic -fdiagnostics-color=always -fno-common"
),
devtools::check()
)
```

[![CRAN Status Badge](http://www.r-pkg.org/badges/version/soobench)](http://cran.r-project.org/web/packages/soobench)
[![CRAN Downloads](http://cranlogs.r-pkg.org/badges/soobench)](http://cran.rstudio.com/web/packages/soobench/index.html)

4 changes: 2 additions & 2 deletions src/benchmarksnoisy.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,5 @@ TwoDoubles f130(double *x);
void initbenchmarksnoisy();
void finibenchmarksnoisy();

bbobFunction handlesNoisy[30];
unsigned int handlesNoisyLength;
extern bbobFunction handlesNoisy[30];
extern unsigned int handlesNoisyLength;

0 comments on commit 9d8c8f4

Please sign in to comment.