makefile: honor build env CFLAGS and LDFLAGS
Generally build env (rpmbuild, dpkg-buildpackage) provide sane and useful defaults. Fixes hardening-no-relro lintian warning. QubesOS/qubes-issues#1416
This commit is contained in:
parent
7148f8d135
commit
d95174f52c
@ -1,5 +1,5 @@
|
|||||||
CC=gcc
|
CC=gcc
|
||||||
CFLAGS=-Wall -Wextra -Werror -g -O3
|
CFLAGS+=-Wall -Wextra -Werror -g -O3
|
||||||
all: meminfo-writer
|
all: meminfo-writer
|
||||||
SBINDIR?=/usr/sbin
|
SBINDIR?=/usr/sbin
|
||||||
|
|
||||||
@ -9,7 +9,7 @@ ifneq "$(_XENSTORE_H)" ""
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
meminfo-writer: meminfo-writer.o
|
meminfo-writer: meminfo-writer.o
|
||||||
$(CC) -g -o meminfo-writer meminfo-writer.o -lxenstore
|
$(CC) $(LDFLAGS) -g -o meminfo-writer meminfo-writer.o -lxenstore
|
||||||
install:
|
install:
|
||||||
install -D meminfo-writer $(DESTDIR)/$(SBINDIR)/meminfo-writer
|
install -D meminfo-writer $(DESTDIR)/$(SBINDIR)/meminfo-writer
|
||||||
ifeq (1,${DEBIANBUILD})
|
ifeq (1,${DEBIANBUILD})
|
||||||
|
@ -2,7 +2,7 @@ CC=gcc
|
|||||||
CFLAGS+=-I. -g -O2 -Wall -Wextra -Werror -pie -fPIC `pkg-config --cflags vchan-$(BACKEND_VMM)`
|
CFLAGS+=-I. -g -O2 -Wall -Wextra -Werror -pie -fPIC `pkg-config --cflags vchan-$(BACKEND_VMM)`
|
||||||
COMMONIOALL=ioall.o
|
COMMONIOALL=ioall.o
|
||||||
SO_VER=2
|
SO_VER=2
|
||||||
LDFLAGS=-shared
|
LDFLAGS+=-shared
|
||||||
VCHANLIBS = `pkg-config --libs vchan-$(BACKEND_VMM)`
|
VCHANLIBS = `pkg-config --libs vchan-$(BACKEND_VMM)`
|
||||||
|
|
||||||
_XENSTORE_H=$(shell ls /usr/include/xenstore.h)
|
_XENSTORE_H=$(shell ls /usr/include/xenstore.h)
|
||||||
|
Loading…
Reference in New Issue
Block a user