From owner-p4-projects@FreeBSD.ORG Thu Oct 30 18:37:44 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 329821065673; Thu, 30 Oct 2008 18:37:44 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CBDF6106567F for ; Thu, 30 Oct 2008 18:37:43 +0000 (UTC) (envelope-from peter-gmail@wemm.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id B97E38FC25 for ; Thu, 30 Oct 2008 18:37:43 +0000 (UTC) (envelope-from peter-gmail@wemm.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id m9UIbh1Y086180 for ; Thu, 30 Oct 2008 18:37:43 GMT (envelope-from peter-gmail@wemm.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id m9UIbhgm086178 for perforce@freebsd.org; Thu, 30 Oct 2008 18:37:43 GMT (envelope-from peter-gmail@wemm.org) Date: Thu, 30 Oct 2008 18:37:43 GMT Message-Id: <200810301837.m9UIbhgm086178@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to peter-gmail@wemm.org using -f From: Peter Wemm To: Perforce Change Reviews Cc: Subject: PERFORCE change 152232 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Oct 2008 18:37:44 -0000 http://perforce.freebsd.org/chv.cgi?CH=152232 Change 152232 by peter@peter_overcee on 2008/10/30 18:37:13 Explicitly locate the path to to gnu sed. I configure with: $ env SED=/usr/local/bin/gsed ./configure --prefix=/whatever ... Undo hacks that depended on messing with $PATH. Specify $(SED) for known places that depend on gnu sed syntax. Affected files ... .. //depot/projects/valgrind/Makefile.am#8 edit .. //depot/projects/valgrind/Makefile.install.am#3 edit .. //depot/projects/valgrind/Makefile.tool-inplace.am#3 edit .. //depot/projects/valgrind/autogen.sh#6 edit .. //depot/projects/valgrind/configure.in#8 edit Differences ... ==== //depot/projects/valgrind/Makefile.am#8 (text+ko) ==== @@ -213,14 +213,14 @@ # So we search for the line with a hex value "+ SIZEOF_HEADERS", and replace # all the hex values in that line with "valt_load_address". valt_load_address_x86_freebsd.lds: Makefile - $(CC) @FLAG_M32@ -Wl,--verbose -nostdlib 2>&1 | sed \ + $(CC) @FLAG_M32@ -Wl,--verbose -nostdlib 2>&1 | $(SED) \ -e '1,/^=====\+$$/d' \ -e '/^=====\+$$/d' \ -e '/\. = 0x[0-9A-Fa-f]\+ + SIZEOF_HEADERS/s/0x[0-9A-Fa-f]\+/valt_load_address/g' > $@ \ || rm -f $@ valt_load_address_amd64_freebsd.lds: Makefile - $(CC) -m64 -Wl,--verbose -nostdlib 2>&1 | sed \ + $(CC) -m64 -Wl,--verbose -nostdlib 2>&1 | $(SED) \ -e '1,/^=====\+$$/d' \ -e '/^=====\+$$/d' \ -e '/ALIGN/s/0x100000/0x1000/g' \ @@ -228,28 +228,28 @@ || rm -f $@ valt_load_address_x86_linux.lds: Makefile - $(CC) @FLAG_M32@ -Wl,--verbose -nostdlib 2>&1 | sed \ + $(CC) @FLAG_M32@ -Wl,--verbose -nostdlib 2>&1 | $(SED) \ -e '1,/^=====\+$$/d' \ -e '/^=====\+$$/d' \ -e '/\. = 0x[0-9A-Fa-f]\+ + SIZEOF_HEADERS/s/0x[0-9A-Fa-f]\+/valt_load_address/g' > $@ \ || rm -f $@ valt_load_address_amd64_linux.lds: Makefile - $(CC) -m64 -Wl,--verbose -nostdlib 2>&1 | sed \ + $(CC) -m64 -Wl,--verbose -nostdlib 2>&1 | $(SED) \ -e '1,/^=====\+$$/d' \ -e '/^=====\+$$/d' \ -e '/\. = 0x[0-9A-Fa-f]\+ + SIZEOF_HEADERS/s/0x[0-9A-Fa-f]\+/valt_load_address/g' > $@ \ || rm -f $@ valt_load_address_ppc32_linux.lds: Makefile - $(CC) @FLAG_M32@ -Wl,--verbose -nostdlib 2>&1 | sed \ + $(CC) @FLAG_M32@ -Wl,--verbose -nostdlib 2>&1 | $(SED) \ -e '1,/^=====\+$$/d' \ -e '/^=====\+$$/d' \ -e '/\. = 0x[0-9A-Fa-f]\+ + SIZEOF_HEADERS/s/0x[0-9A-Fa-f]\+/valt_load_address/g' > $@ \ || rm -f $@ valt_load_address_ppc64_linux.lds: Makefile - $(CC) -m64 -Wl,--verbose -nostdlib 2>&1 | sed \ + $(CC) -m64 -Wl,--verbose -nostdlib 2>&1 | $(SED) \ -e '1,/^=====\+$$/d' \ -e '/^=====\+$$/d' \ -e '/\. = 0x[0-9A-Fa-f]\+ + SIZEOF_HEADERS/s/0x[0-9A-Fa-f]\+/valt_load_address/g' > $@ \ ==== //depot/projects/valgrind/Makefile.install.am#3 (text+ko) ==== @@ -25,8 +25,8 @@ install-exec-local: if [ -n "$(noinst_PROGRAMS)" ] ; then \ for f in $(noinst_PROGRAMS); do \ - name=`echo $$f | sed -e 's/-\([^-]*-[^-.]*\)\(\..*\)\?$$/\2/'`; \ - plat=`echo $$f | sed -e 's/^.*-\([^-]*-[^-.]*\)\(\..*\)\?$$/\1/'`; \ + name=`echo $$f | $(SED) -e 's/-\([^-]*-[^-.]*\)\(\..*\)\?$$/\2/'`; \ + plat=`echo $$f | $(SED) -e 's/^.*-\([^-]*-[^-.]*\)\(\..*\)\?$$/\1/'`; \ $(mkinstalldirs) $(DESTDIR)$(valdir)/$$plat; \ $(INSTALL_PROGRAM) $$f $(DESTDIR)$(valdir)/$$plat/$$name; \ done ; \ ==== //depot/projects/valgrind/Makefile.tool-inplace.am#3 (text+ko) ==== @@ -5,8 +5,8 @@ all-local: if [ -n "$(noinst_PROGRAMS)" ] ; then \ for f in $(noinst_PROGRAMS); do \ - name=`echo $$f | sed -e 's/-\([^-]*-[^-.]*\)\(\..*\)\?$$/\2/'`; \ - plat=`echo $$f | sed -e 's/^.*-\([^-]*-[^-.]*\)\(\..*\)\?$$/\1/'`; \ + name=`echo $$f | $(SED) -e 's/-\([^-]*-[^-.]*\)\(\..*\)\?$$/\2/'`; \ + plat=`echo $$f | $(SED) -e 's/^.*-\([^-]*-[^-.]*\)\(\..*\)\?$$/\1/'`; \ mkdir -p $(inplacedir)/$$plat; \ rm -f $(inplacedir)/$$plat/$$name; \ ln -f -s ../../$(subdir)/$$f $(inplacedir)/$$plat/$$name; \ ==== //depot/projects/valgrind/autogen.sh#6 (text+kox) ==== @@ -1,8 +1,5 @@ #!/bin/sh -PATH=/usr/bin:$PATH -export PATH - run () { echo "running: $*" ==== //depot/projects/valgrind/configure.in#8 (text+ko) ==== @@ -76,6 +76,9 @@ # figure out where perl lives AC_PATH_PROG(PERL, perl) +# find sed +AC_PATH_PROG(SED, sed) + # figure out where gdb lives AC_PATH_PROG(GDB, gdb) AC_DEFINE_UNQUOTED(GDB_PATH, "$GDB", [path to GDB]) @@ -97,15 +100,15 @@ AC_MSG_CHECKING([for GNU sed]) -[sed_firstline=`sed --version | head -n 1`] +[sed_firstline=`${SED} --version | head -n 1`] case "${sed_firstline}" in GNU*) AC_MSG_RESULT([ok, looks like GNU sed]) ;; *) - AC_MSG_RESULT([please ensure first 'sed' in your path is GNU sed]) - AC_MSG_RESULT([note: GNU sed is only required at build/install time]) + AC_MSG_RESULT([please specify the path to GNU 'sed' in the SED environment variable]) + AC_MSG_RESULT([note: GNU sed is only required at build/install time, not run time]) AC_MSG_ERROR([build/install requires that 'sed' is GNU sed]) ;; esac @@ -114,7 +117,7 @@ # We don't want gcc < 3.0 AC_MSG_CHECKING([for a supported version of gcc]) -[gcc_version=`${CC} --version | head -n 1 | sed 's/^[^0-9]*\([0-9.]*\).*$/\1/'`] +[gcc_version=`${CC} --version | head -n 1 | ${SED} 's/^[^0-9]*\([0-9.]*\).*$/\1/'`] case "${gcc_version}" in 2.*)