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 B7EB31396D0 for ; Wed, 6 Sep 2017 03:37:15 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 91770E0E8C; Wed, 6 Sep 2017 03:37:10 +0000 (UTC) Received: from mail-yw0-x22f.google.com (mail-yw0-x22f.google.com [IPv6:2607:f8b0:4002:c05::22f]) (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 411B6E0DC8 for ; Wed, 6 Sep 2017 03:37:10 +0000 (UTC) Received: by mail-yw0-x22f.google.com with SMTP id x144so18478355ywg.2 for ; Tue, 05 Sep 2017 20:37:10 -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=GKCXa7hVSrQ+k0FrPHHH4GpGWzU1JmI0qBYPrcaChrg=; b=s/AusUhD6PW0C65LsXRWUzZSe3dlboUtdBbymavx+kIOvLBM1GgbWDdKbYVOralK0O 1xtP3y+cC4rS829FPlmZg3CQeqyp8/+URxr+SsP6gzRxNCDftKWmyuz4vtuuwL+cDt97 sANVy0SQ+xU8odP3Nkmz5n7Xzm3cW5ndpY5VIUOS7T3LxN2b8i4M+2dhoPLDzj4S7niR 3bgmaQZVbpbOkWF2BKqrsNaL9FqTu4RTCsn0sXouBKjZ47a38iO5vbk4rphqm2saPc46 dWAPwDvB54haAI8ZA6kayivx94nCUDqt4vNVMi55mRC4VtUjNRNwO6zXnpz1HBkxKEeE N/GA== 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=GKCXa7hVSrQ+k0FrPHHH4GpGWzU1JmI0qBYPrcaChrg=; b=e+UvYUOwxib+clNeeSZ0SYoAgp0GBNOawt5CApD7iEmd4SjVlf0DQYOxt8eXdlQpnl r9/5QBv9eQE5lBAUv57jtiLrrJD533bh03J1//2jqog/CPdhcMMhGtKNVyCGA/mnDg5G +K2qL4ev64hE+l1+j/8wYUk1IofmJQzkN8hhj+fqy0yliXWOFf/CMMHKhsW93qz3A/qi +j+NlAeXSefKOoD/e0ODuyfwPiMg1UkhYmCVNbA5ZUnD8xO+NjPns6q6nB0g8kU2iB4B kXNcHsSeaum1h5F15gaNe6zNvMbtZW894FLM4s13ynIj2ua8rSuxoRSYhVRd8fSwG/Jg nMuw== X-Gm-Message-State: AHPjjUhG89rPn9/WmTb3VkR0W43uKCcjWY59S6ThP/450+DtfqfAUZC+ 83RUhBkXERMVr1XOjBhRhKFaHwUbtg== X-Google-Smtp-Source: ADKCNb7zWOb3EIup9HCJPt1hvYp75pCOEV4URdDXsQSu0qxoTmMD4+DRKxrqEiArZUaIz0U2+Njng2++0YdiOBAZreo= X-Received: by 10.129.112.134 with SMTP id l128mr946893ywc.220.1504669029053; Tue, 05 Sep 2017 20:37:09 -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.129.211.10 with HTTP; Tue, 5 Sep 2017 20:37:08 -0700 (PDT) In-Reply-To: References: <20170905083727.GA23751@waltdnes.org> From: R0b0t1 Date: Tue, 5 Sep 2017 22:37:08 -0500 Message-ID: Subject: Re: [gentoo-user] Lowest common denominator compile To: gentoo-user@lists.gentoo.org Content-Type: text/plain; charset="UTF-8" X-Archives-Salt: 42d4ddbe-32cd-493d-956c-61f8c096a483 X-Archives-Hash: 0821562fcef89abc3748d6b058689d81 On Tue, Sep 5, 2017 at 10:28 PM, Grant wrote: >>>> 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. > You might be interested in "-march=x86-64 -mtune=generic" though this will mean you might miss out on some optimizations.