2016-03-16 21:20:08 +01:00
|
|
|
From d8d70559a279706c206761dfaf665d2197934123 Mon Sep 17 00:00:00 2001
|
2016-03-07 00:04:54 +01:00
|
|
|
From: Gustavo Zacarias <gustavo@zacarias.com.ar>
|
|
|
|
Date: Sun, 6 Mar 2016 22:52:02 +0100
|
|
|
|
Subject: [PATCH] build-system: fixes for cross-compilation
|
|
|
|
|
2011-04-26 16:56:48 +02:00
|
|
|
Avoid the libcap buildsys forcing CC/CFLAGS/LDFLAGS/AR/RANLIB
|
|
|
|
|
|
|
|
Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
|
2016-03-16 21:20:08 +01:00
|
|
|
[yann.morin.1998@free.fr: dont chmod +x the shared lib]
|
2016-03-07 00:04:54 +01:00
|
|
|
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
|
2011-04-26 16:56:48 +02:00
|
|
|
|
2016-03-07 00:04:54 +01:00
|
|
|
diff --git a/Make.Rules b/Make.Rules
|
2016-03-16 21:20:08 +01:00
|
|
|
index 8347b26..8a07a3f 100644
|
2016-03-07 00:04:54 +01:00
|
|
|
--- a/Make.Rules
|
|
|
|
+++ b/Make.Rules
|
2016-03-16 21:20:08 +01:00
|
|
|
@@ -48,26 +48,26 @@ MINOR=25
|
2016-03-07 00:04:54 +01:00
|
|
|
KERNEL_HEADERS := $(topdir)/libcap/include/uapi
|
|
|
|
IPATH += -fPIC -I$(KERNEL_HEADERS) -I$(topdir)/libcap/include
|
2010-03-02 22:47:13 +01:00
|
|
|
|
|
|
|
-CC := gcc
|
2011-12-14 16:15:17 +01:00
|
|
|
-CFLAGS := -O2 -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64
|
2010-03-02 22:47:13 +01:00
|
|
|
-BUILD_CC := $(CC)
|
|
|
|
-BUILD_CFLAGS := $(CFLAGS) $(IPATH)
|
|
|
|
-AR := ar
|
|
|
|
-RANLIB := ranlib
|
|
|
|
+CC ?= gcc
|
2011-12-14 16:15:17 +01:00
|
|
|
+CFLAGS ?= -O2 -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64
|
2011-04-26 16:56:48 +02:00
|
|
|
+BUILD_CC ?= $(CC)
|
|
|
|
+BUILD_CFLAGS ?= $(CFLAGS) $(IPATH)
|
2010-03-02 22:47:13 +01:00
|
|
|
+AR ?= ar
|
|
|
|
+RANLIB ?= ranlib
|
|
|
|
DEBUG = -g #-DDEBUG
|
2011-04-26 16:56:48 +02:00
|
|
|
WARNINGS=-Wall -Wwrite-strings \
|
2010-03-02 22:47:13 +01:00
|
|
|
-Wpointer-arith -Wcast-qual -Wcast-align \
|
|
|
|
-Wstrict-prototypes -Wmissing-prototypes \
|
|
|
|
-Wnested-externs -Winline -Wshadow
|
|
|
|
LD=$(CC) -Wl,-x -shared
|
|
|
|
-LDFLAGS := #-g
|
|
|
|
+LDFLAGS ?= #-g
|
2016-03-16 21:20:08 +01:00
|
|
|
BUILD_GPERF := $(shell which gperf >/dev/null 2>/dev/null && echo yes)
|
2010-03-02 22:47:13 +01:00
|
|
|
|
|
|
|
SYSTEM_HEADERS = /usr/include
|
|
|
|
INCS=$(topdir)/libcap/include/sys/capability.h
|
|
|
|
LDFLAGS += -L$(topdir)/libcap
|
2011-04-26 16:56:48 +02:00
|
|
|
CFLAGS += -Dlinux $(WARNINGS) $(DEBUG)
|
2010-05-28 19:34:27 +02:00
|
|
|
-PAM_CAP := $(shell if [ -f /usr/include/security/pam_modules.h ]; then echo yes ; else echo no ; fi)
|
2011-04-26 16:56:48 +02:00
|
|
|
+PAM_CAP = no
|
2016-03-16 21:20:08 +01:00
|
|
|
INDENT := $(shell if [ -n "$$(which indent 2>/dev/null)" ]; then echo "| indent -kr" ; fi)
|
2010-03-02 22:47:13 +01:00
|
|
|
DYNAMIC := $(shell if [ ! -d "$(topdir)/.git" ]; then echo yes; fi)
|
2016-03-16 21:20:08 +01:00
|
|
|
|
2016-03-07 00:04:54 +01:00
|
|
|
--
|
|
|
|
1.9.1
|
|
|
|
|