public inbox for fortran@gcc.gnu.org
 help / color / mirror / Atom feed
* gfortran preprocessor compiler options
@ 2023-12-01 17:20 Rasmus Vikhamar-Sandberg
  0 siblings, 0 replies; only message in thread
From: Rasmus Vikhamar-Sandberg @ 2023-12-01 17:20 UTC (permalink / raw)
  To: fortran

[-- Attachment #1: Type: text/plain, Size: 657 bytes --]

Hello.
I have a question. I posted it first on stackoverflow.
https://stackoverflow.com/questions/77585795/how-do-i-get-gfortran-to-generate-architecture-specific-predefined-macros.

The question is how do I get gfortran to generate architecture specific predefined macros like __SSE2__, __AVX__ and __AVX512F__?
If I run
echo | gfortran -E -dM -march=native
I get the desired predefined macros printed to the screen. If I compile with
gfortran -c <source.f90> -cpp -march=native
I don't get all of the predefined macros. It is almost as if gfortran does not pass the compiler option -march=native to the preprocessor.

Best,
Rasmus Vikhamar


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-12-01 17:20 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-12-01 17:20 gfortran preprocessor compiler options Rasmus Vikhamar-Sandberg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).