The IDE asks the compiler with the following command for the real OS/CPU:
/Applications/Lazarus_trunk/fpc/bin/x86_64-darwin/fpc.sh -iTOTP -Fr/Applications/Lazarus_trunk/lazarus/components/codetools/fpc.errore.msg
Working directory: /
Output:
darwin x86_64
The IDE asks the compiler with the following command for paths and macros:
/Applications/Lazarus_trunk/fpc/bin/x86_64-darwin/fpc.sh -va -Px86_64 -Twin64 -Fr/Applications/Lazarus_trunk/lazarus/components/codetools/fpc.errore.msg compilertest.pas
Working directory: /Applications/Lazarus_trunk/config_lazarus/
Output:
[0.000] Handling option "-Twin64"
[0.000] Interpreting firstpass option "-Twin64"
[0.000] Macro undefined: DARWIN
[0.000] Macro undefined: UNIX
[0.000] Macro undefined: BSD
[0.000] Macro undefined: HASUNIX
[0.000] Macro undefined: FPC_HAS_WINLIKERESOURCES
[0.000] Macro defined: WIN64
[0.000] Macro defined: MSWINDOWS
[0.000] Macro defined: WINDOWS
--8<--
[0.001] Macro defined: FPC_HAS_INTERNAL_SAR
[0.001] Macro defined: INTERNAL_BACKTRACE
[0.001] Macro defined: STR_CONCAT_PROCS
[0.001] Macro defined: REGCALL
[0.001] Macro defined: ENDIAN_LITTLE
[0.001] Macro defined: FPC_LITTLE_ENDIAN
[0.001] Handling option "-n"
[0.001] Interpreting option "-n"
[0.001] Reading further options from /Applications/Lazarus_trunk/fpc/bin/x86_64-darwin/fpc.cfg
[0.001] Reading options from file /Applications/Lazarus_trunk/fpc/bin/x86_64-darwin/fpc.cfg
[0.001] Hint: Start of reading config file /Applications/Lazarus_trunk/fpc/bin/x86_64-darwin/fpc.cfg
[0.001] Interpreting file option "#"
[0.001] Interpreting file option "# Config file generated by fpcmkcfg on 30-9-24 - 13:44:42"
[0.001] Interpreting file option "# Example fpc.cfg for Free Pascal Compiler"
--8<--
[0.005] Interpreting file option "# Display Info, Warnings and Notes"
[0.005] Interpreting file option "#-viwn"
[0.005] Interpreting file option "# If you don't want so much verbosity use"
[0.005] Handling option "-vw"
[0.005] Interpreting option "-vw"
[0.005] Interpreting file option "# begin fpcup do not remove : base settings"
[0.005] Interpreting file option "# Adding binary tools paths to"
[0.005] Interpreting file option "# plain bin dir and architecture bin dir so"
[0.005] Interpreting file option "# fpc 3.1+ fpcres etc can be found."
[0.005] Handling option "-FD/Applications/Lazarus_trunk/fpc/bin/x86_64-darwin;/Applications/Lazarus_trunk/fpc"
[0.005] Interpreting option "-FD/Applications/Lazarus_trunk/fpc/bin/x86_64-darwin;/Applications/Lazarus_trunk/fpc"
[0.005] Interpreting file option "# library search path"
[0.005] Handling option "-Fl/usr/lib/x86_64-win64;/usr/lib/x86_64-win64-gnu;/lib/x86_64-win64;/lib/x86_64-win64-gnu"
[0.005] Interpreting option "-Fl/usr/lib/x86_64-win64;/usr/lib/x86_64-win64-gnu;/lib/x86_64-win64;/lib/x86_64-win64-gnu"
[0.005] Path "/lib/x86_64-win64-gnu/" not found
[0.005] Path "/lib/x86_64-win64/" not found
[0.005] Path "/usr/lib/x86_64-win64-gnu/" not found
[0.005] Path "/usr/lib/x86_64-win64/" not found
[0.005] Interpreting file option "#IFNDEF FPC_CROSSCOMPILING"
[0.005] Interpreting file option "#ENDIF"
[0.005] Interpreting file option "# Add some extra OSX options, if any"
[0.005] Interpreting file option "#IFDEF DARWIN"
[0.005] Interpreting file option "# Prevents crti not found linking errors"
[0.005] Interpreting file option "#IFNDEF FPC_CROSSCOMPILING"
[0.005] Interpreting file option "#ENDIF"
[0.005] Interpreting file option "#ENDIF"
[0.005] Interpreting file option "# MacOS 10.14 Mojave and newer have libs and tools in new, yet non-standard directory"
[0.005] Interpreting file option "#IFDEF DARWIN"
[0.005] Interpreting file option "#ENDIF"
[0.005] Handling option "-Fl/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/lib"
[0.005] Interpreting option "-Fl/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/lib"
[0.005] Handling option "-FD/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin"
[0.005] Interpreting option "-FD/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin"
[0.005] Interpreting file option "# end fpcup do not remove"
[0.005] Interpreting file option "# begin fpcup do not remove x86_64-win64"
--8<--
[0.005] Interpreting file option "#ENDIF FPC_CROSSCOMPILING"
[0.005] Interpreting file option "# end fpcup do not remove"
[0.005] Hint: End of reading config file /Applications/Lazarus_trunk/fpc/bin/x86_64-darwin/fpc.cfg
[0.005] Handling option "-va"
[0.005] Interpreting option "-va"
[0.005] Handling option "-Twin64"
[0.005] Interpreting option "-Twin64"
[0.005] Handling option "-Fr/Applications/Lazarus_trunk/lazarus/components/codetools/fpc.errore.msg"
[0.005] Interpreting option "-Fr/Applications/Lazarus_trunk/lazarus/components/codetools/fpc.errore.msg"
[0.007] Handling option "compilertest.pas"
[0.007] Found source file name "compilertest.pas"
[0.007] Free Pascal Compiler version 3.3.1-16559-gaefca4c22b [2024/09/30] for x86_64
[0.007] Copyright (c) 1993-2024 by Florian Klaempfl and others
[0.008] Macro undefined: CPUX86-64-V1
[0.008] Macro defined: CPUX86-64-V1
[0.008] Macro undefined: FPUSSE64
[0.008] Macro defined: FPUSSE64
[0.008] Macro undefined: FPC_ABI_DEFAULT
[0.008] Macro defined: FPC_ABI_DEFAULT
[0.008] Macro defined: CPUX86_64
[0.008] Macro defined: CPUAMD64
[0.008] Macro defined: CPU64
[0.008] Macro defined: CPUX64
[0.008] Macro defined: FPC_CURRENCY_IS_INT64
[0.008] Macro defined: FPC_COMP_IS_INT64
[0.008] Macro defined: CPUINT64
--8<--
[0.008] Macro defined: FPC_HAS_INTERNAL_BSR
[0.008] Macro defined: FPC_LINK_STATIC
[0.008] Macro FPC_VERSION set to 3
[0.008] Macro FPC_RELEASE set to 3
[0.008] Macro FPC_PATCH set to 1
[0.008] Macro FPC_FULLVERSION set to 30301
[0.008] Macro defined: FPC_HAS_INDIRECT_ENTRY_INFORMATION
[0.008] Macro defined: FPC_HAS_INDIRECT_VAR_ACCESS
[0.008] Macro FPC_STACKALIGNMENT set to 16
[0.010] Compiler: /Applications/Lazarus_trunk/fpc/bin/x86_64-darwin/ppcx64
[0.010] Compiler OS: Darwin for x86_64
[0.010] Target OS: Win64 for x64
[0.010] Using executable path: /Applications/Lazarus_trunk/fpc/bin/x86_64-darwin/
[0.010] Using unit path: /Applications/Lazarus_trunk/fpc/units/x86_64-win64/httpd22/
[0.010] Using unit path: /Applications/Lazarus_trunk/fpc/units/x86_64-win64/rtl/
[0.010] Using unit path: /Applications/Lazarus_trunk/fpc/units/x86_64-win64/opengl/
--8<--
[0.010] Using unit path: /Applications/Lazarus_trunk/fpc/units/x86_64-win64/gtk1/
[0.010] Using unit path: /Applications/Lazarus_trunk/fpc/units/x86_64-win64/fcl-mustache/
[0.010] Using unit path: /Applications/Lazarus_trunk/fpc/units/x86_64-win64/fcl-db/
[0.010] Using unit path: /Applications/Lazarus_trunk/fpc/units/x86_64-win64/rtl-objpas/
--8<--
[0.010] Using unit path: /Applications/Lazarus_trunk/fpc/units/x86_64-win64/fcl-web/
[0.010] Using unit path: /Applications/Lazarus_trunk/fpc/units/x86_64-win64/libgd/
[0.010] Using unit path: /Applications/Lazarus_trunk/fpc/units/x86_64-win64/
[0.010] Using unit path: /Applications/Lazarus_trunk/fpc/bin/x86_64-darwin/
[0.010] Using library path: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/lib/
[0.010] Using library path: /Applications/Lazarus_trunk/fpc/units/x86_64-win64/httpd22/
--8<--
[0.010] Using library path: /Applications/Lazarus_trunk/fpc/units/x86_64-win64/rtl/
[0.010] Using library path: /Applications/Lazarus_trunk/fpc/units/x86_64-win64/opengl/
[0.010] Using library path: /Applications/Lazarus_trunk/fpc/units/x86_64-win64/fcl-base/
[0.011] Compiling compilertest.pas
[0.011] Searching file compilertest.pas... found
[0.012] (PROGRAM) Registering new unit SYSTEM
[0.012] (PROGRAM) Load from PROGRAM (implementation) unit SYSTEM
[0.012] (SYSTEM) Loading unit SYSTEM
[0.012] Unitsearch: system.ppu
[0.012] Searching file system.ppu... not found
[0.012] Searching file SYSTEM.PPU... not found
[0.012] Unitsearch: system.pp
[0.012] Searching file system.pp... not found
[0.012] Searching file SYSTEM.PP... not found
[0.012] Unitsearch: system.pas
[0.012] Searching file system.pas... not found
[0.012] Searching file SYSTEM.PAS... not found
--8<--
[0.013] (SYSTEM) PPU Name: /Applications/Lazarus_trunk/fpc/units/x86_64-win64/rtl/system.ppu
[0.013] (SYSTEM) PPU Time: 2024/10/14 10:28:29
[0.013] (SYSTEM) PPU Flags: 4224
[0.013] (SYSTEM) PPU Crc: 43FC9CD2
[0.013] (SYSTEM) PPU Crc: 700FF837 (intfc)
[0.013] (SYSTEM) PPU Crc: 3CE99B3E (indc)
[0.013] (SYSTEM) Number of definitions: 3895
[0.013] (SYSTEM) Number of symbols: 10694
[0.013] (SYSTEM) PPU Source: system.pp not available
[0.013] (SYSTEM) PPU Source: systemh.inc not available
[0.013] (SYSTEM) PPU Source: genmathh.inc not available
--8<--
[0.013] (SYSTEM) PPU Source: sysosh.inc not available
[0.013] (SYSTEM) PPU Source: rtldefs.inc not available
[0.014] (SYSTEM) PPU Source: cpuwin.inc not available
[0.014] (SYSTEM) PPU Source: syswin.inc not available
[0.014] (SYSTEM) PPU Source: seh64.inc not available
[0.027] (SYSTEM) Finished loading unit SYSTEM
[0.027] Searching file compilertest.pas... found
[0.027] Searching file compilertest.pas... found
[0.027] Searching file compilertest.pas... found
[0.027] Macro defined: FPC_HAS_FEATURE_HEAP
--8<--
[0.028] Searching file compilertest.pas... found
[0.028] Searching file compilertest.pas... found
[0.028] (PROGRAM) Parsing implementation of compilertest.pas
[0.028] Fatal: Syntax error, "BEGIN" expected but "end of file" found
[0.031] Fatal: Compilation aborted
Error: /Applications/Lazarus_trunk/fpc/bin/x86_64-darwin/ppcx64 returned an error exitcode
NOTE: The compilertest.pas is empty, so compilation fails. This is what we want.