libselinux/libselinux-tlssegneg.patch

24 lines
683 B
Diff

--- libselinux-1.30.19/src/Makefile.notls 2006-08-01 14:16:38.000000000 -0400
+++ libselinux-1.30.19/src/Makefile 2006-08-01 14:37:15.000000000 -0400
@@ -24,6 +24,11 @@
override CFLAGS += -I../include -I$(INCLUDEDIR) -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64
RANLIB=ranlib
+ARCH := $(patsubst i%86,i386,$(shell uname -m))
+ifneq (,$(filter i386,$(ARCH)))
+TLSFLAGS += -mno-tls-direct-seg-refs
+endif
+
SWIG = swig -Wall -python -o $(SWIGCOUT) -outdir ./
all: $(LIBA) $(LIBSO)
@@ -45,7 +50,7 @@
ln -sf $@ $(TARGET)
%.o: %.c policy.h
- $(CC) $(CFLAGS) -c -o $@ $<
+ $(CC) $(CFLAGS) $(TLSFLAGS) -c -o $@ $<
%.lo: %.c policy.h
$(CC) $(CFLAGS) -fpic -DSHARED -c -o $@ $<