Build everything using -fPIC
Signed-off-by: David Cantrell <dcantrell@redhat.com>
This commit is contained in:
parent
67cb0dcb06
commit
4bae71fff2
@ -1,6 +1,6 @@
|
|||||||
diff -up mandoc-1.14.5/Makefile.orig mandoc-1.14.5/Makefile
|
diff -up mandoc-1.14.5/Makefile.orig mandoc-1.14.5/Makefile
|
||||||
--- mandoc-1.14.5/Makefile.orig 2019-03-10 05:56:43.000000000 -0400
|
--- mandoc-1.14.5/Makefile.orig 2019-03-10 05:56:43.000000000 -0400
|
||||||
+++ mandoc-1.14.5/Makefile 2020-03-05 12:37:41.995031115 -0500
|
+++ mandoc-1.14.5/Makefile 2020-03-05 14:16:20.816988115 -0500
|
||||||
@@ -17,6 +17,10 @@
|
@@ -17,6 +17,10 @@
|
||||||
|
|
||||||
VERSION = 1.14.5
|
VERSION = 1.14.5
|
||||||
@ -21,24 +21,16 @@ diff -up mandoc-1.14.5/Makefile.orig mandoc-1.14.5/Makefile
|
|||||||
|
|
||||||
install: base-install $(INSTALL_TARGETS)
|
install: base-install $(INSTALL_TARGETS)
|
||||||
|
|
||||||
@@ -388,11 +392,15 @@ include Makefile.depend
|
@@ -392,7 +396,7 @@ distclean: clean
|
||||||
|
|
||||||
# === TARGETS CONTAINING SHELL COMMANDS ================================
|
|
||||||
|
|
||||||
+LIBMANDOC_PIC_OBJS = $(COMPAT_OBJS:.o=.pic.o) $(LIBMANDOC_OBJS:.o=.pic.o)
|
|
||||||
+%.pic.o: %.c
|
|
||||||
+ $(CC) -c $(CFLAGS) $(CPPFLAGS) -fPIC $< -o $@
|
|
||||||
+
|
|
||||||
distclean: clean
|
|
||||||
rm -f Makefile.local config.h config.h.old config.log config.log.old
|
rm -f Makefile.local config.h config.h.old config.log config.log.old
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
- rm -f libmandoc.a $(LIBMANDOC_OBJS) $(COMPAT_OBJS)
|
- rm -f libmandoc.a $(LIBMANDOC_OBJS) $(COMPAT_OBJS)
|
||||||
+ rm -f libmandoc.a libmandoc.so.$(SOVERSION) $(LIBMANDOC_OBJS) $(LIBMANDOC_PIC_OBJS) $(COMPAT_OBJS)
|
+ rm -f libmandoc.a libmandoc.so.$(SOVERSION) $(LIBMANDOC_OBJS) $(COMPAT_OBJS)
|
||||||
rm -f mandoc $(MAIN_OBJS)
|
rm -f mandoc $(MAIN_OBJS)
|
||||||
rm -f man.cgi $(CGI_OBJS)
|
rm -f man.cgi $(CGI_OBJS)
|
||||||
rm -f mandocd catman catman.o $(MANDOCD_OBJS)
|
rm -f mandocd catman catman.o $(MANDOCD_OBJS)
|
||||||
@@ -431,11 +439,14 @@ base-install: mandoc demandoc soelim
|
@@ -431,11 +435,14 @@ base-install: mandoc demandoc soelim
|
||||||
$(INSTALL_MAN) makewhatis.8 \
|
$(INSTALL_MAN) makewhatis.8 \
|
||||||
$(DESTDIR)$(MANDIR)/man8/$(BINM_MAKEWHATIS).8
|
$(DESTDIR)$(MANDIR)/man8/$(BINM_MAKEWHATIS).8
|
||||||
|
|
||||||
@ -54,7 +46,7 @@ diff -up mandoc-1.14.5/Makefile.orig mandoc-1.14.5/Makefile
|
|||||||
$(INSTALL_LIB) eqn.h man.h mandoc.h mandoc_aux.h mandoc_parse.h \
|
$(INSTALL_LIB) eqn.h man.h mandoc.h mandoc_aux.h mandoc_parse.h \
|
||||||
mdoc.h roff.h tbl.h $(DESTDIR)$(INCLUDEDIR)
|
mdoc.h roff.h tbl.h $(DESTDIR)$(INCLUDEDIR)
|
||||||
$(INSTALL_MAN) mandoc.3 mandoc_escape.3 mandoc_malloc.3 \
|
$(INSTALL_MAN) mandoc.3 mandoc_escape.3 mandoc_malloc.3 \
|
||||||
@@ -485,6 +496,8 @@ uninstall:
|
@@ -485,6 +492,8 @@ uninstall:
|
||||||
rm -f $(DESTDIR)$(MANDIR)/man8/mandocd.8
|
rm -f $(DESTDIR)$(MANDIR)/man8/mandocd.8
|
||||||
rm -f $(DESTDIR)$(MANDIR)/man8/$(BINM_CATMAN).8
|
rm -f $(DESTDIR)$(MANDIR)/man8/$(BINM_CATMAN).8
|
||||||
rm -f $(DESTDIR)$(LIBDIR)/libmandoc.a
|
rm -f $(DESTDIR)$(LIBDIR)/libmandoc.a
|
||||||
@ -63,12 +55,12 @@ diff -up mandoc-1.14.5/Makefile.orig mandoc-1.14.5/Makefile
|
|||||||
rm -f $(DESTDIR)$(MANDIR)/man3/mandoc.3
|
rm -f $(DESTDIR)$(MANDIR)/man3/mandoc.3
|
||||||
rm -f $(DESTDIR)$(MANDIR)/man3/mandoc_escape.3
|
rm -f $(DESTDIR)$(MANDIR)/man3/mandoc_escape.3
|
||||||
rm -f $(DESTDIR)$(MANDIR)/man3/mandoc_malloc.3
|
rm -f $(DESTDIR)$(MANDIR)/man3/mandoc_malloc.3
|
||||||
@@ -514,6 +527,15 @@ Makefile.local config.h: configure $(TES
|
@@ -514,6 +523,15 @@ Makefile.local config.h: configure $(TES
|
||||||
libmandoc.a: $(COMPAT_OBJS) $(LIBMANDOC_OBJS)
|
libmandoc.a: $(COMPAT_OBJS) $(LIBMANDOC_OBJS)
|
||||||
ar rs $@ $(COMPAT_OBJS) $(LIBMANDOC_OBJS)
|
ar rs $@ $(COMPAT_OBJS) $(LIBMANDOC_OBJS)
|
||||||
|
|
||||||
+libmandoc.so.$(SOVERSION): $(LIBMANDOC_PIC_OBJS)
|
+libmandoc.so.$(SOVERSION): $(LIBMANDOC_OBJS)
|
||||||
+ $(CC) -shared -Wl,-soname=libmandoc.so.$(SOMAJOR) -o $@ $(LIBMANDOC_PIC_OBJS)
|
+ $(CC) -shared -Wl,-soname=libmandoc.so.$(SOMAJOR) -o $@ $(LIBMANDOC_OBJS)
|
||||||
+
|
+
|
||||||
+libmandoc.so.$(SOMAJOR): libmandoc.so.$(SOVERSION)
|
+libmandoc.so.$(SOMAJOR): libmandoc.so.$(SOVERSION)
|
||||||
+ ln -sf libmandoc.so.$(SOVERSION) libmandoc.so.$(SOMAJOR)
|
+ ln -sf libmandoc.so.$(SOVERSION) libmandoc.so.$(SOMAJOR)
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
Name: mandoc
|
Name: mandoc
|
||||||
Version: 1.14.5
|
Version: 1.14.5
|
||||||
Release: 6%{?dist}
|
Release: 7%{?dist}
|
||||||
Summary: A suite of tools for compiling mdoc and man
|
Summary: A suite of tools for compiling mdoc and man
|
||||||
|
|
||||||
License: ISC
|
License: ISC
|
||||||
@ -79,7 +79,7 @@ echo 'INSTALL_DATA="${INSTALL} -m 0644"' >> configure.local
|
|||||||
|
|
||||||
echo 'INSTALL_LIBMANDOC=1' >> configure.local
|
echo 'INSTALL_LIBMANDOC=1' >> configure.local
|
||||||
|
|
||||||
echo 'CFLAGS="%{optflags}"' >> configure.local
|
echo 'CFLAGS="%{optflags} -fPIC"' >> configure.local
|
||||||
./configure
|
./configure
|
||||||
make %{?_smp_mflags}
|
make %{?_smp_mflags}
|
||||||
|
|
||||||
@ -237,6 +237,9 @@ fi
|
|||||||
%{_mandir}/man3/tbl.3*
|
%{_mandir}/man3/tbl.3*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Thu Mar 05 2020 David Cantrell <dcantrell@redhat.com> - 1.14.5-7
|
||||||
|
- Build everything using -fPIC
|
||||||
|
|
||||||
* Thu Mar 05 2020 David Cantrell <dcantrell@redhat.com> - 1.14.5-6
|
* Thu Mar 05 2020 David Cantrell <dcantrell@redhat.com> - 1.14.5-6
|
||||||
- Include libmandoc.a in libmandoc-devel
|
- Include libmandoc.a in libmandoc-devel
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user