Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 20 Oct 2020 00:15:35 +0000 (UTC)
From:      Kyle Evans <kevans@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-branches@freebsd.org
Subject:   svn commit: r552779 - in branches/2020Q4/devel/llvm10: . files
Message-ID:  <202010200015.09K0FZKa015895@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kevans
Date: Tue Oct 20 00:15:34 2020
New Revision: 552779
URL: https://svnweb.freebsd.org/changeset/ports/552779

Log:
  MFH: r552764
  
  devel/llvm10: fix hand-rolled AT_EXECPATH search for older FreeBSD
  
  This was committed in base r360875 and upstream 21e5e1724, which was after
  LLVM10 branched and has not been backported.
  
  This failure would only have been noticed if AT_EXECPATH was missing, and
  qemu-user-static does not currently provide AT_EXECPATH. As such, any
  execution of llvm10 binaries under qemu-user-static immediately segfaulted.
  
  Reported by:	Daniel Tihanyi <daniel.tihanyi@tetragir.com>, jbeich
  Approved by:	brooks (maintainer)
  
  Approved by:	ports-secteam (fluffy)

Added:
  branches/2020Q4/devel/llvm10/files/patch-lib_Support_Unix_Path.inc
     - copied unchanged from r552764, head/devel/llvm10/files/patch-lib_Support_Unix_Path.inc
Modified:
  branches/2020Q4/devel/llvm10/Makefile
Directory Properties:
  branches/2020Q4/   (props changed)

Modified: branches/2020Q4/devel/llvm10/Makefile
==============================================================================
--- branches/2020Q4/devel/llvm10/Makefile	Mon Oct 19 23:56:38 2020	(r552778)
+++ branches/2020Q4/devel/llvm10/Makefile	Tue Oct 20 00:15:34 2020	(r552779)
@@ -2,7 +2,7 @@
 
 PORTNAME=	llvm
 DISTVERSION=	10.0.1
-PORTREVISION=	1
+PORTREVISION=	2
 CATEGORIES=	devel lang
 MASTER_SITES=	https://github.com/llvm/llvm-project/releases/download/llvmorg-${DISTVERSION:S/rc/-rc/}/ \
 		https://${PRE_}releases.llvm.org/${LLVM_RELEASE}/${RCDIR}

Copied: branches/2020Q4/devel/llvm10/files/patch-lib_Support_Unix_Path.inc (from r552764, head/devel/llvm10/files/patch-lib_Support_Unix_Path.inc)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ branches/2020Q4/devel/llvm10/files/patch-lib_Support_Unix_Path.inc	Tue Oct 20 00:15:34 2020	(r552779, copy of r552764, head/devel/llvm10/files/patch-lib_Support_Unix_Path.inc)
@@ -0,0 +1,19 @@
+--- lib/Support/Unix/Path.inc.orig	2020-10-19 17:56:15 UTC
++++ lib/Support/Unix/Path.inc
+@@ -208,14 +208,9 @@ std::string getMainExecutable(const char *argv0, void 
+   while (*p++ != 0)
+     ;
+   // Iterate through auxiliary vectors for AT_EXECPATH.
+-  for (;;) {
+-    switch (*(uintptr_t *)p++) {
+-    case AT_EXECPATH:
++  for (; (uintptr_t *)p != AT_NULL; p++) {
++    if (*(uintptr_t *)p++ == AT_EXECPATH);
+       return *p;
+-    case AT_NULL:
+-      break;
+-    }
+-    p++;
+   }
+ #endif
+   // Fall back to argv[0] if auxiliary vectors are not available.



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