Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 19 Oct 2020 20:32:18 +0000 (UTC)
From:      Kyle Evans <kevans@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r552764 - in head/devel/llvm10: . files
Message-ID:  <202010192032.09JKWIdD078791@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kevans
Date: Mon Oct 19 20:32:17 2020
New Revision: 552764
URL: https://svnweb.freebsd.org/changeset/ports/552764

Log:
  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)
  MFH:		2020Q4

Added:
  head/devel/llvm10/files/patch-lib_Support_Unix_Path.inc   (contents, props changed)
Modified:
  head/devel/llvm10/Makefile

Modified: head/devel/llvm10/Makefile
==============================================================================
--- head/devel/llvm10/Makefile	Mon Oct 19 19:42:40 2020	(r552763)
+++ head/devel/llvm10/Makefile	Mon Oct 19 20:32:17 2020	(r552764)
@@ -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}

Added: head/devel/llvm10/files/patch-lib_Support_Unix_Path.inc
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/llvm10/files/patch-lib_Support_Unix_Path.inc	Mon Oct 19 20:32:17 2020	(r552764)
@@ -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?202010192032.09JKWIdD078791>