From owner-freebsd-current@freebsd.org Sat Jul 21 15:16:49 2018 Return-Path: Delivered-To: freebsd-current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C728E104E402 for ; Sat, 21 Jul 2018 15:16:49 +0000 (UTC) (envelope-from yuripv@yuripv.net) Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6A1618D464; Sat, 21 Jul 2018 15:16:49 +0000 (UTC) (envelope-from yuripv@yuripv.net) Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 0A548212A0; Sat, 21 Jul 2018 11:16:48 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Sat, 21 Jul 2018 11:16:48 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yuripv.net; h= content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc; s=fm2; bh=GB+vBYyBCZHYDPbz0Xq/2hv3K+cNw Di0MjYmPwQMiak=; b=EmjbOM0wwlmZToojDqrBz6rBtLgpTJANZiKNBeVMVgFKa RDgrdK9MQ7AQq6cFMRHWxUsxjscRQuWYFDStjoEzta8mPazl3GB/ljCsb9efx3yP Gpjdwo0xPyT4VuWNSjUG4X4DmaaaYwo1/Y9T7jmTTDvDRylX08vjMmzFBLXEAMzI 8H2jgls+cPgrGLjekBsOU3vVEppgtfrGOtJ9sq8/KLZ3I+blAdpuG9bCclZVPv7g zOgJfMIex6PdgqmgJn9zkwpgDbUXgysmcM1z0o+jv6CdgpzHHjHofxorcvBr/45c ZuQ9BTxmeIqt/hfFmOx+Zb2ztF4y9wmfnLkoyHsaQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=GB+vBY yBCZHYDPbz0Xq/2hv3K+cNwDi0MjYmPwQMiak=; b=S3kh/Z687KBjcSKZQhP1YS mpeCpVCTOyCkRbmsWVh6/Y1VdruBqPaffGY//IPWpXBv2Y+hsez0lBIphFcPhIKT ihdNbpPdxU51ieolPWkvdfZMjyMuYWajGlodo/WqQxpxmy5ojEZIui9XeWoSMDkS wrCBCa8Z7PVNT+WF3LVvQuhy9EgY/fA/uk1XkWbacumN0WRpdvoJ5yabKeLClaeP NYJjhrQeHM63ateIEbsoDTYy/kx6YF9LBset4rtgQWw6R9ugSt/EpAEbsq5AkXt4 EWvZWhrBBk42M+DfPJCd0AgGS0rd8ZVR5Ats5DDh6OhDmfpVla38JC4oyUqcxvZw == X-ME-Proxy: X-ME-Sender: Received: from [192.168.1.2] (unknown [62.183.124.233]) by mail.messagingengine.com (Postfix) with ESMTPA id 82F3EE4513; Sat, 21 Jul 2018 11:16:46 -0400 (EDT) Subject: Re: gcc/clang interoperability problem with a custom "samba" build in recent -current. To: Julian Elischer , freebsd-current References: From: Yuri Pankov Message-ID: Date: Sat, 21 Jul 2018 18:16:40 +0300 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 21 Jul 2018 15:16:50 -0000 Julian Elischer wrote: > I would really like ot get some pointers as to who are our tools > committers at the moment, in particular who might know about these issues. > The main issue for me at the moment is the ability to compile the > aesni code in Samba from clang.. > > Julian > > > On 20/7/18 7:32 pm, Julian Elischer wrote: >> compiling our samba with gcc 4.2.1 in 12 gave us some off behaviour >> when lld became the linker I think.. >> >> 1/ linking needed some directories added to some of the build >> scripts because previously apparently it looked in $SYSROOT/usr/lib >> by default and now it doesn't. >> >> 2/ compiling our samba produces a libtdb.so that has various symbols >> in it, (according to nm(1) ), but when we try link against it we get >> complaints about those symbols not being defined. >> >> 3/ an attempt to switch to using clang to compile everything leads to: >> >> >> "--aes-accel=intelaesni selected and compiler rejects -Wp,-E,-lang-asm. >> >> One wonders whether there is a clang equivalent of "-Wp,-E,-lang-asm" >> >> The AES acceleration is a configure option for the samba package. >> >> Apparently turning it on requires -Wp,-E,-lang-asm. >> >> which apparently gcc 4.2.1 has, but clang doesn't have. >> >>    FreeBSD clang version 6.0.1 (tags/RELEASE_601/final 335540) (based >>    on LLVM 6.0.1) >>    Target: x86_64-unknown-freebsd12.0 >>    Thread model: posix >>    InstalledDir: /usr/bin >> >> anyone know if there is a clang equivalent of -Wp, -E,-lang-asm? In later GCC versions the cpp's -lang-asm seems to be deprecated in favor of -x assembler-with-cpp as it conflicts with -l option. Could you try changing the -Wp,-E,-lang-asm to -Wp,-E,-xassembler-with-cpp? >> possible work arrounds include: >> >> 1/ Get gcc/lld to produce a library from which lld can find the symbols >> >> 2/ find a way to compile this with clang but everything else with gcc? >> >> 3/ find a way to allow clang to use >> -Wp,-E,-lang-asm >> >> whatever that means >> >> >> Thoughts from any tools people?