From 48b34a49469a11abae79ce24ebe1c12b5711fbe0 Mon Sep 17 00:00:00 2001 From: Joel Rosdahl Date: Sat, 20 Oct 2018 13:50:40 +0200 Subject: =?UTF-8?q?Don=E2=80=99t=20pass=20CFLAGS=20to=20the=20linker?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .travis.sh | 4 ++-- .travis.yml | 6 +++--- Makefile.in | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.travis.sh b/.travis.sh index ad646783..8c483ad3 100755 --- a/.travis.sh +++ b/.travis.sh @@ -4,6 +4,6 @@ make travis CC=gcc make travis CC=clang make travis CC=gcc CFLAGS="-m32 -g -O2" HOST="--host=i386-linux-gnu" make travis CC=i686-w64-mingw32-gcc HOST="--host=i686-w64-mingw32" TEST="unittest/run.exe" -make travis CC=clang CFLAGS="-fsanitize=undefined" ASAN_OPTIONS="detect_leaks=0" -make travis CC=clang CFLAGS="-fsanitize=address -g" ASAN_OPTIONS="detect_leaks=0" +make travis CC=clang CFLAGS="-fsanitize=undefined" LDFLAGS="-fsanitize=undefined" ASAN_OPTIONS="detect_leaks=0" +make travis CC=clang CFLAGS="-fsanitize=address -g" LDFLAGS="-fsanitize=undefined" ASAN_OPTIONS="detect_leaks=0" make travis CC=/usr/bin/clang TEST=analyze diff --git a/.travis.yml b/.travis.yml index 582e607d..c9245b34 100644 --- a/.travis.yml +++ b/.travis.yml @@ -19,7 +19,7 @@ matrix: include: - os: linux compiler: gcc - env: CFLAGS="-m32 -g -O2" HOST="--host=i386-linux-gnu" + env: CFLAGS="-m32 -g -O2" LDFLAGS="-m32" HOST="--host=i386-linux-gnu" addons: apt: packages: @@ -34,10 +34,10 @@ matrix: - gcc-mingw-w64-i686 - os: linux compiler: clang - env: CFLAGS="-fsanitize=undefined" ASAN_OPTIONS="detect_leaks=0" + env: CFLAGS="-fsanitize=undefined" LDFLAGS="-fsanitize=undefined" ASAN_OPTIONS="detect_leaks=0" - os: linux compiler: clang - env: CFLAGS="-fsanitize=address -g" ASAN_OPTIONS="detect_leaks=0" + env: CFLAGS="-fsanitize=address -g" LDFLAGS="-fsanitize=address" ASAN_OPTIONS="detect_leaks=0" - os: linux compiler: clang env: PATH="/usr/bin:$PATH" TEST=analyze diff --git a/Makefile.in b/Makefile.in index 2f41cb75..ee280b45 100644 --- a/Makefile.in +++ b/Makefile.in @@ -101,7 +101,7 @@ all: ccache$(EXEEXT) ccache$(EXEEXT): $(ccache_objs) $(extra_libs) $(if $(quiet),@echo " LD $@") - $(Q)$(CC) $(all_cflags) -o $@ $(ccache_objs) $(LDFLAGS) $(extra_libs) $(LIBS) + $(Q)$(CC) -o $@ $(ccache_objs) $(LDFLAGS) $(extra_libs) $(LIBS) ccache.1: doc/ccache.1 $(if $(quiet),@echo " CP $@") @@ -150,7 +150,7 @@ unittest: unittest/run$(EXEEXT) unittest/run$(EXEEXT): $(base_objs) $(test_objs) $(extra_libs) $(if $(quiet),@echo " LD $@") - $(Q)$(CC) $(all_cflags) -o $@ $(base_objs) $(test_objs) $(LDFLAGS) $(extra_libs) $(LIBS) + $(Q)$(CC) -o $@ $(base_objs) $(test_objs) $(LDFLAGS) $(extra_libs) $(LIBS) unittest/main.o: unittest/suites.h -- cgit v1.2.1