Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-devel / 2021-01

macos: -Xm leads to error while linking

2 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Виктор Матузенко

Hi,

I've tried to compile a program on MacOS, but got the following error:

$ cat empty.pas
begin end.

$ fpc -Xm empty.pas
Free Pascal Compiler version 3.2.0 [2020/05/31] for x86_64 Copyright (c) 1993-2020 by Florian Klaempfl and others Target OS: Darwin for x86_64
Compiling empty.pas
Assembling (pipe) empty.s
Linking empty
ld: unknown option: -Map
An error occurred while linking
Error: Error while linking
Fatal: There were 1 errors compiling module, stopping Fatal: Compilation aborted
Error: /usr/local/bin/ppcx64 returned an error exitcode

$ /usr/bin/xcodebuild -version
Xcode 5.0.2
Build version 5A3005

It's official release, I've not tested with the trunk version. -Xm was successfully
worked with fpc 2.6.x.

Is this a bug? Should I create an issue in the bug tracker?

Is there a workaround to use the -Xm and still get the .map file? Maybe some modifications to ppas.sh or link.res would help?

Victor Matuzenko (Виктор Матузенко)

Reply by email

Jonas Maebe
to Виктор Матузенко
Виктор Матузенко wrote
It's official release, I've not tested with the trunk version. -Xm was successfully worked with fpc 2.6.x.

That's strange, at first sight it did nothing for macOS in 2.6.x

Is this a bug? Should I create an issue in the bug tracker?

No, I've fixed it. It will be fixed in 3.2.2.

Is there a workaround to use the -Xm and still get the .map file? Maybe some modifications to ppas.sh or link.res would help?

You can use the following parameters instead of -Xmbla.map to work around it:
-k-map -kbla.map

Jonas

Reply by email