From 6fbf5e8eb7b027760018983dc46716c815a79e2d Mon Sep 17 00:00:00 2001 From: Xin Ouyang Date: Tue, 21 Feb 2012 14:55:39 +0800 Subject: libsepol: Apply ranlib patch for cross compiling. --- ...ibsepol-Change-ranlib-for-cross-compiling.patch | 31 ++++++++++++++++++++++ recipes-security/selinux/libsepol_2.1.4.bb | 2 ++ recipes-security/selinux/libsepol_git.bb | 2 ++ 3 files changed, 35 insertions(+) create mode 100644 recipes-security/selinux/libsepol/libsepol-Change-ranlib-for-cross-compiling.patch diff --git a/recipes-security/selinux/libsepol/libsepol-Change-ranlib-for-cross-compiling.patch b/recipes-security/selinux/libsepol/libsepol-Change-ranlib-for-cross-compiling.patch new file mode 100644 index 0000000..f2fc313 --- /dev/null +++ b/recipes-security/selinux/libsepol/libsepol-Change-ranlib-for-cross-compiling.patch @@ -0,0 +1,31 @@ +From 2ee1e9651ec4aa78daf15dfef74e0b6aaeb8db1e Mon Sep 17 00:00:00 2001 +From: Xin Ouyang +Date: Tue, 21 Feb 2012 14:47:45 +0800 +Subject: [PATCH] libsepol: Change ranlib for cross compiling. + +Use target host-tools to encapsulate any difference between local tools +on different machines. For example, on local PC, libsepol.a's index could +be added successfully by local ranlib, however, it will fail on some sever, +so we'd better use host-tools $(AR) rather than any local ranlib. + +Signed-off-by: Harry Ciao +--- + src/Makefile | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/src/Makefile b/src/Makefile +index cd8e767..beea232 100644 +--- a/src/Makefile ++++ b/src/Makefile +@@ -21,7 +21,7 @@ all: $(LIBA) $(LIBSO) $(LIBPC) + + $(LIBA): $(OBJS) + $(AR) rcs $@ $^ +- ranlib $@ ++ $(AR) s $@ + + $(LIBSO): $(LOBJS) + $(CC) $(CFLAGS) $(LDFLAGS) -shared -o $@ $^ -Wl,-soname,$(LIBSO),--version-script=libsepol.map,-z,defs +-- +1.7.5.4 + diff --git a/recipes-security/selinux/libsepol_2.1.4.bb b/recipes-security/selinux/libsepol_2.1.4.bb index 2a7633b..4e795a2 100644 --- a/recipes-security/selinux/libsepol_2.1.4.bb +++ b/recipes-security/selinux/libsepol_2.1.4.bb @@ -14,5 +14,7 @@ inherit lib_package SRC_URI[md5sum] = "909dae553edb34ea2224002a0c529cb0" SRC_URI[sha256sum] = "8f5ea42ae6cc00b21f0e5f31f354d19fcce3edfe9328971d266245718714b1e8" +SRC_URI += "file://libsepol-Change-ranlib-for-cross-compiling.patch" + BBCLASSEXTEND = "native" diff --git a/recipes-security/selinux/libsepol_git.bb b/recipes-security/selinux/libsepol_git.bb index a66fee2..310692b 100644 --- a/recipes-security/selinux/libsepol_git.bb +++ b/recipes-security/selinux/libsepol_git.bb @@ -14,5 +14,7 @@ inherit lib_package SRCREV = "339f8079d7b9dd1e0b0138e2d096dc7c60b2092e" PV = "2.1.4+git${SRCPV}" +SRC_URI += "file://libsepol-Change-ranlib-for-cross-compiling.patch" + BBCLASSEXTEND = "native" -- cgit v1.2.3-54-g00ecf