Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 500674 | Differences between
and this patch

Collapse All | Expand All

(-)file_not_specified_in_diff (-9 / +10 lines)
Line  Link Here
- make sure PCRE_CFLAGS get used
- make sure PCRE_CFLAGS get used
1
- use PCRE_LIBS via pkg-config
1
- use PCRE_LIBS via pkg-config
2
- move LDFLAGS to before objects, not after
2
- move LDFLAGS to before objects, not after
3
- do not hardcode libsepol static lib
3
- do not hardcode libsepol static lib
4
- do not hardcode -L$(LIBDIR) (let the toolchain handle it)
4
- do not hardcode -L$(LIBDIR) (let the toolchain handle it)
5
- do not hardcode -I$(INCLUDEDIR) (let the toolchain handle it)
5
- do not hardcode -I$(INCLUDEDIR) (let the toolchain handle it)
6
-- a/src/Makefile
6
++ b/src/Makefile
Lines 75-81 CFLAGS ?= -O -Wall -W -Wundef -Wformat-y2k -Wformat-security -Winit-self -Wmissi Link Here
75
          -fipa-pure-const -Wno-suggest-attribute=pure -Wno-suggest-attribute=const \
75
          -fipa-pure-const -Wno-suggest-attribute=pure -Wno-suggest-attribute=const \
76
          -Werror -Wno-aggregate-return -Wno-redundant-decls
76
          -Werror -Wno-aggregate-return -Wno-redundant-decls
77
77
78
override CFLAGS += -I../include -I$(INCLUDEDIR) -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 $(EMFLAGS)
78
override CFLAGS += -I../include $(PCRE_CFLAGS) -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 $(EMFLAGS)
79
79
80
SWIG_CFLAGS += -Wno-error -Wno-unused-variable -Wno-unused-but-set-variable -Wno-unused-parameter \
80
SWIG_CFLAGS += -Wno-error -Wno-unused-variable -Wno-unused-but-set-variable -Wno-unused-parameter \
81
		-Wno-shadow -Wno-uninitialized -Wno-missing-prototypes -Wno-missing-declarations
81
		-Wno-shadow -Wno-uninitialized -Wno-missing-prototypes -Wno-missing-declarations
Lines 104-120 $(SWIGRUBYLOBJ): $(SWIGRUBYCOUT) Link Here
104
	$(CC) $(CFLAGS) $(SWIG_CFLAGS) $(RUBYINC) -fPIC -DSHARED -c -o $@ $<
104
	$(CC) $(CFLAGS) $(SWIG_CFLAGS) $(RUBYINC) -fPIC -DSHARED -c -o $@ $<
105
105
106
$(SWIGSO): $(SWIGLOBJ)
106
$(SWIGSO): $(SWIGLOBJ)
107
	$(CC) $(CFLAGS) -shared -o $@ $< -L. -lselinux $(LDFLAGS) -L$(LIBDIR)
107
	$(CC) $(CFLAGS) $(LDFLAGS) -shared -o $@ $< -L. -lselinux
108
108
109
$(SWIGRUBYSO): $(SWIGRUBYLOBJ)
109
$(SWIGRUBYSO): $(SWIGRUBYLOBJ)
110
	$(CC) $(CFLAGS) -shared -o $@ $^ -L. -lselinux $(LDFLAGS) -L$(LIBDIR)
110
	$(CC) $(CFLAGS) $(LDFLAGS) -shared -o $@ $^ -L. -lselinux
111
111
112
$(LIBA): $(OBJS)
112
$(LIBA): $(OBJS)
113
	$(AR) rcs $@ $^
113
	$(AR) rcs $@ $^
114
	$(RANLIB) $@
114
	$(RANLIB) $@
115
115
116
$(LIBSO): $(LOBJS)
116
$(LIBSO): $(LOBJS)
117
	$(CC) $(CFLAGS) -shared -o $@ $^ -lpcre -ldl $(LDFLAGS) -L$(LIBDIR) -Wl,-soname,$(LIBSO),-z,defs,-z,relro
117
	$(CC) $(CFLAGS) $(LDFLAGS) -shared -o $@ $^ -ldl $(PCRE_LIBS) -Wl,-soname,$(LIBSO),-z,defs,-z,relro
118
	ln -sf $@ $(TARGET) 
118
	ln -sf $@ $(TARGET) 
119
119
120
$(LIBPC): $(LIBPC).in ../VERSION
120
$(LIBPC): $(LIBPC).in ../VERSION
Lines 127-133 $(AUDIT2WHYLOBJ): audit2why.c Link Here
127
	$(CC) $(filter-out -Werror, $(CFLAGS)) $(PYINC) -fPIC -DSHARED -c -o $@ $<
127
	$(CC) $(filter-out -Werror, $(CFLAGS)) $(PYINC) -fPIC -DSHARED -c -o $@ $<
128
128
129
$(AUDIT2WHYSO): $(AUDIT2WHYLOBJ)
129
$(AUDIT2WHYSO): $(AUDIT2WHYLOBJ)
130
	$(CC) $(CFLAGS) -shared -o $@ $^ -L. $(LDFLAGS) -lselinux $(LIBDIR)/libsepol.a -L$(LIBDIR)
130
	$(CC) $(CFLAGS) $(LDFLAGS) -shared -o $@ $^ -L. -lselinux -lsepol
131
131
132
%.o:  %.c policy.h
132
%.o:  %.c policy.h
133
	$(CC) $(CFLAGS) $(TLSFLAGS) -c -o $@ $<
133
	$(CC) $(CFLAGS) $(TLSFLAGS) -c -o $@ $<
134
-- a/utils/Makefile
134
++ b/utils/Makefile
Lines 24-34 CFLAGS ?= -O -Wall -W -Wundef -Wformat-y2k -Wformat-security -Winit-self -Wmissi Link Here
24
          -fipa-pure-const -Wno-suggest-attribute=pure -Wno-suggest-attribute=const \
24
          -fipa-pure-const -Wno-suggest-attribute=pure -Wno-suggest-attribute=const \
25
          -Werror -Wno-aggregate-return -Wno-redundant-decls
25
          -Werror -Wno-aggregate-return -Wno-redundant-decls
26
override CFLAGS += -I../include -D_GNU_SOURCE $(EMFLAGS)
26
override CFLAGS += -I../include -D_GNU_SOURCE $(EMFLAGS)
27
LDLIBS += -L../src -lselinux -L$(LIBDIR)
27
LDLIBS += -L../src -lselinux
28
28
29
TARGETS=$(patsubst %.c,%,$(wildcard *.c))
29
TARGETS=$(patsubst %.c,%,$(wildcard *.c))
30
30
31
sefcontext_compile: LDLIBS += -lpcre
31
sefcontext_compile: CFLAGS += $(PCRE_CFLAGS)
32
sefcontext_compile: LDLIBS += $(PCRE_LIBS)
32
33
33
ifeq ($(DISABLE_AVC),y)
34
ifeq ($(DISABLE_AVC),y)
34
	UNUSED_TARGETS+=compute_av compute_create compute_member compute_relabel
35
	UNUSED_TARGETS+=compute_av compute_create compute_member compute_relabel

Return to bug 500674