[llvm-bugs] [Bug 25409] New: LLVM 3.7+ doesn't build on Illumos-based OSes (SmartOS, OpenIndiana, etc.)

via llvm-bugs llvm-bugs at lists.llvm.org
Thu Nov 5 06:05:26 PST 2015


https://llvm.org/bugs/show_bug.cgi?id=25409

            Bug ID: 25409
           Summary: LLVM 3.7+ doesn't build on Illumos-based OSes
                    (SmartOS, OpenIndiana, etc.)
           Product: Build scripts
           Version: trunk
          Hardware: PC
                OS: Solaris
            Status: NEW
          Severity: normal
          Priority: P
         Component: Makefiles
          Assignee: unassignedbugs at nondot.org
          Reporter: nikita.baksalyar at gmail.com
                CC: llvm-bugs at lists.llvm.org
    Classification: Unclassified

Hello,

Makefile.rules adds linker flags to strip dead symbols. For Solaris-like
operating systems it has the following code:

    ifeq ($(HOST_OS),SunOS)
      LD.Flags += -Wl,-z -Wl,discard-unused=sections
      ...
    endif

According to an OpenIndiana developers mailing list [1] Illumos (the
OpenSolaris fork) doesn't support the linker flag "discard-unused=sections"
yet. It's available only on Oracle's Solaris 11.1 [2].

That makes it impossible to compile LLVM on Illumos derivatives, such as Joyent
SmartOS, OmniOS, and others.

Both Illumos and Oracle Solaris support `-z ignore` flag, though, that is
similar (but not equivalent) to `discard-unused=sections`. So this bug can be
easily fixed by replacing the "discard-unused=sections" with "ignore".

If maintainers are OK with such a fix, I can submit a patch.

Thanks!

[1] http://openindiana.org/pipermail/oi-dev/2015-June/003696.html
[2] https://docs.oracle.com/cd/E26502_01/html/E26507/glmth.html

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20151105/7aefac08/attachment.html>


More information about the llvm-bugs mailing list