From owner-svn-src-all@freebsd.org Thu Jul 9 02:53:35 2015 Return-Path: Delivered-To: svn-src-all@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 3ED40997619; Thu, 9 Jul 2015 02:53:35 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-qg0-x232.google.com (mail-qg0-x232.google.com [IPv6:2607:f8b0:400d:c04::232]) (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 EEE5A1FE6; Thu, 9 Jul 2015 02:53:34 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by qgef3 with SMTP id f3so59842619qge.0; Wed, 08 Jul 2015 19:53:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=GUen2g+9eVEEXkzEJpQWM9HZKlE7azhRjX34zDvFOGw=; b=xLh4QDaoFG3Asq3R97HPPJAzEAmDM9hJfMbVzNwQw3WBrLdedkPhb/jtFetRgoui/2 M+nB8hGkpGCEuwaN8FUTuHfLxcg06on/xlRR1rIP9MJQIk7L28Tq4TdtohNzeOL7d9Sr ZJ5TvcBP7zTyL6wQb4H53cE2MMIDO9oy+4gf8PqIpVh8mkhmf8VElHXQgAj0y7v08ECu vskKRDzd/D4nPN74JqxMBFm37tqqTPOyXtzspOXdmz++dz42N4liCKnEoicfWzhXzlND zFDhUIwHFb2ztZiKv1NR3YFzfuQfpCzp2kFuvs3/mqGBcL+Q3ImPL1q/aBbLLfDTT47g puQw== MIME-Version: 1.0 X-Received: by 10.140.90.99 with SMTP id w90mr21098014qgd.57.1436410414054; Wed, 08 Jul 2015 19:53:34 -0700 (PDT) Received: by 10.140.98.73 with HTTP; Wed, 8 Jul 2015 19:53:33 -0700 (PDT) In-Reply-To: References: <201507081836.t68IacJu069563@repo.freebsd.org> <559D9172.9040305@FreeBSD.org> Date: Wed, 8 Jul 2015 19:53:33 -0700 Message-ID: Subject: Re: svn commit: r285284 - head/lib/liblzma From: NGie Cooper To: Dimitry Andric Cc: Adrian Chadd , Pedro Giffuni , Luigi Rizzo , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Jul 2015 02:53:35 -0000 On Wed, Jul 8, 2015 at 3:18 PM, Dimitry Andric wrote: > Check whether the path starts with /usr/bin, maybe? Normally, you would > check for the existence of a random header in a configure script. But > from within a C source file, it's not that easy. > > That said, immintrin.h is available for all usable versions of clang, > and should be available in all versions of gcc >= 4.4 (at least, if I > read gcc's commit history correctly). And gcc in base is definitely not > 4.4. :-) $ cat ~/has_immintrin.c #include #if __has_include() #error "I have immintrin.h" #else #error "I don't have immintrin.h" #endif $ clang -c ~/has_immintrin.c /home/ngie/has_immintrin.c:4:2: error: "I have immintrin.h" #error "I have immintrin.h" ^ 1 error generated. $ gcc -c ~/has_immintrin.c /home/ngie/has_immintrin.c:6:2: error: #error "I don't have immintrin.h" Sadly this macro wasn't added until gcc 5.x: https://gcc.gnu.org/gcc-5/changes.html Cheers, -NGie