[Bug 205905] devel/binutils Makefile has wrong COMPILER_VERSION check

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Mon Jan 4 22:15:45 UTC 2016


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=205905

            Bug ID: 205905
           Summary: devel/binutils Makefile has wrong COMPILER_VERSION
                    check
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: Individual Port(s)
          Assignee: bapt at FreeBSD.org
          Reporter: markmi at dsl-only.net
             Flags: maintainer-feedback?(bapt at FreeBSD.org)
          Assignee: bapt at FreeBSD.org

Line 58 of (/usr/ports -r404557) /user/ports/devel/binutils/Makefile is:

.if ${ARCH} != ia64 && ${ARCH} != mips && ${ARCH} != mips64 &&
!defined(PKGNAMEPREFIX) && (${COMPILER_TYPE} == clang && ${COMPILER_VERSION} >=
34 || ${COMPILER_TYPE} == gcc)

Comparing that to /usr/src/share/mk/bsd.compiler.mk notation:

.if ${COMPILER_TYPE} == "clang" || \
        (${COMPILER_TYPE} == "gcc" && ${COMPILER_VERSION} >= 40800)

/user/ports/devel/binutils/Makefile has the wrong scale of numbers for the
version check.

(It also does not use the quotes syntax for the string literals in the string
comparisons if that ever matters.)

/usr/src/share/mk/bsd.compiler.mk has:

_v!=    ${CC} --version || echo 0.0.0
. . .
.if !defined(COMPILER_VERSION)
COMPILER_VERSION!=echo ${_v:M[1-9].[0-9]*} | awk -F. '{print $$1 * 10000 + $$2
* 100 + $$3;}'
.endif

confirming the larger numbers as the normal encoding in COMPILER_VERSION as
produced by bsd.compiler.mk .

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-ports-bugs mailing list