Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 25 Aug 2017 17:07:40 +0000
From:      bugzilla-noreply@freebsd.org
To:        freebsd-ports-bugs@FreeBSD.org
Subject:   [Bug 221809] print/openprinting: linker invoked with invalid -Mmapfile argument
Message-ID:  <bug-221809-13@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D221809

            Bug ID: 221809
           Summary: print/openprinting: linker invoked with invalid
                    -Mmapfile argument
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: Individual Port(s)
          Assignee: freebsd-ports-bugs@FreeBSD.org
          Reporter: emaste@freebsd.org
            Blocks: 214864

I've been investigating building the ports tree with LLVM's lld installed as
/usr/bin/ld (via the exp-run in PR 214864). Through this I've found a few
common issues, some of which are due to limitations of lld or choices made =
by
its authors, and some of which are problems in the ports themselves.
print/openprinting is affected by one of the latter cases.

When linking with lld the build failed with:

cc -shared  .libs/common.o .libs/uri.o .libs/list.o .libs/attribute.o
.libs/status.o .libs/library.o .libs/misc.o  -L/usr/local/lib -lintl=20
-Wl,-Mmapfile -Wl,-soname -Wl,libpapi-common.so.0 -o
.libs/libpapi-common.so.0.0.0
/usr/bin/ld: error: unknown argument: -Mmapfile

GNU ld documents -M as:
       -M
       --print-map
           Print a link map to the standard output.  A link map provides
           information about the link, including the following:

to write the mapping to a file the argument is:

       -Map mapfile
           Print a link map to the file mapfile.  See the description of the
           -M option, above.

so presumably this should be using -Wl,-Map,mapfile in $LDFLAGS

It appears that when GNU ld is invoked with -Mmapfile outputs the mapfile to
stdout and discards the rest of the argument.


Referenced Bugs:

https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D214864
[Bug 214864] [exp-run] test build with lld as /usr/bin/ld
--=20
You are receiving this mail because:
You are the assignee for the bug.=



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