svn commit: r319711 - stable/11/lib/clang

Dimitry Andric dim at FreeBSD.org
Thu Jun 8 17:10:59 UTC 2017


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}\"


More information about the svn-src-stable-11 mailing list