• Skip to sidebar navigation
  • Skip to content

Bitbucket

  • More
    ProjectsRepositories
  • Help
    • Online help
    • Learn Git
    • Welcome to Bitbucket
    • Keyboard shortcuts
  • Log In
Alexander Dahl
  1. Alexander Dahl

buildroot

Public
Actions
  • Clone
  • Compare

Learn more about cloning repositories

You have read-only access

Navigation
  • Source
  • Commits
  • Branches
  • All Branches Graph
  • Forks
  1. Alexander Dahl
  2. buildroot

Source

buildroot/package/libsepol/0001-support-static-only.patch
Peter KorsgaardPeter Korsgaard committed 298cd8eaa2103 Feb 2015
Raw file
Source viewDiff to previous
xxxxxxxxxx
 
1
Add support for static-only build
2
​
3
Instead of unconditionally building shared libraries, this patch
4
improves the libsepol build system with a "STATIC" variable, which
5
when defined to some non-empty value, will disable the build of shared
6
libraries. It allows to support cases where the target architecture
7
does not have support for shared libraries.
8
​
9
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
10
​
11
Index: b/src/Makefile
12
===================================================================
13
--- a/src/Makefile
14
+++ b/src/Makefile
15
@@ -17,7 +17,12 @@
16
 CFLAGS ?= -Werror -Wall -W -Wundef -Wshadow -Wmissing-noreturn -Wmissing-format-attribute
17
 override CFLAGS += -I. -I../include -D_GNU_SOURCE
18
 
19
-all: $(LIBA) $(LIBSO) $(LIBPC)
20
+ALL_TARGETS = $(LIBA) $(LIBPC)
21
+ifeq ($(STATIC),)
22
+ALL_TARGETS += $(LIBSO)
23
+endif
24
+
25
+all: $(ALL_TARGETS)
26
 
27
 $(LIBA):  $(OBJS)
28
    $(AR) rcs $@ $^
29
@@ -39,11 +44,13 @@
30
 install: all
31
    test -d $(LIBDIR) || install -m 755 -d $(LIBDIR)
32
    install -m 644 $(LIBA) $(LIBDIR)
33
-   test -d $(SHLIBDIR) || install -m 755 -d $(SHLIBDIR)
34
-   install -m 755 $(LIBSO) $(SHLIBDIR)
35
    test -d $(LIBDIR)/pkgconfig || install -m 755 -d $(LIBDIR)/pkgconfig
36
    install -m 644 $(LIBPC) $(LIBDIR)/pkgconfig
37
+ifeq ($(STATIC),)
38
+   test -d $(SHLIBDIR) || install -m 755 -d $(SHLIBDIR)
39
+   install -m 755 $(LIBSO) $(SHLIBDIR)
40
    cd $(LIBDIR) && ln -sf ../../`basename $(SHLIBDIR)`/$(LIBSO) $(TARGET)
41
+endif
42
 
43
 relabel:
44
    /sbin/restorecon $(SHLIBDIR)/$(LIBSO)
  • Git repository management for enterprise teams powered by Atlassian Bitbucket
  • Atlassian Bitbucket v6.7.2
  • Documentation
  • Request a feature
  • About
  • Contact Atlassian
Atlassian

Everything looks good. We'll let you know here if there's anything you should know about.