From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by sourceware.org (Postfix) with ESMTP id 53DF23858023 for ; Thu, 29 Jul 2021 08:39:02 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 53DF23858023 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-363-9iInW8ZMPuKQPO4riRllqA-1; Thu, 29 Jul 2021 04:39:00 -0400 X-MC-Unique: 9iInW8ZMPuKQPO4riRllqA-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 3C7B8107ACF5; Thu, 29 Jul 2021 08:38:59 +0000 (UTC) Received: from oldenburg.str.redhat.com (ovpn-112-7.ams2.redhat.com [10.36.112.7]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 33C0F5C1D1; Thu, 29 Jul 2021 08:38:57 +0000 (UTC) From: Florian Weimer To: unlvsur unlvsur via Gcc Cc: Andrew Pinski , unlvsur unlvsur Subject: Re: How to detect user uses -masm=intel? References: Date: Thu, 29 Jul 2021 10:38:56 +0200 In-Reply-To: (unlvsur unlvsur via Gcc's message of "Thu, 29 Jul 2021 02:48:31 +0000") Message-ID: <87pmv14iqn.fsf@oldenburg.str.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: gcc@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Jul 2021 08:39:03 -0000 * unlvsur unlvsur via Gcc: > What I mean is that what macro GCC sets when it compiles -masm=3Dintel > > > Int main() > { > #ifdef /*__INTEL_ASM????*/ > printf(=E2=80=9Cintel=E2=80=9D); > #else > printf(=E2=80=9Cat&t=E2=80=9D); > #endif > } There doesn't seem to be such a macro: $ diff -u <(gcc -dM -E -x c /dev/null) <(gcc -masm=3Dintel -dM -E -x c /dev= /null) $=20 It doesn't look like it's possible to detect this as the GAS level directly. So you have to use the alternatives syntax that Andrew suggested. Thanks, Florian