| Anonymous | Login | Signup for a new account | 2013-06-19 08:27 CEST | ![]() |
| All Projects | FPC | Lazarus: Packages, Patches | Lazarus CCR | Mantis | fpGUI | fpcprojects: fpprofiler |
| Main | My View | View Issues | Change Log | Roadmap |
| View Issue Details [ Jump to Notes ] | [ Issue History ] [ Print ] | ||||||||
| ID | Project | Category | View Status | Date Submitted | Last Update | ||||
| 0021963 | FPC | Compiler | public | 2012-05-06 17:31 | 2012-05-06 17:45 | ||||
| Reporter | koda | ||||||||
| Assigned To | Jonas Maebe | ||||||||
| Priority | normal | Severity | tweak | Reproducibility | always | ||||
| Status | resolved | Resolution | fixed | ||||||
| Platform | x86_64 | OS | Ubuntu (host) Darwin (target) | OS Version | 12.04 / 10.6 | ||||
| Product Version | 2.6.0 | Product Build | |||||||
| Target Version | Fixed in Version | ||||||||
| Summary | 0021963: crosscompiling to Darwin and -Xd causes linkage fail | ||||||||
| Description | I'm crosscompiling Hedgewars' engine from Ubuntu 12.04 targetting Darwin 10.6. The cross environment is working fine and it has been used to compile fpc 2.6.0 The fpc help command suggests to use -Xd to perform a crosscompile; however if you do, then linkage will fail, claiming that /usr/lib/crt1.o is not found. That happens because ppaslink.sh contains an hardcoded /usr/lib/crt1.o and no matter which library search path (-XR) you pass, linkage will fail. However, when you don't add -Xd, then the correct path from the -XR command is computed and the correct path for crt1.o will be added in ppaslink.sh. The fact that Xd prevents standard library search path should not prevent the possibility of adding a search path, something which is usually done when crosscompiling. | ||||||||
| Steps To Reproduce | Install Ubuntu, an Apple cross binutils (such as https://launchpad.net/~flosoft/+archive/cross-apple [^]), compile the latest fpc and then try to crosscompile your software (such as hedgewars engine hedgewars.googlecode.com). | ||||||||
| Additional Information | I've had a discussion on this with oliebol, I'm adding more information for future reference. the linker searches in the librarysearchpath for it [crt1.o]; if it can't find it, it hardcodes startupfile. Under darwin sysroot/usr/lib is added to the libsearchpath. As far as I can see it should then be found. There was a dontlinkstdlibpath around it, that is -Xd :-) (t_bsd:129 if interested) | ||||||||
| Tags | No tags attached. | ||||||||
| FPCOldBugId | |||||||||
| Fixed in Revision | 21248 | ||||||||
| Attached Files | |||||||||
Notes |
|
|
(0059317) Jonas Maebe (manager) 2012-05-06 17:45 |
-XR prepends the specified directory to all supplied library search paths. -Xd is orthogonal to that: it removes certain directories from the default library search path (which, if not removed, are prepended by any specified -XR path). I've adjusted the description of the -Xd switch in the help. |
Issue History |
|||
| Date Modified | Username | Field | Change |
| 2012-05-06 17:31 | koda | New Issue | |
| 2012-05-06 17:45 | Jonas Maebe | Fixed in Revision | => 21248 |
| 2012-05-06 17:45 | Jonas Maebe | Status | new => resolved |
| 2012-05-06 17:45 | Jonas Maebe | Resolution | open => fixed |
| 2012-05-06 17:45 | Jonas Maebe | Assigned To | => Jonas Maebe |
| 2012-05-06 17:45 | Jonas Maebe | Note Added: 0059317 | |
| Main | My View | View Issues | Change Log | Roadmap |



