From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id CC57E1396D0 for ; Wed, 6 Sep 2017 03:28:29 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 5E1D61FC09A; Wed, 6 Sep 2017 03:28:22 +0000 (UTC) Received: from mail-qt0-x230.google.com (mail-qt0-x230.google.com [IPv6:2607:f8b0:400d:c0d::230]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 0ADCAE0E88 for ; Wed, 6 Sep 2017 03:28:21 +0000 (UTC) Received: by mail-qt0-x230.google.com with SMTP id k2so16898436qte.2 for ; Tue, 05 Sep 2017 20:28:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=oeds2Url5X6noO+D518byXGkbQZrUAuLnLi9m/cjSeM=; b=iaGsYhaa+Bi4+JEO9adQTVdPrhiSROW/Cs+WCjIF7x1VeCquw7NIBrYT3HrV38l8b0 S7SThcQe+OgpLvxDatv7oHbb6Bgt64DWXyAlyNrY/vIfiFRflzudPoIL0Kj24XtauU71 +NooZ/5D/sEHAHSnYKnS5h1+nNg3dpfeN2X2l3gYFrwIKKbseHxpv9AkqkA6maOqbqxI RX7zEvL9yYPh+r7iGgDNGY4x0lIXhHy95l1IQBKoxzhVTNCKMQ76LuGGDh6X/wvKIx5O nCg2Vmi4ODQbGYzGXNDj7RWmxZeJxt/3nt052211kPdl3o5dZ7jvefu2LKhRhqYZBGXw Y9FQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=oeds2Url5X6noO+D518byXGkbQZrUAuLnLi9m/cjSeM=; b=ExzS5Sfde9FzDYwLJRP6LtD67QN5dmvlnK1I5qNVOU8KnCLAfn5PX/0smikCm9GBMX cxEe7NYf9loZZ1uYZ80nwlwqj4ajlvizfW1uJ8fdvx/nVulST/BOihHR7TxixV2BQldt b5c5OjXVM8Cv8BEnCfXoYjGr8nsP5vkCCRcPuXuDbIQtbDBSGuApmxA775ixX8CtilAT MADFhIr7NsQQ2VYs/hY3hy3AnKv5UZqkVROAx+KgVxaMJ14sP6nPxQmf60EOIM71qjGl JnRbE2g1KwgNyJwCurIedjDccWPpahy+XXHBi2X01ThT3KB0n++ByVWBqYGcXsUSdfi2 fghg== X-Gm-Message-State: AHPjjUghlYsNeXCICUlemNX6CyMBA8kflwtxK227LA2L4o422z03Fp29 XWeEHpItxO/T8ZG7AOF6frYMEzsplzk4 X-Google-Smtp-Source: ADKCNb5Yc0SdhOJ+ShgQFxgLHEiEP/0RCT7ZbTy4JlKDMv8vNZePbjzXPfdBl/uHK0QXXM8xoZvQAixO3HLE/ejuGy8= X-Received: by 10.200.39.24 with SMTP id g24mr1706010qtg.230.1504668500998; Tue, 05 Sep 2017 20:28:20 -0700 (PDT) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org MIME-Version: 1.0 Received: by 10.140.93.65 with HTTP; Tue, 5 Sep 2017 20:28:20 -0700 (PDT) In-Reply-To: References: <20170905083727.GA23751@waltdnes.org> From: Grant Date: Tue, 5 Sep 2017 20:28:20 -0700 Message-ID: Subject: Re: [gentoo-user] Lowest common denominator compile To: Gentoo mailing list Content-Type: text/plain; charset="UTF-8" X-Archives-Salt: b534389a-a45c-4d03-a42b-fbbc52d2ce72 X-Archives-Hash: d23ee33261f88174242cec8d5ec6a7df >>> Now I'm running into "trap invalid opcode" errors on the older >>> systems. Can I disable some of the newer CPU instruction sets on the >>> master laptop when compiling to hopefully generate binaries that will >>> work on the older systems? >> >> Yes. You need to find out CPU_FLAGS_X86 and "-march=" values the >> machines have, and use that in make.conf. Run the commands... >> >> cpuinfo2cpuflags-x86 >> gcc -c -Q -march=native --help=target | grep march= >> >> ...on the target machines. This will tell you what "native" is and >> what CPU_FLAGS_X86 values to use. >> >> https://gcc.gnu.org/onlinedocs/gcc-6.3.0/gcc/x86-Options.html#x86-Options >> lists available "march=" options, and what instruction sets they support. >> E.g. my old core2 desktop shows... >> >> [d531][waltdnes][~] cpuinfo2cpuflags-x86 >> CPU_FLAGS_X86="mmx mmxext sse sse2 sse3 ssse3" >> >> [d531][waltdnes][~] gcc -c -Q -march=native --help=target | grep march= >> -march= core2 >> >> >> Unless the laptops are really old, you can probably get away with... >> CFLAGS="-O2 march=core2 -mfpmath=sse -fopenmp -fomit-frame-pointer -pipe -fno-unwind-tables -fno-asynchronous-unwind-tables" >> >> booby trap 1) Unless all machines are Intel "Atom" family, do *NOT* use >> a "march=" that implements the "movbe" instruction. >> >> booby trap 2) If you throw in any AMD-based machines proceed with care. >> >> Can you post the output of... >> gcc -c -Q -march=native --help=target | grep march= >> ...for all the target machines? > > > Let's see how -mtune=native goes and resort to the above if necessary. > It doesn't look too bad though. emerge -e world has finished and pushed and -mtune=native seems to have solved the issue for now. - Grant