Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 7 Oct 2012 01:48:35 -0700
From:      Garrett Cooper <yanegomi@gmail.com>
To:        freebsd-bugs@freebsd.org
Cc:        Max Khon <fjoe@FreeBSD.org>, Marcel Moolenaar <marcel@FreeBSD.org>, "Simon J. Gerraty" <sjg@NetBSD.org>
Subject:   Re: misc/172440: [patch] [build] fix broken CTFCONVERT_CMD call
Message-ID:  <CAGH67wR9P_QzR0Wd8EUd5EQ0xuLqVssGjsmZNEt%2B-7iiL1DGXg@mail.gmail.com>
In-Reply-To: <201210070710.q977A9p8087371@freefall.freebsd.org>
References:  <201210070701.q977170a033550@red.freebsd.org> <201210070710.q977A9p8087371@freefall.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
--bcaec54d42949c28ee04cb742b92
Content-Type: text/plain; charset=ISO-8859-1

    Correction -- bmake hates empty strings for commands too...

bmake: ${CTFCONVERT_CMD} expands to empty string
cc  -O2 -pipe -DMALLOC_PRODUCTION -march=prescott -I/usr/src/lib/libmd
-DSHA1_ASM -DRMD160_ASM -std=gnu99 -fstack-protector -Wno-pointer-sign
-c sha1hl.c -o sha1hl.o
bmake: ${CTFCONVERT_CMD} expands to empty string
cc  -O2 -pipe -DMALLOC_PRODUCTION -march=prescott -I/usr/src/lib/libmd
-DSHA1_ASM -DRMD160_ASM -std=gnu99 -fstack-protector -Wno-pointer-sign
-c /usr/src/lib/libmd/sha256c.c -o sha256c.o
bmake: ${CTFCONVERT_CMD} expands to empty string
cc  -O2 -pipe -DMALLOC_PRODUCTION -march=prescott -I/usr/src/lib/libmd
-DSHA1_ASM -DRMD160_ASM -std=gnu99 -fstack-protector -Wno-pointer-sign
-c sha256hl.c -o sha256hl.o
bmake: ${CTFCONVERT_CMD} expands to empty string
cc  -O2 -pipe -DMALLOC_PRODUCTION -march=prescott -I/usr/src/lib/libmd
-DSHA1_ASM -DRMD160_ASM -std=gnu99 -fstack-protector -Wno-pointer-sign
-c /usr/src/lib/libmd/sha512c.c -o sha512c.o
bmake: ${CTFCONVERT_CMD} expands to empty string
cc  -O2 -pipe -DMALLOC_PRODUCTION -march=prescott -I/usr/src/lib/libmd
-DSHA1_ASM -DRMD160_ASM -std=gnu99 -fstack-protector -Wno-pointer-sign
-c sha512hl.c -o sha512hl.o
bmake: ${CTFCONVERT_CMD} expands to empty string
cc -O2 -pipe -DMALLOC_PRODUCTION -march=prescott -I/usr/src/lib/libmd
-DSHA1_ASM -DRMD160_ASM -std=gnu99 -fstack-protector -Wno-pointer-sign
 -DELF -Wa,--noexecstack -c /usr/src/lib/libmd/i386/sha.S
bmake: ${CTFCONVERT_CMD} expands to empty string
cc -O2 -pipe -DMALLOC_PRODUCTION -march=prescott -I/usr/src/lib/libmd
-DSHA1_ASM -DRMD160_ASM -std=gnu99 -fstack-protector -Wno-pointer-sign
 -DELF -Wa,--noexecstack -c /usr/src/lib/libmd/i386/rmd160.S
bmake: ${CTFCONVERT_CMD} expands to empty string
building static md library
ranlib libmd.a
cc -pg  -O2 -pipe -DMALLOC_PRODUCTION -march=prescott
-I/usr/src/lib/libmd -DSHA1_ASM -DRMD160_ASM -std=gnu99
-fstack-protector -Wno-pointer-sign -c /usr/src/lib/libmd/md4c.c -o
md4c.po
bmake: ${CTFCONVERT_CMD} expands to empty string
cc -pg  -O2 -pipe -DMALLOC_PRODUCTION -march=prescott
-I/usr/src/lib/libmd -DSHA1_ASM -DRMD160_ASM -std=gnu99
-fstack-protector -Wno-pointer-sign -c /usr/src/lib/libmd/md5c.c -o
md5c.po
bmake: ${CTFCONVERT_CMD} expands to empty string

    The attached patch is correct per bmake today (if empty strings in
bmake should be supported, a similar shim will need to be added for it
as was added for pmake with r228157), and it seems to be accepted (or
at least not explicitly denied) per POSIX
(http://pubs.opengroup.org/onlinepubs/009695399/utilities/make.html):

The algorithm for determining a new entry for target rules is
partially unspecified. Some historical makes allow blank, empty, or
comment lines within the collection of commands marked by leading
<tab>s. A conforming makefile must ensure that each command starts
with a <tab>, but implementations are free to ignore blank, empty, and
comment lines without triggering the start of a new entry.s

    FWIW, the logic in this block was broken in r236338 by moving away
from 5${DATE} to a ${RELENG_MAJOR_VERSION}${DATE} format. It's
unfortunate that the new versioning scheme messed this up, but I
understand the logic behind the new format as a good chunk of features
committed to 10.x's version of pmake haven't been backported to
stable/9 or earlier as it would potentially break things and one would
need to do this in order to bootstrap make only when needed.
    I've CCed interested parties for the empty command enhancement in
bmake as bmake has upstream sources and as such we shouldn't be
changing things arbitrarily without talking with Simon first.
Thanks!
-Garrett

--bcaec54d42949c28ee04cb742b92
Content-Type: text/plain; charset=US-ASCII; 
	name="fix-MAKE_VERSION-nul-CTFCONVERT_CMD-check.patch.txt"
Content-Disposition: attachment; 
	filename="fix-MAKE_VERSION-nul-CTFCONVERT_CMD-check.patch.txt"
Content-Transfer-Encoding: base64
X-Attachment-Id: f_h7zua72r1

SW5kZXg6IHNoYXJlL21rL2JzZC5vd24ubWsKPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotLS0gc2hhcmUvbWsvYnNkLm93
bi5tawkocmV2aXNpb24gMjQxMzA5KQorKysgc2hhcmUvbWsvYnNkLm93bi5tawkod29ya2luZyBj
b3B5KQpAQCAtNjcxLDcgKzY3Miw4IEBACiAKIC5pZiAke01LX0NURn0gIT0gIm5vIgogQ1RGQ09O
VkVSVF9DTUQ9CSR7Q1RGQ09OVkVSVH0gJHtDVEZGTEFHU30gJHsuVEFSR0VUfQotLmVsaWYgZGVm
aW5lZChNQUtFX1ZFUlNJT04pICYmICR7TUFLRV9WRVJTSU9OfSA+PSA1MjAxMTExMzAwCisuZWxp
ZiAhZGVmaW5lZChXSVRIX0JNQUtFKSAmJiBcCisgICAgICAoZGVmaW5lZChNQUtFX1ZFUlNJT04p
ICYmICR7TUFLRV9WRVJTSU9OfSA+PSAxMDIwMTIwNTMwMCkKIENURkNPTlZFUlRfQ01EPQogLmVs
c2UKIENURkNPTlZFUlRfQ01EPQlAOgo=
--bcaec54d42949c28ee04cb742b92--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAGH67wR9P_QzR0Wd8EUd5EQ0xuLqVssGjsmZNEt%2B-7iiL1DGXg>