Executables with [ -def __linux__ ]

From: blubee blubeeme <gurenchan_at_gmail.com>
Date: Sat, 18 Aug 2018 21:25:53 +0800
This is going out to both current and ports in hopes someone can offer some
guidance on this issue.

I'm porting some code that seems to want to have -def __linux__ when I run
the executable with verbose output, take a look below

--------------------------------------------------------------
 -opt 0 -terse 1 -inform warn -nohpf -nostatic -inform warn -x 19 0x400000
-quad -x 68 0x1 -x 59 4 -x 15 2 -x 49 0x400004 -x 51 0x20 -x 57 0x4c -x 58
0x10000 -x 124 0x1000 -tp px -x 57 0xfb0000 -x 58 0x78031040 -x 47 0x08 -x
48 4608 -x 49 0x100 -def unix -def __unix -def __unix__ -def linux -def
__linux -def __linux__ -def __NO_MATH_INLINES -def __LP64__ -def __x86_64
-def __x86_64__ -def __LONG_MAX__=9223372036854775807L -def
__SIZE_TYPE__=unsigned long int -def __PTRDIFF_TYPE__=long int -def
__THROW= -def __extension__= -def __amd_64__amd64__ -def __k8 -def __k8__
-def __PGLLVM__ -freeform -vect 48 -y 54 1 -x 70 0x40000000 -y 163
0xc0000000 -x 189 0x10 -stbfile test-276576.stb -modexport test-276576.cmod
-modindex test-276576.cmdx -output test-276576.ilm
----------------------------------------------------------------

As you can see from above there's some -def linux, def __linux, etc..

FreeBSD isn't Linux and I'd like to better understand where these things
are being set, it's a cmake project and I've grepped through a lot of the
sources and can't really find where these flags are coming from.

Any tips on finding where they are coming from and fixing them to reflect
the correct platform information?

Best,
Owen
Received on Sat Aug 18 2018 - 11:26:06 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:41:17 UTC