06d5b3dd97
And re-format patches as git patches. Fixes: http://autobuild.buildroot.org/results/c13/c13fb87c2e4739106e256f34fff93696b0133bf6/ http://autobuild.buildroot.org/results/f82/f822801f9b811e1a0fb4627f6b528116375cacfe/ http://autobuild.buildroot.org/results/07c/07c0315a35089a8d3e8eb1a305dcd8bf1fb882ee/ and many more... Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
66 lines
2.2 KiB
Diff
66 lines
2.2 KiB
Diff
From 7f48413ef1688df0d7fc25e477f4e6c0c55edfac Mon Sep 17 00:00:00 2001
|
|
From: Gustavo Zacarias <gustavo@zacarias.com.ar>
|
|
Date: Sun, 6 Mar 2016 22:52:02 +0100
|
|
Subject: [PATCH] build-system: fixes for cross-compilation
|
|
|
|
Avoid the libcap buildsys forcing CC/CFLAGS/LDFLAGS/AR/RANLIB
|
|
Also install the shared lib +x
|
|
|
|
Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
|
|
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
|
|
|
|
diff --git a/Make.Rules b/Make.Rules
|
|
index ec1c474..8a8fc50 100644
|
|
--- a/Make.Rules
|
|
+++ b/Make.Rules
|
|
@@ -48,25 +48,25 @@ MINOR=24
|
|
KERNEL_HEADERS := $(topdir)/libcap/include/uapi
|
|
IPATH += -fPIC -I$(KERNEL_HEADERS) -I$(topdir)/libcap/include
|
|
|
|
-CC := gcc
|
|
-CFLAGS := -O2 -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64
|
|
-BUILD_CC := $(CC)
|
|
-BUILD_CFLAGS := $(CFLAGS) $(IPATH)
|
|
-AR := ar
|
|
-RANLIB := ranlib
|
|
+CC ?= gcc
|
|
+CFLAGS ?= -O2 -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64
|
|
+BUILD_CC ?= $(CC)
|
|
+BUILD_CFLAGS ?= $(CFLAGS) $(IPATH)
|
|
+AR ?= ar
|
|
+RANLIB ?= ranlib
|
|
DEBUG = -g #-DDEBUG
|
|
WARNINGS=-Wall -Wwrite-strings \
|
|
-Wpointer-arith -Wcast-qual -Wcast-align \
|
|
-Wstrict-prototypes -Wmissing-prototypes \
|
|
-Wnested-externs -Winline -Wshadow
|
|
LD=$(CC) -Wl,-x -shared
|
|
-LDFLAGS := #-g
|
|
+LDFLAGS ?= #-g
|
|
|
|
SYSTEM_HEADERS = /usr/include
|
|
INCS=$(topdir)/libcap/include/sys/capability.h
|
|
LDFLAGS += -L$(topdir)/libcap
|
|
CFLAGS += -Dlinux $(WARNINGS) $(DEBUG)
|
|
-PAM_CAP := $(shell if [ -f /usr/include/security/pam_modules.h ]; then echo yes ; else echo no ; fi)
|
|
+PAM_CAP = no
|
|
INDENT := $(shell if [ -n "$(which indent 2>/dev/null)" ]; then echo "| indent -kr" ; fi)
|
|
DYNAMIC := $(shell if [ ! -d "$(topdir)/.git" ]; then echo yes; fi)
|
|
LIBATTR := yes
|
|
diff --git a/libcap/Makefile b/libcap/Makefile
|
|
index 20ab00f..97fea3f 100644
|
|
--- a/libcap/Makefile
|
|
+++ b/libcap/Makefile
|
|
@@ -75,7 +75,7 @@ install: all
|
|
install -m 0644 include/sys/capability.h $(INCDIR)/sys
|
|
mkdir -p -m 0755 $(LIBDIR)
|
|
install -m 0644 $(STALIBNAME) $(LIBDIR)/$(STALIBNAME)
|
|
- install -m 0644 $(MINLIBNAME) $(LIBDIR)/$(MINLIBNAME)
|
|
+ install -m 0755 $(MINLIBNAME) $(LIBDIR)/$(MINLIBNAME)
|
|
ln -sf $(MINLIBNAME) $(LIBDIR)/$(MAJLIBNAME)
|
|
ln -sf $(MAJLIBNAME) $(LIBDIR)/$(LIBNAME)
|
|
ifeq ($(FAKEROOT),)
|
|
--
|
|
1.9.1
|
|
|