FPC ignores additional compiler parameters in external file
Original Reporter info from Mantis: ggeldenhuys
-
Reporter name: Graeme Geldenhuys
Original Reporter info from Mantis: ggeldenhuys
- Reporter name: Graeme Geldenhuys
Description:
I created external *.cfg files that had one line in them listing all the compiler parameters one after the other. I pass this via the @&LtPos;filename> parameter to the compiler.
FPC never listed any problems with that, as the compiler output below shows. It also (silently) never used any of the options in the *.cfg file. But as soon as I change my *.cfg files to list one parameter per line, then it compiles correctly.
To highlight this problem, I simply need to modify my *.cfg files to have multiple lines, but make of the the lines contain more than one compiler parameter. Instantly FPC fails to compile the project, but having them all on one line it doesn't.
------[ compiler output with hidden lines ]-------
'3.0.5.31.gb7cb8.dirty';
"Executing command before" completed
Hint: Start of reading config file /home/graemeg/.fpc.cfg
Hint: End of reading config file /home/graemeg/.fpc.cfg
Hint: Start of reading config file release64_build.cfg
Hint: End of reading config file release64_build.cfg
Free Pascal Compiler version 2.4.1 [2010/04/30] for x86_64
Copyright (c) 1993-2009 by Florian Klaempfl
Target OS: Linux for x86-64
Compiling tutoradmin.lpr
Compiling /home/graemeg/programming/MasterMaths/m2_system/Source/constants.pas
... &LtPos;SNIP> ....
Linking ../../Bin/x86_64-linux/tutoradmin
/usr/bin/ld: warning: ../../Bin/x86_64-linux/link.res contains output
sections; did you forget -T?
528 lines compiled, 0.8 sec
97 hint(s) issued
"Executing command after" completed
Project "tutoradmin" successfully built
--------------------------
So, FPC ignores this file and compiler settings - giving no errors, but also not using those compiler options. -------- debug_build.cfg--------------- -dUseCThreads -dLINK_SQLDB_IB -O- -ghl -B -----------------------------------------
This works 100%
-------- debug_build.cfg ----------------
-dUseCThreads
-dLINK_SQLDB_IB
-O-
-ghl
-B
-----------------------------------------
This the compiler complains about and fails to compile:
---------- debug_build.cfg -----------------------
-dUseCThreads
-dLINK_SQLDB_IB
-O- -ghl -B
---------------------------------------------------
Mantis conversion info:
- Mantis ID: 16558
- OS: Ubuntu Linux
- OS Build: 10.04 LTS
- Build: latest revision
- Platform: x86_64
- Version: 2.4.1
- Fixed in version: 2.4.2
- Fixed in revision: 7670
- Target version: 2.4.2