summaryrefslogtreecommitdiffstats
path: root/package/cups
diff options
context:
space:
mode:
authorThomas Petazzoni <thomas.petazzoni@free-electrons.com>2016-05-14 16:17:13 +0200
committerPeter Korsgaard <peter@korsgaard.com>2016-05-25 22:45:46 +0200
commitda4264210f14259961352b9be39a4e1b10e6ed28 (patch)
tree08f3d51a899c9ef128d1da158b67191f09596e26 /package/cups
parent0dca644e443c8f28bfe5aa1c98201dc3b49e1165 (diff)
downloadbuildroot-da4264210f14259961352b9be39a4e1b10e6ed28.tar.gz
buildroot-da4264210f14259961352b9be39a4e1b10e6ed28.zip
cups: fix static linking problem
In static linking configurations, cups fails to build due to the lack of Scrt1.o from uClibc toolchains. This Scrt1.o is only needed for PIE binaries. Since we don't really care about PIE binaries in the context of Buildroot, this commit solves the problem by patching cups to not generate a PIE binary. Fixes: http://autobuild.buildroot.net/results/445a401da2f63a6c43d7c166516287db6cc977ab/ Cc: Olivier Schonken <olivier.schonken@gmail.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Diffstat (limited to 'package/cups')
-rw-r--r--package/cups/0004-remove-pie.patch21
1 files changed, 21 insertions, 0 deletions
diff --git a/package/cups/0004-remove-pie.patch b/package/cups/0004-remove-pie.patch
new file mode 100644
index 0000000000..3d81941ef4
--- /dev/null
+++ b/package/cups/0004-remove-pie.patch
@@ -0,0 +1,21 @@
+Remove PIE flags from the build
+
+Generating a statically linked binary built with PIE requires the
+Scrt1.o file, which isn't part of Buildroot uClibc toolchains. To
+solve this, we simply disable the PIE flags.
+
+Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
+
+Index: b/Makedefs.in
+===================================================================
+--- a/Makedefs.in
++++ b/Makedefs.in
+@@ -142,7 +142,7 @@
+ IPPFIND_MAN = @IPPFIND_MAN@
+ LDFLAGS = -L../cgi-bin -L../cups -L../filter -L../ppdc \
+ -L../scheduler @LDARCHFLAGS@ \
+- @LDFLAGS@ @RELROFLAGS@ @PIEFLAGS@ $(OPTIM)
++ @LDFLAGS@ @RELROFLAGS@ $(OPTIM)
+ LINKCUPS = @LINKCUPS@ $(LIBGSSAPI) $(DNSSDLIBS) $(LIBZ)
+ LINKCUPSIMAGE = @LINKCUPSIMAGE@
+ LIBS = $(LINKCUPS) $(COMMONLIBS)
OpenPOWER on IntegriCloud