aboutsummaryrefslogtreecommitdiff
path: root/libraries/soil/linking_correctly.patch
diff options
context:
space:
mode:
authorLarry Hajali <larryhaja[at]gmail[dot]com>2013-01-08 17:20:32 +0100
committerdsomero <xgizzmo@slackbuilds.org>2013-01-09 18:52:27 -0500
commit6375d5b12e194283a398ccf27d8bde9eb10ba792 (patch)
tree75059a23ce1e625f99609b4ee97c00523160041f /libraries/soil/linking_correctly.patch
parentfeddaaeedc0581171055c5f8de58b217b79507ac (diff)
libraries/soil: Added (C OpenGL texture library).
Signed-off-by: Matteo Bernardini <ponce@slackbuilds.org>
Diffstat (limited to 'libraries/soil/linking_correctly.patch')
-rw-r--r--libraries/soil/linking_correctly.patch25
1 files changed, 25 insertions, 0 deletions
diff --git a/libraries/soil/linking_correctly.patch b/libraries/soil/linking_correctly.patch
new file mode 100644
index 000000000000..edae0d95696d
--- /dev/null
+++ b/libraries/soil/linking_correctly.patch
@@ -0,0 +1,25 @@
+We need to add -fPIC for the dynamic lib. Additionally this links
+libsoil against libm and libGL as it uses symbols from them.
+
+diff --git a/projects/makefile/alternate Makefile.txt b/projects/makefile/alternate Makefile.txt
+index b2ff3a4..649526b 100644
+--- a/projects/makefile/alternate Makefile.txt
++++ b/projects/makefile/alternate Makefile.txt
+@@ -4,7 +4,7 @@ INSTALL_FILE = install -p -o root -g root -m 644
+ INSTALL_DIR = install -p -o root -g root -d
+ LN = ln -s
+ RM = rm -fv
+-CFLAGS += -c -O2 -Wall
++CFLAGS += -c -Wall -fPIC
+ LDFLAGS +=
+
+ CFILES = image_DXT.c image_helper.c SOIL.c stb_image_aug.c
+@@ -29,7 +29,7 @@ lib: $(OFILES)
+ # create static library
+ ar -cvq $(LIBNAME).a $(OFILES)
+ # create shared library
+- gcc -shared -Wl,-soname,$(LIBNAME).so.$(MAJOR) -o $(LIBNAME).so.$(VERSION) $(OFILES)
++ gcc -shared -Wl,-soname,$(LIBNAME).so.$(MAJOR) -o $(LIBNAME).so.$(VERSION) $(OFILES) -lGL -lm
+
+ install:
+ $(INSTALL_DIR) $(DESTDIR)/$(INCLUDEDIR)