Skip to contentSkip to conversation

libselinux-1

PATCH In review Bastian Blank 2 participants 2 messages Oct 20, 2003 – Oct 22, 2003

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 libselinux-1

hi folks

this patch fixes following problems:
- Build static lib with non-PIC files
files: src/Makefile

bastian

Signature · 2 lines
The heart is not a logical organ.
		-- Dr. Janet Wallace, "The Deadly Years", stardate 3479.4
Makefile +7 -3
Index: src/Makefile
===================================================================
@@ -9,8 +9,9 @@
 TARGET=libselinux.so
 LIBSO=$(TARGET).$(LIBVERSION)
 OBJS= $(patsubst %.c,%.o,$(wildcard *.c))
+LOBJS= $(patsubst %.c,%.lo,$(wildcard *.c))
 CFLAGS = -Wall
-override CFLAGS += -fPIC -I../include 
+override CFLAGS += -I../include 
 
 all: $(LIBA) $(LIBSO)
 
@@ -18,13 +19,16 @@
 	$(AR) rcs $@ $^
 	ranlib $@
 
-$(LIBSO): $(OBJS)
+$(LIBSO): $(LOBJS)
 	$(CC) $(LDFLAGS) -shared -o $@ $^ -lattr -Wl,-soname,$(LIBSO) 
 	ln -sf $@ $(TARGET) 
 
 %.o:  %.c
 	$(CC) -o $@ -c $(CFLAGS) $<
 
+%.lo:  %.c
+	$(CC) -o $@ -c -fPIC $(CFLAGS) $<
+
 install: all
 	test -d $(LIBDIR) || install -m 755 -d $(LIBDIR)
 	install -m 644 $(LIBA) $(LIBDIR)
@@ -32,5 +36,5 @@
 	cd $(LIBDIR) && ln -sf $(LIBSO) $(TARGET)
 
 clean: 
-	rm -f $(OBJS) $(LIBA) $(LIBSO) $(TARGET) 
+	rm -f $(OBJS) $(LOBJS) $(LIBA) $(LIBSO) $(TARGET) 
 
#1 lore raw
Quoted 5 lines · Bastian Blank

hi folks

this patch fixes following problems:
- Build static lib with non-PIC files
files: src/Makefile

Thanks, merged.

Signature · 8 lines
Stephen Smalley <[email protected]>
National Security Agency


--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to [email protected] with
the words "unsubscribe selinux" without quotes as the message.