Skip to content

Commit 3c619c0

Browse files
committed
Update LDFLAGS to reduce linker warnings
1 parent 5fd62ec commit 3c619c0

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
77
## [Unreleased]
88
### Fixed
99
- Fixed underscore only identifiers to allow more than 4 characters
10+
- Update LDFLAGS to reduce linker warnings
1011

1112
## [1.3.1] - 2019-05-01
1213
### Fixed

config.m4

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,11 +110,16 @@ You can disable ccache by setting environment variable CCACHE_DISABLE=1.
110110
CFLAGS=`echo "$CFLAGS" | $SED -e 's/-O[0-9s]*//g'`
111111
CXXFLAGS=`echo "$CXXFLAGS" | $SED -e 's/-O[0-9s]*//g'`
112112
dnl Remove --coverage flag from LDFLAGS
113-
LDFLAGS=`echo "$LDFLAGS" | $SED -e 's/--coverage//g'`
113+
LDFLAGS=`echo "$LDFLAGS" | $SED -e 's/--coverage)//g' -e 's/-fprofile-arcs//g' -e 's/-ftest-coverage//g'`
114114
changequote([,])
115115

116116
dnl Add the special flags
117-
LDFLAGS="$LDFLAGS --coverage"
117+
if test "$($CC --version | head -n 1 | cut -d' ' -f1)" = "Apple"; then
118+
LDFLAGS="$LDFLAGS -fprofile-arcs -ftest-coverage"
119+
else
120+
LDFLAGS="$LDFLAGS -coverage"
121+
fi
122+
118123
CFLAGS="$CFLAGS -O0 -ggdb -fprofile-arcs -ftest-coverage"
119124
CXXFLAGS="$CXXFLAGS -O0 -ggdb -fprofile-arcs -ftest-coverage"
120125

0 commit comments

Comments
 (0)