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 7F66F1396D0 for ; Tue, 5 Sep 2017 13:53:34 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 8E391E0C5C; Tue, 5 Sep 2017 13:53:28 +0000 (UTC) Received: from mail-qk0-x22c.google.com (mail-qk0-x22c.google.com [IPv6:2607:f8b0:400d:c09::22c]) (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 3E92FE0BE0 for ; Tue, 5 Sep 2017 13:53:28 +0000 (UTC) Received: by mail-qk0-x22c.google.com with SMTP id o129so11840617qkd.0 for ; Tue, 05 Sep 2017 06:53:28 -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=6BbFCnFp6bGhRycgxNVP90UxTZ0V9oTK2ntQqRZX66k=; b=KskYNalKJ7eDaVqdigdFqOA+c+6oMXgs3Dqq8GsqQNVfdnKeKJOGD7Fjn3mye/JJSr xMEPPfXoMBL3ZnBjL2aelFNS6p/UJgaoRm9YdQr78D6dm+FZ9lv/jAZPebB5YkRUFrk5 5CRNstdDU9vSttUMEL0In/J2ZLWS4dHz/bJrq+hOG1yKPKsgQlcM3UvsDG0/l2R3sHAM e3/Mn2u/oAsKjEVazd75oe9bmk/GVc6aSdyASBZDTiXWfOuwh4L0ZZ4ylkn/ae+xq8mI uUwLFjGZZ2dvFacyTuBqQpgb0vWWXZsoxh1LqzlG8y9DN/tsOo+P98A1DILWJkZ+IHDO WBEw== 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=6BbFCnFp6bGhRycgxNVP90UxTZ0V9oTK2ntQqRZX66k=; b=h7Rf4VfdQ5tinL4rWiSjD0LAgANnpzH5KHISA3FNuELJRjtT0JC8WY1+9R5w+FN9lb OklyvdAdp6/jJIp36Qh3zOduJYefHjUUeA1x2CfkGJt1FcaHi5P7DWlZfnurRlMpolZ2 +42FFb9APU8L/nMWcw75XJRKJ7M62an8jJWLEWOvLKPvU8bS8ofRqB4+fzlQOE+snFXD prbPgPSKTgFXN/VWGaq+qZtKWVxeS+5OEOmakhZMNaVYNB7C/d/ly/UTnyl1kzXcTrL5 N318VPK/dwDoL8vfykyJgwgp7B1mYWy1yTlQ2yu+U8n5367IZERWTJzNZJ658Qb9Fs6n fOyQ== X-Gm-Message-State: AHPjjUhaXeTGiGEaKBj23KyvaRpx0ez8+SDBDLvO/ILMQh0LQCc/TIpb z7aKkFeM3NaAHow/aUsifixQOkdjkQ== X-Google-Smtp-Source: ADKCNb6GmbfRX7sZKd/Ra7QKOpm5oO6733BuGB2MERIrCMQTHowtT3rqCqwnKTHRf2FJYenG2/UDoHrXm8QLR6AXVt4= X-Received: by 10.55.43.65 with SMTP id r62mr5579225qkh.250.1504619607331; Tue, 05 Sep 2017 06:53:27 -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 06:53:26 -0700 (PDT) In-Reply-To: <20170905083727.GA23751@waltdnes.org> References: <20170905083727.GA23751@waltdnes.org> From: Grant Date: Tue, 5 Sep 2017 06:53:26 -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: 21d38881-4d80-4a4a-b44c-73ba286a9017 X-Archives-Hash: 446054eb87931c6919589b890265313a >> 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. Thanks, Grant