|
From: <kma...@us...> - 2006-11-27 19:04:35
|
Revision: 2101
http://svn.sourceforge.net/selinux/?rev=2101&view=rev
Author: kmacmillan
Date: 2006-11-27 11:04:31 -0800 (Mon, 27 Nov 2006)
Log Message:
-----------
Author: Manoj Srivastava
Email: man...@st...
Subject: Compiling libsepol with -fPIC instead of -fpic
Date: Wed, 15 Nov 2006 00:45:25 -0600
Hi,
I've had reports of packages filing to compile on SPARC
hardware when linked with libsepol1 which was compiled with
-fpic. We seem to be hitting the global offset table size limit;
,----[ GCC manual ]
| `-fpic'
| Generate position-independent code (PIC) suitable for use in a
| shared library, if supported for the target machine. Such code
| accesses all constant addresses through a global offset table
| (GOT). The dynamic loader resolves the GOT entries when the
| program starts (the dynamic loader is not part of GCC; it is part
| of the operating system). If the GOT size for the linked
| executable exceeds a machine-specific maximum size, you get an
| error message from the linker indicating that `-fpic' does not
| work; in that case, recompile with `-fPIC' instead. (These
| maximums are 8k on the SPARC and 32k on the m68k and RS/6000. The
| 386 has no such limit.)
`----
Simply recompiling with -fPIC corrects the problem.
manoj
Acked-by: Stephen Smalley <sd...@ty...>
Acked-by: Karl MacMillan <kma...@me...>
Modified Paths:
--------------
trunk/libselinux/ChangeLog
trunk/libselinux/src/Makefile
trunk/libsemanage/ChangeLog
trunk/libsemanage/src/Makefile
trunk/libsepol/ChangeLog
trunk/libsepol/src/Makefile
Modified: trunk/libselinux/ChangeLog
===================================================================
--- trunk/libselinux/ChangeLog 2006-11-21 21:20:44 UTC (rev 2100)
+++ trunk/libselinux/ChangeLog 2006-11-27 19:04:31 UTC (rev 2101)
@@ -1,3 +1,8 @@
+1.33.2 2006-11-27
+ * Merged patch to compile wit -fPIC instead of -fpic from
+ Manoj Srivastava to prevent hitting the global offest table
+ limit. Patch changed to include libselinux and libsemanage in
+ addition to libselinux.
1.33.1 2006-10-19
* Merged updated flask definitions from Darrel Goeddel.
This adds the context security class, and also adds
Modified: trunk/libselinux/src/Makefile
===================================================================
--- trunk/libselinux/src/Makefile 2006-11-21 21:20:44 UTC (rev 2100)
+++ trunk/libselinux/src/Makefile 2006-11-27 19:04:31 UTC (rev 2101)
@@ -42,7 +42,7 @@
$(RANLIB) $@
$(SWIGLOBJ): $(SWIGCOUT)
- $(CC) $(CFLAGS) -I$(PYINC) -fpic -DSHARED -c -o $@ $<
+ $(CC) $(CFLAGS) -I$(PYINC) -fPIC -DSHARED -c -o $@ $<
$(SWIGSO): $(SWIGLOBJ)
$(CC) $(LDFLAGS) -shared -o $@ $< -L. -lselinux -L$(LIBDIR) -Wl,-soname,$@
@@ -55,7 +55,7 @@
$(CC) $(CFLAGS) $(TLSFLAGS) -c -o $@ $<
%.lo: %.c policy.h
- $(CC) $(CFLAGS) -fpic -DSHARED -c -o $@ $<
+ $(CC) $(CFLAGS) -fPIC -DSHARED -c -o $@ $<
$(SWIGCOUT): $(SWIGIF)
$(SWIG) $^
Modified: trunk/libsemanage/ChangeLog
===================================================================
--- trunk/libsemanage/ChangeLog 2006-11-21 21:20:44 UTC (rev 2100)
+++ trunk/libsemanage/ChangeLog 2006-11-27 19:04:31 UTC (rev 2101)
@@ -1,3 +1,8 @@
+1.8.1 2006-11-27
+ * Merged patch to compile wit -fPIC instead of -fpic from
+ Manoj Srivastava to prevent hitting the global offest table
+ limit. Patch changed to include libselinux and libsemanage in
+ addition to libselinux.
1.8 2006-10-17
* Updated version for release.
Modified: trunk/libsemanage/src/Makefile
===================================================================
--- trunk/libsemanage/src/Makefile 2006-11-21 21:20:44 UTC (rev 2100)
+++ trunk/libsemanage/src/Makefile 2006-11-27 19:04:31 UTC (rev 2101)
@@ -44,7 +44,7 @@
pywrap: all $(SWIGLOBJ) $(SWIGSO)
$(SWIGLOBJ): $(SWIGCOUT)
- $(CC) $(CFLAGS) -I$(PYINC) -fpic -DSHARED -c -o $@ $<
+ $(CC) $(CFLAGS) -I$(PYINC) -fPIC -DSHARED -c -o $@ $<
$(SWIGSO): $(SWIGLOBJ)
$(CC) $(LDFLAGS) -shared -o $@ $< -L. -lsemanage -l$(PYLIBVER) -L$(LIBDIR) -Wl,-soname,$@,-z,defs
@@ -69,7 +69,7 @@
$(CC) $(CFLAGS) -c -o $@ $<
%.lo: %.c
- $(CC) $(CFLAGS) -fpic -DSHARED -c -o $@ $<
+ $(CC) $(CFLAGS) -fPIC -DSHARED -c -o $@ $<
$(SWIGCOUT): $(SWIGIF)
$(SWIG) $^
Modified: trunk/libsepol/ChangeLog
===================================================================
--- trunk/libsepol/ChangeLog 2006-11-21 21:20:44 UTC (rev 2100)
+++ trunk/libsepol/ChangeLog 2006-11-27 19:04:31 UTC (rev 2101)
@@ -1,3 +1,8 @@
+1.15.3 2006-11-27
+ * Merged patch to compile wit -fPIC instead of -fpic from
+ Manoj Srivastava to prevent hitting the global offest table
+ limit. Patch changed to include libselinux and libsemanage in
+ addition to libselinux.
1.15.2 2006-10-31
* Merged fix from Karl MacMillan for a segfault when linking
non-MLS modules with users in them.
Modified: trunk/libsepol/src/Makefile
===================================================================
--- trunk/libsepol/src/Makefile 2006-11-21 21:20:44 UTC (rev 2100)
+++ trunk/libsepol/src/Makefile 2006-11-27 19:04:31 UTC (rev 2101)
@@ -24,10 +24,10 @@
ln -sf $@ $(TARGET)
%.o: %.c
- $(CC) $(CFLAGS) -fpic -c -o $@ $<
+ $(CC) $(CFLAGS) -fPIC -c -o $@ $<
%.lo: %.c
- $(CC) $(CFLAGS) -fpic -DSHARED -c -o $@ $<
+ $(CC) $(CFLAGS) -fPIC -DSHARED -c -o $@ $<
install: all
test -d $(LIBDIR) || install -m 755 -d $(LIBDIR)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|