Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 8 Jun 2017 17:10:58 +0000 (UTC)
From:      Dimitry Andric <dim@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject:   svn commit: r319711 - stable/11/lib/clang
Message-ID:  <201706081710.v58HAws0089253@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: dim
Date: Thu Jun  8 17:10:58 2017
New Revision: 319711
URL: https://svnweb.freebsd.org/changeset/base/319711

Log:
  MFC r319473:
  
  For arm targets, place ABI at the end of the target triple
  
  For some reason, we have been inserting the ABI specification into the
  middle of the target triple, when building LLVM, like so:
  
      armv6-gnueabi-freebsd12.0
  
  This is the wrong way around.  LLVM even auto-canonicalizes it to:
  
      armv6--freebsd12.0-gnueabi
  
  Let's do this the right way in llvm.build.mk instead.  While here,
  define a proper VENDOR macro which can be overridden easily.
  
  Approved by:	re (gjb)
  Reviewed by:	emaste
  Differential Revision: https://reviews.freebsd.org/D10846

Modified:
  stable/11/lib/clang/llvm.build.mk
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/lib/clang/llvm.build.mk
==============================================================================
--- stable/11/lib/clang/llvm.build.mk	Thu Jun  8 17:06:16 2017	(r319710)
+++ stable/11/lib/clang/llvm.build.mk	Thu Jun  8 17:10:58 2017	(r319711)
@@ -25,16 +25,17 @@ BUILD_ARCH?=	${MACHINE_ARCH}
 # arm (for armv4 and armv5 CPUs) always uses the soft float ABI.
 # For all other targets, we stick with 'unknown'.
 .if ${TARGET_ARCH:Marmv6*} && (!defined(CPUTYPE) || ${CPUTYPE:M*soft*} == "")
-TARGET_ABI=	gnueabihf
+TARGET_ABI=	-gnueabihf
 .elif ${TARGET_ARCH:Marm*}
-TARGET_ABI=	gnueabi
+TARGET_ABI=	-gnueabi
 .else
-TARGET_ABI=	unknown
+TARGET_ABI=
 .endif
+VENDOR=		unknown
 OS_VERSION=	freebsd11.1
 
-TARGET_TRIPLE?=	${TARGET_ARCH:C/amd64/x86_64/:C/arm64/aarch64/}-${TARGET_ABI}-${OS_VERSION}
-BUILD_TRIPLE?=	${BUILD_ARCH:C/amd64/x86_64/:C/arm64/aarch64/}-unknown-${OS_VERSION}
+TARGET_TRIPLE?=	${TARGET_ARCH:C/amd64/x86_64/:C/arm64/aarch64/}-${VENDOR}-${OS_VERSION}${TARGET_ABI}
+BUILD_TRIPLE?=	${BUILD_ARCH:C/amd64/x86_64/:C/arm64/aarch64/}-${VENDOR}-${OS_VERSION}
 
 CFLAGS+=	-DLLVM_DEFAULT_TARGET_TRIPLE=\"${TARGET_TRIPLE}\"
 CFLAGS+=	-DLLVM_HOST_TRIPLE=\"${BUILD_TRIPLE}\"



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