Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 14 Aug 2014 16:45:02 +0000 (UTC)
From:      Mark Johnston <markj@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
Subject:   svn commit: r269987 - stable/9/cddl/contrib/opensolaris/lib/libdtrace/common
Message-ID:  <201408141645.s7EGj2GF086670@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: markj
Date: Thu Aug 14 16:45:02 2014
New Revision: 269987
URL: http://svnweb.freebsd.org/changeset/base/269987

Log:
  MFC r257877:
  Don't try to use the 32-bit drti.o unless the data model is explicitly set
  to ILP32. Otherwise dtrace -G will attempt to use it on amd64 if it can't
  determine which data model to use, which happens when -64 is omitted and
  no object files are provided, e.g. with
  
  # dtrace -G -n BEGIN
  
  This would result in a linker error, but now works properly.
  
  Also remove an unnecessary #ifdef.

Modified:
  stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_link.c
Directory Properties:
  stable/9/cddl/contrib/opensolaris/   (props changed)
  stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/   (props changed)

Modified: stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_link.c
==============================================================================
--- stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_link.c	Thu Aug 14 16:45:01 2014	(r269986)
+++ stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_link.c	Thu Aug 14 16:45:02 2014	(r269987)
@@ -1790,7 +1790,7 @@ dtrace_program_link(dtrace_hdl_t *dtp, d
 		 * Arches which default to 64-bit need to explicitly use
 		 * the 32-bit library path.
 		 */
-		int use_32 = !(dtp->dt_oflags & DTRACE_O_LP64);
+		int use_32 = (dtp->dt_oflags & DTRACE_O_ILP32);
 #else
 		/*
 		 * Arches which are 32-bit only just use the normal
@@ -1805,9 +1805,7 @@ dtrace_program_link(dtrace_hdl_t *dtp, d
 		len = snprintf(&tmp, 1, fmt, dtp->dt_ld_path, file, tfile,
 		    drti) + 1;
 
-#if !defined(sun)
 		len *= 2;
-#endif
 		cmd = alloca(len);
 
 		(void) snprintf(cmd, len, fmt, dtp->dt_ld_path, file,



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