Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 9 Mar 2018 18:51:24 +0000 (UTC)
From:      Bryan Drewery <bdrewery@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r330702 - head/lib/libmagic
Message-ID:  <201803091851.w29IpOrR045578@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: bdrewery
Date: Fri Mar  9 18:51:24 2018
New Revision: 330702
URL: https://svnweb.freebsd.org/changeset/base/330702

Log:
  LIB32: Avoid linking in unneeded (and invalid lib32) libz for libmagic build tool.
  
  Usually this is just ignored:
    /usr/bin/ld: skipping incompatible /scratch/obj/root/git/freebsd/amd64.amd64/obj-lib32/lib/libz/libz.so when searching for -lz
    /usr/bin/ld: skipping incompatible /scratch/obj/root/git/freebsd/amd64.amd64/obj-lib32/lib/libz/libz.a when searching for -lz
  
  However some combination of newer toolchains simply fail here instead:
    /usr/bin/ld: error: /home/dstolfa/obj/home/dstolfa/cadets/amd64.amd64/obj-lib32/lib/libz/libz.so is incompatible with /usr/lib/crt1.o
  
  Libz is not needed for mkmagic so just exclude it.
  
  Reported by:	Domagoj Stolfa <domagoj.stolfa@gmail.com>
  MFC after:	2 weeks
  Sponsored by:	Dell EMC

Modified:
  head/lib/libmagic/Makefile

Modified: head/lib/libmagic/Makefile
==============================================================================
--- head/lib/libmagic/Makefile	Fri Mar  9 18:45:13 2018	(r330701)
+++ head/lib/libmagic/Makefile	Fri Mar  9 18:51:24 2018	(r330702)
@@ -8,7 +8,9 @@ CONTRDIR=	${SRCTOP}/contrib/file
 
 LIB=	magic
 SHLIB_MAJOR=	4
+.if !make(build-tools)
 LIBADD=	z
+.endif
 MAN=	libmagic.3 magic.5
 
 SRCS=	apprentice.c apptype.c ascmagic.c cdf.c cdf_time.c compress.c \



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201803091851.w29IpOrR045578>