How to detect user uses -masm=intel?
unlvsur unlvsur
unlvsur@live.com
Fri Jul 30 00:32:43 GMT 2021
Can we add one??
Sent from Mail<https://go.microsoft.com/fwlink/?LinkId=550986> for Windows 10
From: Florian Weimer<mailto:fweimer@redhat.com>
Sent: Thursday, July 29, 2021 04:39
To: unlvsur unlvsur via Gcc<mailto:gcc@gcc.gnu.org>
Cc: Andrew Pinski<mailto:pinskia@gmail.com>; unlvsur unlvsur<mailto:unlvsur@live.com>
Subject: Re: How to detect user uses -masm=intel?
* unlvsur unlvsur via Gcc:
> What I mean is that what macro GCC sets when it compiles -masm=intel
>
>
> Int main()
> {
> #ifdef /*__INTEL_ASM????*/
> printf(“intel”);
> #else
> printf(“at&t”);
> #endif
> }
There doesn't seem to be such a macro:
$ diff -u <(gcc -dM -E -x c /dev/null) <(gcc -masm=intel -dM -E -x c /dev/null)
$
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
More information about the Gcc
mailing list