From owner-svn-src-head@freebsd.org Sun Nov 5 20:10:06 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2CA7CE501AD for ; Sun, 5 Nov 2017 20:10:06 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-it0-x233.google.com (mail-it0-x233.google.com [IPv6:2607:f8b0:4001:c0b::233]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E3BD168B3F for ; Sun, 5 Nov 2017 20:10:05 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-it0-x233.google.com with SMTP id k70so2325936itk.0 for ; Sun, 05 Nov 2017 12:10:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=9qRtGYR+avo7kqpeBrT7jlF+F6XveeL/+VQImGw32HM=; b=gVphr5gPb/6z/vGW37cU33NrUH8HaVKChVVKvopmd/tAsp3dW+5+cADFU0QmKorBjO RCtevNloRImTW8xTyMJheIiusmwDdzVoCHz0tOG+6BwiqHOgzKSLLX0+4UbdAR2Apwgs AteVU/9zdsP5gK6SROA67YyjknmVk07tbQKVvNzCf8KaRveiryiVFC9k5bQIm4tdgOM0 blehAjznIQcZYGgCGpS6HeEgXg+0IOeo+l/lXwXPAjO7ae/Yj/4QsDbFcTVgLISp62ie nfaSo4TxyHWFJvniyxMK5zkpp4fuWIWA+iFiQuHaOo4Az/NtUYI3tdn+e/K/7DUEjAPV kvPA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=9qRtGYR+avo7kqpeBrT7jlF+F6XveeL/+VQImGw32HM=; b=jVszkHV9q39RTcC1EmaUpubeauVvZ+T88cwZUGECre9BEqEE1FEGDbBk4Ttv/1+UF1 7cjqsRDqDd6pOCWQEthGisHzjCpb+EfGMVBdKwBNYm1gPled12qUhm94WpAQdLNXiHLr y9MuvhIy25tQCDn6ls6xLYQtl4sDANRnjg3qVfZl4J98F+PzAQrJ5c7evjoHKFGfhv4M DiiS6fxjiFhzKjo07jF7GWu2UDV24Yc+IGlEFRughbeRCKCtmPxfviWj8mCq0TxtrZUf 3HAMICqKihf7JXwu3EJzZrojFFTXM585dcAzTDJXqefS5imH4ssKQ8yK7wi18ipg0kcI Cp2g== X-Gm-Message-State: AJaThX4csdDbJZJe5qCxuxDs9yLZzxmi5A3VWywjfimqwzIIhlwCRE4u UEp6Mbuhx5v47BAh7Hn7P4Uy3E4028rQ02zNGdtkCg== X-Google-Smtp-Source: ABhQp+Rd7yOkarp05FABcqf3qzXUtE892Bd4wQnEgExK46c2U0F3i9esxC55tK1Hl0pyUn81snevKfuKrzytd7uqQtU= X-Received: by 10.36.118.81 with SMTP id z78mr6804981itb.97.1509912605182; Sun, 05 Nov 2017 12:10:05 -0800 (PST) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 10.79.57.22 with HTTP; Sun, 5 Nov 2017 12:10:04 -0800 (PST) X-Originating-IP: [2603:300b:6:5100:c96d:b7be:45de:c872] In-Reply-To: <201711052001.vA5K107E042015@repo.freebsd.org> References: <201711052001.vA5K107E042015@repo.freebsd.org> From: Warner Losh Date: Sun, 5 Nov 2017 13:10:04 -0700 X-Google-Sender-Auth: ocdY7o4TKF-SQe9xeut6aNQNsIM Message-ID: Subject: Re: svn commit: r325446 - in head: . lib/libclang_rt share/mk To: Ngie Cooper Cc: src-committers , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Nov 2017 20:10:06 -0000 On Sun, Nov 5, 2017 at 1:01 PM, Ngie Cooper wrote: > Author: ngie > Date: Sun Nov 5 20:01:00 2017 > New Revision: 325446 > URL: https://svnweb.freebsd.org/changeset/base/325446 > > Log: > Revert r325443 > > Despite the fact that it's a working solution, it doesn't follow the > design philosophy of only doing TARGET_* in Makefile.inc1 and special locations > in > the source tree. > Except for the things it could break, sure. PR: 222925 > Requested by: imp > > Modified: > head/ObsoleteFiles.inc > head/lib/libclang_rt/Makefile.inc > head/share/mk/sys.mk > Directory Properties: > head/ (props changed) > > Modified: head/ObsoleteFiles.inc > ============================================================ > ================== > --- head/ObsoleteFiles.inc Sun Nov 5 19:52:11 2017 (r325445) > +++ head/ObsoleteFiles.inc Sun Nov 5 20:01:00 2017 (r325446) > @@ -38,21 +38,6 @@ > # xargs -n1 | sort | uniq -d; > # done > > -# 20171105: fixing lib/libclang_rt CRTARCH for arm:armv[67]. > -.if ${MACHINE} == "arm" > -.if ${MACHINE_ARCH:Marmv[67]*} != "" && ${CPUTYPE:M*soft*} == "" > This was fine. > -OLD_FILES+=usr/lib/clang/5.0.0/lib/freebsd/libclang_rt.asan-preinit-arm.a > -OLD_FILES+=usr/lib/clang/5.0.0/lib/freebsd/libclang_rt.asan-arm.a > -OLD_LIBS+=usr/lib/clang/5.0.0/lib/freebsd/libclang_rt.asan-arm.so > -OLD_FILES+=usr/lib/clang/5.0.0/lib/freebsd/libclang_rt.asan_cxx-arm.a > -OLD_FILES+=usr/lib/clang/5.0.0/lib/freebsd/libclang_rt.profile-arm.a > -OLD_FILES+=usr/lib/clang/5.0.0/lib/freebsd/libclang_rt.safestack-arm.a > -OLD_FILES+=usr/lib/clang/5.0.0/lib/freebsd/libclang_rt.stats-arm.a > -OLD_FILES+=usr/lib/clang/5.0.0/lib/freebsd/libclang_rt.stats_client-arm.a > -OLD_FILES+=usr/lib/clang/5.0.0/lib/freebsd/libclang_rt. > ubsan_standalone-arm.a > -OLD_FILES+=usr/lib/clang/5.0.0/lib/freebsd/libclang_rt. > ubsan_standalone_cxx-arm.a > -.endif > -.endif > # 20171104: libcap_random should be in /lib not in /usr/lib > OLD_LIBS+=usr/lib/libcap_random.so.0 > # 20171104: Casper can work only as shared library > > Modified: head/lib/libclang_rt/Makefile.inc > ============================================================ > ================== > --- head/lib/libclang_rt/Makefile.inc Sun Nov 5 19:52:11 2017 > (r325445) > +++ head/lib/libclang_rt/Makefile.inc Sun Nov 5 20:01:00 2017 > (r325446) > @@ -2,14 +2,7 @@ > > .include > > -# NOTE: based on TARGET_ABI/TARGET_CPUTYPE, set in Makefile.inc1 . > -.if ${MACHINE} == "arm" > -.if ${MACHINE_ARCH:Marmv[67]*} != "" && ${CPUTYPE:M*soft*} == "" > -CRTARCH= armhf > -.endif > -.endif > - > -CRTARCH?= ${TARGET_CPUARCH:C/amd64/x86_64/} > +CRTARCH= ${MACHINE_CPUARCH:C/amd64/x86_64/} > CRTSRC= ${SRCTOP}/contrib/compiler-r > It worked because you tested MACHINE* here. It further worked because you polluted things with TARGET_CPUARCH based on MACHINE_CPUARCH, that is, everything was ultimately derived from MACHINE* variables... But you shouldn't test MACHINE here at all (it's only for kernel stuff, and this isn't kernel stuff). Thankfully, it's completely redundant here, and can be removed completely. With that, if you retain the current CRTARCH line, but turn it into ?= it should be good. You'll need to fix the comments, or better yet, just remove them. .PATH: ${CRTSRC}/lib > > Modified: head/share/mk/sys.mk > ============================================================ > ================== > --- head/share/mk/sys.mk Sun Nov 5 19:52:11 2017 (r325445) > +++ head/share/mk/sys.mk Sun Nov 5 20:01:00 2017 (r325446) > @@ -15,11 +15,6 @@ unix ?= We run FreeBSD, not UNIX. > # > __TO_CPUARCH=C/mips(n32|64)?(el)?(hf)?/mips/:C/arm(v[67])?( > eb)?/arm/:C/powerpc(64|spe)/powerpc/:C/riscv64(sf)?/riscv/ > MACHINE_CPUARCH=${MACHINE_ARCH:${__TO_CPUARCH}} > -.ifdef TARGET_ARCH > -TARGET_CPUARCH=${TARGET_ARCH:${__TO_CPUARCH}} > -.else > -TARGET_CPUARCH=${MACHINE_CPUARCH} > -.endif > .endif > This part should not return. Warner