aboutsummaryrefslogtreecommitdiffstats
path: root/print
diff options
context:
space:
mode:
authoremaste <emaste@FreeBSD.org>2018-04-05 10:43:07 +0800
committeremaste <emaste@FreeBSD.org>2018-04-05 10:43:07 +0800
commitfa7399973462212ca3eda1b35b28c5f6cdb26ab2 (patch)
treec5fa20851ac4dce9eea4fc7f080e54d2b07c2002 /print
parent2a5af52877a8680976c428e0a5a8758bad4b25d9 (diff)
downloadfreebsd-ports-gnome-fa7399973462212ca3eda1b35b28c5f6cdb26ab2.tar.gz
freebsd-ports-gnome-fa7399973462212ca3eda1b35b28c5f6cdb26ab2.tar.zst
freebsd-ports-gnome-fa7399973462212ca3eda1b35b28c5f6cdb26ab2.zip
print/openprinting: fix build when lld is the system linker
This port passes an invalid argument -Mmapfile to the linker. Per GNU BFD ld's manpage, link map options are -M or --print-map to print a link map to stdout, or -Map mapfile to print a link map to mapfile. It appears that ld.bfd accepts -Mmapfile as a synonym for -M due to some quirk of its parser; lld simply fails with an unknown argument error. This port's embedded copy of libtool was also too old to know that it should pass the -fuse-ld flag from LDFLAGS through to the linker, and also too old to match the sed expression in Mk/Uses/libtool.mk that patches in knowledge of -fuse-ld. Thus, patch ltmain.sh to add -fuse-ld=bfd as a passthrough flag. I do not know why libtool's authors believed that silently dropping flags from a user's provided LDFLAGS was (is) a sensible thing to do. PR: 221809 Approved by: ler Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D14968
Diffstat (limited to 'print')
-rw-r--r--print/openprinting/Makefile1
-rw-r--r--print/openprinting/files/patch-ltmain.sh14
2 files changed, 15 insertions, 0 deletions
diff --git a/print/openprinting/Makefile b/print/openprinting/Makefile
index 73df9256077c..826d009d7ad8 100644
--- a/print/openprinting/Makefile
+++ b/print/openprinting/Makefile
@@ -19,6 +19,7 @@ USE_LDCONFIG= yes
GNU_CONFIGURE= yes
INSTALL_TARGET= install-strip
MAKE_JOBS_UNSAFE= yes
+LLD_UNSAFE= yes
CPPFLAGS+= -I${LOCALBASE}/include
LIBS+= -L${LOCALBASE}/lib -lintl
diff --git a/print/openprinting/files/patch-ltmain.sh b/print/openprinting/files/patch-ltmain.sh
new file mode 100644
index 000000000000..a1bf1f9763b9
--- /dev/null
+++ b/print/openprinting/files/patch-ltmain.sh
@@ -0,0 +1,14 @@
+--- ltmain.sh.orig 2018-04-04 21:26:22.534684000 -0400
++++ ltmain.sh 2018-04-04 21:26:32.219631000 -0400
+@@ -1288,6 +1288,11 @@
+ continue
+ ;;
+
++ -fuse-ld=*)
++ compiler_flags="$compiler_flags $qarg"
++ continue
++ ;;
++
+ -inst-prefix-dir)
+ prev=inst_prefix
+ continue