Re: [fpc-devel] 3.04.1 ld error

2019-02-02 Thread Ozz Nixon
did a simple test:

"test.pp" [New] 9L, 94C written
[root@fido mp3]# fpc test.pp
Free Pascal Compiler version 3.0.4 [2017/10/02] for x86_64
Copyright (c) 1993-2017 by Florian Klaempfl and others
Target OS: Linux for x86-64
Compiling test.pp
Linking test
/usr/bin/ld: warning: link.res contains output sections; did you forget -T?
/usr/bin/ld: BFD version 2.20.51.0.2-5.44.el6 20100205 internal error,
aborting at reloc.c line 443 in bfd_get_reloc_size

/usr/bin/ld: Please report this bug.

test.pp(9,1) Error: Error while linking
test.pp(9,1) Fatal: There were 1 errors compiling module, stopping
Fatal: Compilation aborted
Error: /usr/bin/ppcx64 returned an error exitcode

On Sun, Feb 3, 2019 at 2:22 AM Ozz Nixon  wrote:

> NOPE - FPC is the compiler for my Interpreter
>
> On Sun, Feb 3, 2019 at 2:13 AM Ralf Quint  wrote:
>
>> On 2/2/2019 11:11 PM, Ozz Nixon wrote:
>>
>> I am trying to do a fresh rebuild on a Centos 6.8 box - so I copied
>> Modern Pascal over, installed 3.0.4.1 from freemirror... and I get:
>>
>> Linking modernpascal_v2
>>
>> Don't you think you  might be asking in the wrong place?
>>
>> Ralf
>>
>>
>> 
>>  Virus-free.
>> www.avast.com
>> 
>> <#m_-8962622757590602507_m_-6055792720341136302_DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
>> ___
>> fpc-devel maillist  -  fpc-devel@lists.freepascal.org
>> http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel
>>
>
___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel


Re: [fpc-devel] 3.04.1 ld error

2019-02-02 Thread Ozz Nixon
NOPE - FPC is the compiler for my Interpreter

On Sun, Feb 3, 2019 at 2:13 AM Ralf Quint  wrote:

> On 2/2/2019 11:11 PM, Ozz Nixon wrote:
>
> I am trying to do a fresh rebuild on a Centos 6.8 box - so I copied Modern
> Pascal over, installed 3.0.4.1 from freemirror... and I get:
>
> Linking modernpascal_v2
>
> Don't you think you  might be asking in the wrong place?
>
> Ralf
>
>
> 
>  Virus-free.
> www.avast.com
> 
> <#m_-6055792720341136302_DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
> ___
> fpc-devel maillist  -  fpc-devel@lists.freepascal.org
> http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel
>
___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel


Re: [fpc-devel] 3.04.1 ld error

2019-02-02 Thread Ralf Quint

On 2/2/2019 11:11 PM, Ozz Nixon wrote:
I am trying to do a fresh rebuild on a Centos 6.8 box - so I copied 
Modern Pascal over, installed 3.0.4.1 from freemirror... and I get:


Linking modernpascal_v2


Don't you think you  might be asking in the wrong place?

Ralf



---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus
___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel


[fpc-devel] 3.04.1 ld error

2019-02-02 Thread Ozz Nixon
I am trying to do a fresh rebuild on a Centos 6.8 box - so I copied Modern
Pascal over, installed 3.0.4.1 from freemirror... and I get:

Linking modernpascal_v2
/usr/bin/ld: warning: link.res contains output sections; did you forget -T?
/usr/bin/ld: BFD version 2.20.51.0.2-5.44.el6 20100205 internal error,
aborting at reloc.c line 443 in bfd_get_reloc_size

/usr/bin/ld: Please report this bug.

Error: Error while linking
Fatal: There were 1 errors compiling module, stopping
Fatal: Compilation aborted
Error: /usr/bin/ppcx64 returned an error exitcode

Can someone help so I can get this build tested this weekend??

Regards
Ozz
___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel


[fpc-devel] Detecting SSE and AVX compiler options

2019-02-02 Thread J. Gareth Moreton
 Hi everyone,

 So I'm looking to improve some of the mathematical routines.  However,
not all of them are internal functions and are stored in the Math unit.. 
Some of them are written in assembly language but use the old
floating-point stack, or use a slow hack when there's a good alternative
available in SSE 4.1, for example, and I would like to see about rewriting
some of these functions for x86_64.  However, while I can safely assume
the presence of SSE2 on this architecture, what's the best way to detect if
"-iCOREAVX" etc are specified?  Also, if "-iCOREAVX", does it
automatically set "-fAVX" as well?  I rather make sure I'm not making
incorrect assumptions before I start writing assembly language routines.

 As an example of a function that can benefit from a speed-up under
x86_64... the floor() and floor64() functions:
 function floor64(x: float): Int64;
   begin
     Result:=Trunc(x)-ord(Frac(x)___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel


[fpc-devel] Internal symbols

2019-02-02 Thread J. Gareth Moreton
 Hi everyone,

 So I've come across a couple of issues recently regarding
internally-defined symbols.  One of them involves assembly language, which
is always asking for trouble, but one can be triggered through regular
Pascal code.

 Basically, if you declare a public symbol (either using the "public"
directive or putting it in the interface section of a unit) with a name
that's identical to an internal symbol (I used "FPC_ABSMASK_DOUBLE"), you
get a 'duplicate symbol' linker error... in fact, Lazarus doesn't even
display the error (see bug #34996) - it only appears if you run the
compiler from the command line.

 You can get around the above issue if you simply rename the constant or
keep it private.  However, there is one other issue that is not so easy to
circumvent, and that's when you try to call an internal function through
assembly language (in this instance, I'm assuming the code is not
cross-platform and I'll be calling the x86_64 version of fpc_int_real,
which is "nostackframe" and only modifies XMM0 and RAX):

   { Asm is Intel-style }
   MOVSD XMM4, [RIP+TwoPi]
   MOVSD XMM5, XMM0
   DIVSD XMM0, XMM4
   CALL  fpc_int_real
   MULSD XMM0, XMM4
   SUBSD XMM5, XMM0
   MOVSD XMM0, XMM5

 This snippet of code is equivalent to "D := D - (Int(D / TwoPi) *
TwoPi);", effectively a floating-point version of "D mod TwoPi".

 The problem here is that fpc_int_real is not found by the compiler...
however, if you attempt to use "CALL int" instead, you get the following
linker error:

 "Error: Undefined symbol: SYSTEM_::=::_INT$DOUBLE::=::DOUBLE"

 This is because int() is internally changed to fpc_int_real() by the
compiler when it appears in Pascal code.  I could just write my own copy
of fpc_int_real, but that defeats the purpose of it somewhat, not least in
that it causes code duplication and hence increases code size and
maintenance issues.  An idea is to improve assembler parsing by correctly
changing such symbols to point to their internal counterparts, but this
runs into the issue that some functions, like abs(), are not actually
functions at all when compiled, but become distinct nodes in the PPU files
and translate into direct lines of assembly language (e.g. abs(DValue)
becomes "ANDPD DValue, [RIP+FPC_ABSMASK_DOUBLE]"), and you can't hope to
smartly change "CALL abs" into such a line of code.

 I suppose I'm asking for a discussion on this, because there doesn't seem
to be a clean solution to this.  Allowing the compiler access to internal
symbols is possible, but probably asking for trouble, while properly
translating assembler calls to internal routines leads to some troublesome
situations.  What do you guys think?

 Gareth aka. Kit
 ___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel


Re: [fpc-devel] Proposal to adapt search patch under Haiku using a target specific option (-WH).

2019-02-02 Thread Olivier Coursière via fpc-devel

Hi Pierre,

Le 11/01/2019 à 21:05, Olivier Coursière a écrit :

Hi Pierre,


On 31/12/2018 12:00, Pierre Muller wrote:

  It would be nice to also get regular testsuite results for Haiku OS!
I have checked the make uploadrun but i still don't understand what 
"automatic login with user fpc" really mean. Is there a document that 
describe the process of setting up that ?


I should not asked many different questions in the same message : I 
still not understand what i should do to configure uploadrun to send 
test results.


Olivier

___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel