View Issue Details

IDProjectCategoryView StatusLast Update
0027988FPCCompilerpublic2015-04-28 22:08
ReporterStéphane Aulery Assigned ToJonas Maebe  
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionno change required 
Summary0027988: Variable length line break during the phase of Linkage
DescriptionWhenever the compiler performs a linking, it sends a number of line breaks on the outlet-standard (regular depending on the file to link). It is very annoying to see the build logs.
Additional InformationI do not know which file is responsible. I modified the files compiler/link.pas, compiler/script.pas, compiler/utils/ppumove.pp, rtl/unix/unix.pp from trunk but I can not compile a compiler that takes compe my changes.
TagsNo tags attached.
Fixed in Revision
FPCOldBugId
FPCTarget
Attached Files

Relationships

has duplicate 0028414 closedJonas Maebe Linker generates too many empty lines breaks 
has duplicate 0028661 closedJonas Maebe In 3.0.0 rc1 and trunk, spurious blank lines when compiling 
has duplicate 0030292 resolvedJonas Maebe linux command line compile, I always get the message : Did you forget -T? 

Activities

Jonas Maebe

2015-04-27 21:20

manager   ~0083279

Maybe these line breaks are produced by the linker itself? Try compiling with "-s" and then executing ppas.sh afterwards to see whether you also get those line breaks then.

Please also show an example of the kind of output you are talking about, because I can't remember ever seeing anything like that.

Stéphane Aulery

2015-04-27 21:38

reporter   ~0083281

For example I do in /fpc/trunk/compiler/utils directory:

$make msg2inc
/bin/mkdir -p units/x86_64-linux
/usr/bin/ppcx64 -Fu.. -Fu../../rtl/units/x86_64-linux -FE. -FUunits/x86_64-linux -Cg -dx86_64 msg2inc.pp
Free Pascal Compiler version 2.6.4+dfsg-4 [2014/10/14] for x86_64
Copyright (c) 1993-2014 by Florian Klaempfl and others
Target OS: Linux for x86-64
Compiling msg2inc.pp
msg2inc.pp(64,3) Note: Local variable "code" is assigned but never used
Linking ./msg2inc





/usr/bin/ld.bfd: Avertissement: ./link.res contient des sections de sortie; avez-vous oublié -T?
823 lines compiled, 0.2 sec
1 note(s) issued

Stéphane Aulery

2015-04-27 21:40

reporter   ~0083282

Same things with:

$fpc msg2inc
Free Pascal Compiler version 2.6.4+dfsg-4 [2014/10/14] for x86_64
Copyright (c) 1993-2014 by Florian Klaempfl and others
Target OS: Linux for x86-64
Compiling msg2inc.pp
msg2inc.pp(64,3) Note: Local variable "code" is assigned but never used
Linking msg2inc





/usr/bin/ld.bfd: Avertissement: link.res contient des sections de sortie; avez-vous oublié -T?
823 lines compiled, 0.3 sec
1 note(s) issued

Stéphane Aulery

2015-04-27 21:41

reporter   ~0083283

Last edited: 2015-04-27 21:45

View 2 revisions

With fpc -s. It does not know whether the manager is the linker or compiler.

Jonas Maebe

2015-04-27 22:20

manager   ~0083284

Maybe it's because of the "+dfsg-4" patches? I've never seen this with the standard FPC.

"fpc -s" generates a bash script that contains the assembler and linker commands. If you execute it afterwards with ./ppas.sh, it will execute the assembler and linker directly, without intervention by the compiler.

Stéphane Aulery

2015-04-27 23:23

reporter   ~0083285

I find my answer. ld.bfd is uncivil.

And for its part, fpc provided link.res file that displeases the linker.

/usr/bin/ld.bfd warning: link.res contains output sections; did you forget -T?

Jonas Maebe

2015-04-28 07:56

manager   ~0083291

Regarding the -T warning, see http://www.freepascal.org/faq.var#unix-ld219

Stéphane Aulery

2015-04-28 21:55

reporter   ~0083304

Last edited: 2015-04-28 21:56

View 2 revisions

I reopen this bug because, with the help of HJ Lu [1], I found an easy way to remove the extra line breaks of ld.

Simply place each object file path in its own INPUT section (), like this:

INPUT(/usr/lib/fpc/2.6.4/units/x86_64-linux/rtl/prt0.o)
INPUT(objectfile_1.o)
INPUT(objectfile_2.o)
INPUT(/usr/lib/fpc/2.6.4/.../objectfile_n.o)

I'll write a patch to fix it all, if that's okay.

[1] https://sourceware.org/bugzilla/show_bug.cgi?id=18344

Jonas Maebe

2015-04-28 22:08

manager   ~0083305

Since it was a bug that was fixed in ld, and since there is no effect other than some empty lines, I do not think that complicating the FPC source is warranted.

Issue History

Date Modified Username Field Change
2015-04-27 21:15 Stéphane Aulery New Issue
2015-04-27 21:20 Jonas Maebe Note Added: 0083279
2015-04-27 21:38 Stéphane Aulery Note Added: 0083281
2015-04-27 21:40 Stéphane Aulery Note Added: 0083282
2015-04-27 21:41 Stéphane Aulery Note Added: 0083283
2015-04-27 21:45 Stéphane Aulery Note Edited: 0083283 View Revisions
2015-04-27 22:20 Jonas Maebe Note Added: 0083284
2015-04-27 23:23 Stéphane Aulery Note Added: 0083285
2015-04-28 07:56 Jonas Maebe Note Added: 0083291
2015-04-28 07:56 Jonas Maebe Status new => resolved
2015-04-28 07:56 Jonas Maebe Resolution open => not fixable
2015-04-28 07:56 Jonas Maebe Assigned To => Jonas Maebe
2015-04-28 21:55 Stéphane Aulery Note Added: 0083304
2015-04-28 21:55 Stéphane Aulery Status resolved => feedback
2015-04-28 21:55 Stéphane Aulery Resolution not fixable => reopened
2015-04-28 21:56 Stéphane Aulery Note Edited: 0083304 View Revisions
2015-04-28 22:08 Jonas Maebe Note Added: 0083305
2015-04-28 22:08 Jonas Maebe Status feedback => resolved
2015-04-28 22:08 Jonas Maebe Resolution reopened => no change required
2015-07-22 10:18 Jonas Maebe Relationship added has duplicate 0028414
2015-09-13 00:33 Jonas Maebe Relationship added has duplicate 0028661
2016-06-17 18:22 Jonas Maebe Relationship added has duplicate 0030292