Also link with libm when available

This seems to help the build on macOS, without much harm everywhere else.
This commit is contained in:
Pierre Pronchery 2019-09-20 03:56:08 +02:00
parent 69bdb4a090
commit 812f95a5de
3 changed files with 3 additions and 3 deletions

View File

@ -10,7 +10,7 @@ dist=Makefile,token.h,python/project.conf,python/Makefile,python/libSystem.c,pyt
[libSystem]
type=library
sources=array.c,buffer.c,config.c,error.c,event.c,hash.c,mutator.c,object.c,parser.c,plugin.c,string.c,token.c,variable.c
ldflags=`../tools/platform.sh -O DESTDIR="$(DESTDIR)" -l dl`
ldflags=`../tools/platform.sh -O DESTDIR="$(DESTDIR)" -l dl` `../tools/platform.sh -O DESTDIR="$(DESTDIR)" -l m`
install=$(LIBDIR)
[config.c]

View File

@ -1,7 +1,7 @@
targets=array,buffer,clint.log,config,coverage.log,error,event,fixme.log,includes,parser,pylint.log,string,variable,tests.log
cppflags_force=-I ../include
cflags=-W -Wall -g -O2 -fPIE -D_FORTIFY_SOURCE=2 -fstack-protector
ldflags_force=-L$(OBJDIR)../src -Wl,-rpath,$(OBJDIR)../src -lSystem `../tools/platform.sh -O DESTDIR="$(DESTDIR)" -l dl`
ldflags_force=-L$(OBJDIR)../src -Wl,-rpath,$(OBJDIR)../src -lSystem `../tools/platform.sh -O DESTDIR="$(DESTDIR)" -l dl` `../tools/platform.sh -O DESTDIR="$(DESTDIR)" -l m`
ldflags=-pie -Wl,-z,relro -Wl,-z,now
dist=Makefile,clint.sh,config.conf,config-empty.conf,config-noeol.conf,coverage.sh,fixme.sh,pkgconfig.sh,pylint.sh,python.sh,tests.sh

View File

@ -2,7 +2,7 @@ targets=configctl
cppflags_force=-I ../include
cppflags=
cflags=-W -Wall -g -O2 -fPIE -D_FORTIFY_SOURCE=2 -fstack-protector
ldflags_force=-L$(OBJDIR)../src -Wl,-rpath,$(PREFIX)/lib -lSystem
ldflags_force=-L$(OBJDIR)../src -Wl,-rpath,$(PREFIX)/lib -lSystem `../tools/platform.sh -O DESTDIR="$(DESTDIR)" -l dl` `../tools/platform.sh -O DESTDIR="$(DESTDIR)" -l m`
ldflags=-pie -Wl,-z,relro -Wl,-z,now
dist=Makefile,platform.sh,subst.sh