File 0001-build-avoid-static-linkage-as-well-as-RPATH-entries-.patch of Package singular

From e26b6c0b6a9f0e12567aa29fd5909ad8c8c8c491 Mon Sep 17 00:00:00 2001
From: Jan Engelhardt <jengelh@inai.de>
Date: Thu, 6 Dec 2012 04:09:55 +0100
Subject: [PATCH] build: avoid static linkage as well as RPATH entries in
 singular binary

Distros do not like it _at all_ if the binary has RPATH entries to
locations within the build environment. As it stands, the -static
flag is causing these.
---
 Singular/Makefile.am        |   14 +++++++-------
 factory/Makefile.am         |    4 ++--
 kernel/Makefile.am          |    4 ++--
 libpolys/coeffs/Makefile.am |    4 ++--
 libpolys/tests/Makefile.am  |    8 ++++----
 omalloc/Makefile.am         |    6 +++---
 6 files changed, 20 insertions(+), 20 deletions(-)

diff --git a/Singular/Makefile.am b/Singular/Makefile.am
index 2fab257..6e1daa6 100644
--- a/Singular/Makefile.am
+++ b/Singular/Makefile.am
@@ -226,8 +226,8 @@ Singularg_LDADD = libSingular_g.la ${top_builddir}/numeric/libnumeric_g.la ${top
 Singular_CPPFLAGS = ${AM_CPPFLAGS} -DHAVE_CONFIG_H -DNDEBUG -DOM_NDEBUG
 Singularg_CPPFLAGS = ${AM_CPPFLAGS} -DHAVE_CONFIG_H 
 
-Singular_LDFLAGS = -static ${AMLDFLAGS}
-Singularg_LDFLAGS = -static ${AMLDFLAGS}
+Singular_LDFLAGS = ${AMLDFLAGS}
+Singularg_LDFLAGS = ${AMLDFLAGS}
 
 
 Singulard_CFLAGS = -O3 -fomit-frame-pointer ${PIPE}
@@ -257,7 +257,7 @@ Singulardg_LDFLAGS = ${AMLDFLAGS}
 ESingular_CFLAGS = -O3 -fomit-frame-pointer ${PIPE}
 ESingular_CXXFLAGS = -O3 -fomit-frame-pointer -Wextra -Wall -Wno-long-long ${PIPE} $(CXXTEMPLFLAGS)
 ESingular_CPPFLAGS = ${AM_CPPFLAGS} -DHAVE_CONFIG_H -DNDEBUG -DOM_NDEBUG -DESINGULAR -DPROTO 
-ESingular_LDFLAGS = -static ${AMLDFLAGS}
+ESingular_LDFLAGS = ${AMLDFLAGS}
 ESingular_LDADD =   -lreporter -lmisc -lomalloc -lfindexec 
 
 ESingular_SOURCES = emacs.cc fegetopt.c fegetopt.h feOptES.inc feOpt.cc
@@ -267,7 +267,7 @@ ESingular_SOURCES = emacs.cc fegetopt.c fegetopt.h feOptES.inc feOpt.cc
 TSingular_CFLAGS = -O3 -fomit-frame-pointer ${PIPE}
 TSingular_CXXFLAGS = -O3 -fomit-frame-pointer -Wextra -Wall -Wno-long-long ${PIPE} $(CXXTEMPLFLAGS)
 TSingular_CPPFLAGS = ${AM_CPPFLAGS} -DHAVE_CONFIG_H -DNDEBUG -DOM_NDEBUG -DTSINGULAR -DPROTO 
-TSingular_LDFLAGS = -static ${AMLDFLAGS}
+TSingular_LDFLAGS = ${AMLDFLAGS}
 TSingular_LDADD =   -lreporter -lmisc -lomalloc -lfindexec 
 
 TSingular_SOURCES = emacs.cc fegetopt.c fegetopt.h feOptTS.inc feOpt.cc
@@ -284,7 +284,7 @@ libparse_SOURCES = libparse.cc fegetopt.c fegetopt.h utils.cc  utils.h
  
 # # libSingular.la -lnumeric 
 libparse_LDADD = -lomalloc
-libparse_LDFLAGS = -static ${AMLDFLAGS}
+libparse_LDFLAGS = ${AMLDFLAGS}
 # TODO for libparse:
 # multiple definition of `category_out': libparse.cc v.s. utils.cc
 # undefined reference to `iiInitSingularProcinfo(procinfo*, char const*, char const*, int, long, int)'
@@ -336,8 +336,8 @@ test_s_g_LDADD = libSingular_g.la -lnumeric_g -lkernel_g -lpolys_g -lcoeffs_g -l
 test_s_r_CPPFLAGS = ${AM_CPPFLAGS} -DHAVE_CONFIG_H -DNDEBUG -DOM_NDEBUG
 test_s_g_CPPFLAGS = ${AM_CPPFLAGS} -DHAVE_CONFIG_H 
 
-test_s_r_LDFLAGS = -static ${AMLDFLAGS}
-test_s_g_LDFLAGS = -static ${AMLDFLAGS}
+test_s_r_LDFLAGS = ${AMLDFLAGS}
+test_s_g_LDFLAGS = ${AMLDFLAGS}
 
 
 # Dynamic versions
diff --git a/factory/Makefile.am b/factory/Makefile.am
index 8c366dc..2ecafb6 100644
--- a/factory/Makefile.am
+++ b/factory/Makefile.am
@@ -322,8 +322,8 @@ test_s_r_CFLAGS = -O3 -fomit-frame-pointer
 #ftmpl_inst.o
 test_s_r_LDADD = -lfactory $(FLINT_LIBS) $(GMP_LIBS) $(NTL_LIBS) $(TESTADDLIB)
 
-test_s_r_LDFLAGS = -static ${AMLDFLAGS}
-test_s_g_LDFLAGS = -static ${AMLDFLAGS}
+test_s_r_LDFLAGS = ${AMLDFLAGS}
+test_s_g_LDFLAGS = ${AMLDFLAGS}
 
 test_d_g_SOURCES = $(TESTSSOURCES)
 test_d_g_CFLAGS = -g -Wextra -Wall -pedantic -Wno-long-long -fomit-frame-pointer 
diff --git a/kernel/Makefile.am b/kernel/Makefile.am
index 3e1ec8c..ff5f2b1 100644
--- a/kernel/Makefile.am
+++ b/kernel/Makefile.am
@@ -115,8 +115,8 @@ test_s_g_LDADD = -lkernel_g -lpolys_g -lcoeffs_g -lreporter_g -lmisc_g $(FACTORY
 test_s_r_CPPFLAGS = ${AM_CPPFLAGS} -DHAVE_CONFIG_H -DNDEBUG -DOM_NDEBUG
 test_s_g_CPPFLAGS = ${AM_CPPFLAGS} -DHAVE_CONFIG_H 
 
-test_s_r_LDFLAGS = -static ${AMLDFLAGS}
-test_s_g_LDFLAGS = -static ${AMLDFLAGS}
+test_s_r_LDFLAGS = ${AMLDFLAGS}
+test_s_g_LDFLAGS = ${AMLDFLAGS}
 
 
 test_d_r_CFLAGS = -O3 -fomit-frame-pointer ${PIPE}
diff --git a/libpolys/coeffs/Makefile.am b/libpolys/coeffs/Makefile.am
index 215c46b..5cc6f6a 100644
--- a/libpolys/coeffs/Makefile.am
+++ b/libpolys/coeffs/Makefile.am
@@ -101,8 +101,8 @@ test_d_r_CPPFLAGS = ${AM_CPPFLAGS} -DHAVE_CONFIG_H -DNDEBUG -DOM_NDEBUG
 test_d_g_CPPFLAGS = ${AM_CPPFLAGS} -DHAVE_CONFIG_H
 
 
-test_s_r_LDFLAGS = -static ${AMLDFLAGS}
-test_s_g_LDFLAGS = -static ${AMLDFLAGS}
+test_s_r_LDFLAGS = ${AMLDFLAGS}
+test_s_g_LDFLAGS = ${AMLDFLAGS}
 
 test_d_r_LDFLAGS = ${AMLDFLAGS}
 test_d_g_LDFLAGS = ${AMLDFLAGS}
diff --git a/libpolys/tests/Makefile.am b/libpolys/tests/Makefile.am
index 6f61fd1..f5e575a 100644
--- a/libpolys/tests/Makefile.am
+++ b/libpolys/tests/Makefile.am
@@ -107,14 +107,14 @@ endif
 AM_LDFLAGS = -L${top_builddir}/polys -L${top_builddir}/coeffs -L${top_builddir}/reporter -L${top_builddir}/misc ${USE_FACTORY} -L${top_builddir}/../omalloc -L${top_builddir}/../findexec
 
 
-coeffs_test_s_r_LDFLAGS = ${AM_LDFLAGS} -static 
-coeffs_test_s_g_LDFLAGS = ${AM_LDFLAGS} -static 
+coeffs_test_s_r_LDFLAGS = ${AM_LDFLAGS}
+coeffs_test_s_g_LDFLAGS = ${AM_LDFLAGS}
 
 
-polys_test_s_r_LDFLAGS = ${AM_LDFLAGS} ${USEPPROCSDYNAMICLDFLAGS} -static
+polys_test_s_r_LDFLAGS = ${AM_LDFLAGS} ${USEPPROCSDYNAMICLDFLAGS}
 rings_test_s_r_LDFLAGS = $(polys_test_s_r_LDFLAGS)
 
-polys_test_s_g_LDFLAGS = ${AM_LDFLAGS} ${USEPPROCSDYNAMICLDFLAGS} -static
+polys_test_s_g_LDFLAGS = ${AM_LDFLAGS} ${USEPPROCSDYNAMICLDFLAGS}
 rings_test_s_g_LDFLAGS = $(polys_test_s_g_LDFLAGS)
 
 polys_test_d_r_LDFLAGS = ${AM_LDFLAGS} ${USEPPROCSDYNAMICLDFLAGS}
diff --git a/omalloc/Makefile.am b/omalloc/Makefile.am
index dd0635f..318a2ba 100644
--- a/omalloc/Makefile.am
+++ b/omalloc/Makefile.am
@@ -91,18 +91,18 @@ omtTest_s_g_SOURCES = $(OMTTESTSSOURCES)
 omtTest_s_g_CPPFLAGS= ${AM_CPPFLAGS} -DHAVE_CONFIG_H
 omtTest_s_g_CFLAGS  = -g -Wextra -Wall -pedantic -Wno-long-long ${PIPE}
 omtTest_s_g_LDADD   = libomalloc_g.la
-omtTest_s_g_LDFLAGS = -L${top_builddir}/omalloc -L${top_builddir}/../omalloc -static
+omtTest_s_g_LDFLAGS = -L${top_builddir}/omalloc -L${top_builddir}/../omalloc
 
 omtTest_s_m_CPPFLAGS= ${AM_CPPFLAGS} -DOM_TEST_MALLOC  -DHAVE_CONFIG_H
 omtTest_s_m_SOURCES = $(OMTTESTSSOURCES)
 omtTest_s_m_LDADD   = libomalloc_g.la
-omtTest_s_m_LDFLAGS = -L${top_builddir}/omalloc -L${top_builddir}/../omalloc -static
+omtTest_s_m_LDFLAGS = -L${top_builddir}/omalloc -L${top_builddir}/../omalloc
 
 omtTest_s_r_SOURCES = $(OMTTESTSSOURCES)
 omtTest_s_r_CPPFLAGS= ${AM_CPPFLAGS} -DOM_NDEBUG
 omtTest_s_r_CFLAGS  = -O3 ${PIPE}
 omtTest_s_r_LDADD   = libomalloc.la
-omtTest_s_r_LDFLAGS = -L${top_builddir}/omalloc -L${top_builddir}/../omalloc -static
+omtTest_s_r_LDFLAGS = -L${top_builddir}/omalloc -L${top_builddir}/../omalloc
 
 
 
-- 
1.7.10.4

openSUSE Build Service is sponsored by