[fpc-devel] Error compiling trunk on FreeBSD
Hi, I'm trying to compile the r17057 on FreeBSD x86_64 and I'm getting this error: fpc/rtl/units/x86_64-freebsd/cpu.s:40: Error: no such instruction: `cmpxchg16b (%r8) Any hint? ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel
[fpc-devel] Error compiling trunk on FreeBSD
Hi, I'm trying to compile the r17057 on FreeBSD x86_64 and I'm getting this error: fpc/rtl/units/x86_64-freebsd/cpu.s:40: Error: no such instruction: `cmpxchg16b (%r8) Any hint? ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel
Re: [fpc-devel] Error compiling trunk on FreeBSD
On Tue, Mar 1, 2011 at 03:07, Leonardo M. Ramé wrote: > Hi, I'm trying to compile the r17057 on FreeBSD x86_64 and I'm getting this > error: > > fpc/rtl/units/x86_64-freebsd/cpu.s:40: Error: no such instruction: > `cmpxchg16b (%r8) > > Any hint? It seems you should upgrade your assembler/binutils? (No idea how to to do that on BSD). -- Alexander S. Klenin ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel
Re: [fpc-devel] Error compiling trunk on FreeBSD
In our previous episode, Alexander Klenin said: > On Tue, Mar 1, 2011 at 03:07, Leonardo M. Ram? wrote: > > Hi, I'm trying to compile the r17057 on FreeBSD x86_64 and I'm getting this > > error: > > > > fpc/rtl/units/x86_64-freebsd/cpu.s:40: Error: no such instruction: > > `cmpxchg16b (%r8) > > > > Any hint? > > It seems you should upgrade your assembler/binutils? Binutils 2.15 is the lastest binutils under GPLv2. FreeBSD does not accept GPLv3 code into the base system afaik. It will have to be ifdefed or written out with db. Can sb with a x86_64 linux objdump the generated file and post the relevant fragment on the list? Thanks. ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel
Re: [fpc-devel] Error compiling trunk on FreeBSD
On 02 Mar 2011, at 10:56, Marco van de Voort wrote: Binutils 2.15 is the lastest binutils under GPLv2. Binutils 2.17 was the last GPLv2 version of binutils, and it supports cmpxchg16b. Jonas ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel
Re: [fpc-devel] Error compiling trunk on FreeBSD
In our previous episode, Jonas Maebe said: > > Binutils 2.15 is the lastest binutils under GPLv2. > > Binutils 2.17 was the last GPLv2 version of binutils, and it supports > cmpxchg16b. Ok. Then I don't know why they are stuck at 2.15, I got that answer then (at the Fosdem LLVM talk), but didn't check it further. I'll ask around. But anyway, 8.2 is days old, so migrating to 2.17 is for now not an option, and the "db" solution will have to be implemented anyway. ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel
Re: [fpc-devel] Error compiling trunk on FreeBSD
> From: Marco van de Voort > > > Binutils 2.15 is the lastest binutils under > GPLv2. > > > > Binutils 2.17 was the last GPLv2 version of binutils, > and it supports > > cmpxchg16b. > > Ok. Then I don't know why they are stuck at 2.15, I got > that answer then (at > the Fosdem LLVM talk), but didn't check it further. > I'll ask around. > > But anyway, 8.2 is days old, so migrating to 2.17 is for > now not an option, > and the "db" solution will have to be implemented anyway. I upgraded to the latest binutils from /usr/ports/devel/binutils (it's ver 2.21), then compiled FPC 2.5.1, but I got the same error. -- Leonardo M. Ramé http://leonardorame.blogspot.com ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel
Re: [fpc-devel] Error compiling trunk on FreeBSD
On Wed, March 2, 2011 11:13, Marco van de Voort wrote: > In our previous episode, Jonas Maebe said: >> > Binutils 2.15 is the lastest binutils under GPLv2. >> >> Binutils 2.17 was the last GPLv2 version of binutils, and it supports >> cmpxchg16b. > > Ok. Then I don't know why they are stuck at 2.15, I got that answer then > (at > the Fosdem LLVM talk), but didn't check it further. I'll ask around. > > But anyway, 8.2 is days old, so migrating to 2.17 is for now not an > option, > and the "db" solution will have to be implemented anyway. FWIW, I had to do something similar in i386/mmx.pp (femms instruction) in the past due to AS version available for OS/2 at that time. Tomas ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel
Re: [fpc-devel] Error compiling trunk on FreeBSD
In our previous episode, Tomas Hajny said: > > Ok. Then I don't know why they are stuck at 2.15, I got that answer then > > (at > > the Fosdem LLVM talk), but didn't check it further. I'll ask around. > > > > But anyway, 8.2 is days old, so migrating to 2.17 is for now not an > > option, > > and the "db" solution will have to be implemented anyway. > > FWIW, I had to do something similar in i386/mmx.pp (femms instruction) in > the past due to AS version available for OS/2 at that time. Yes. But that is about way older binutils. OpenBSD had some too before 3.4 (when they were a.out) I asked around, and FreeBSD 9 will migrate to 2.17.50 (+patches). But they usually don't change toolchains much within stable versions, and FreeBSD7 is supported till 2013, so FreeBSD8 even longer probably, so we will have to live with it. Luckily it is a freakish instruction with only one occurance. x86_64 is FreebSD8 plus (I have no idea how it fares on -7, it might be that it just works and that the porter did it) ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel
Re: [fpc-devel] Error compiling trunk on FreeBSD
In our previous episode, Leonardo M. Ram? said: > I upgraded to the latest binutils from /usr/ports/devel/binutils (it's ver > 2.21), then compiled FPC 2.5.1, but I got the same error. I assume that means they are installed into local? Did you make sure they are actually used (e.g. by using -s) ? If you do, and they are not, try passing -FD/usr/local/lib ? ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel
Re: [fpc-devel] Error compiling trunk on FreeBSD
> From: Marco van de Voort > Subject: Re: [fpc-devel] Error compiling trunk on FreeBSD > To: "FPC developers' list" > Date: Wednesday, March 2, 2011, 11:04 AM > In our previous episode, Leonardo M. > Ram? said: > > I upgraded to the latest binutils from > /usr/ports/devel/binutils (it's ver 2.21), then compiled FPC > 2.5.1, but I got the same error. > > I assume that means they are installed into local? Did you > make sure they > are actually used (e.g. by using -s) ? > > If you do, and they are not, try passing -FD/usr/local/lib > ? Thanks for pointing that out, I was using 2.15, and in /usr/local I have 2.21. Leonardo M. Ramé http://leonardorame.blogspot.com ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel
Re: [fpc-devel] Error compiling trunk on FreeBSD
In our previous episode, Leonardo M. Ram? said: >Thanks for pointing that out, I was using 2.15, and in /usr/local I have 2.21. If you can compile it now, please post the result of objdump -d cpu.o (the InterlockedCompareExchange128 part). Thanks. (this is also in fixes, and needs to be fixes asap because of 2.4.4) ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel
Re: [fpc-devel] Error compiling trunk on FreeBSD
> From: Marco van de Voort > Subject: Re: [fpc-devel] Error compiling trunk on FreeBSD > To: "FPC developers' list" > Date: Wednesday, March 2, 2011, 11:31 AM > In our previous episode, Leonardo M. > Ram? said: > > >Thanks for pointing that out, I was using 2.15, and in > /usr/local I have 2.21. > > If you can compile it now, please post the result of > > objdump -d cpu.o (the > InterlockedCompareExchange128 part). > > Thanks. (this is also in fixes, and needs to be fixes asap > because of 2.4.4) I successfully compiled it with this command: gmake clean all OPT="-FD/usr/local/bin" Here's the dump: cpu.o: file format elf64-x86-64 Disassembly of section .text: : 0: 8a 04 25 00 00 00 00mov0x0,%al 7: c3 retq 0008 : 8: 55 push %rbp 9: 48 89 e5mov%rsp,%rbp c: 48 83 ec 10 sub$0x10,%rsp 10: 53 push %rbx 11: 51 push %rcx 12: 49 8b 18mov(%r8),%rbx 15: 49 8b 48 08 mov0x8(%r8),%rcx 19: 49 89 d0mov%rdx,%r8 1c: 49 8b 01mov(%r9),%rax 1f: 49 8b 51 08 mov0x8(%r9),%rdx 23: f0 49 0f c7 08 rex64Z lock cmpxchg8b (%r8) 28: 59 pop%rcx 29: 48 89 01mov%rax,(%rcx) 2c: 48 89 51 08 mov%rdx,0x8(%rcx) 30: 5b pop%rbx 31: c9 leaveq 32: c3 retq 33: 0f 1f (bad) 35: 44 00 00add%r8b,(%rax) Leonardo M. Ramé http://leonardorame.blogspot.com ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel
Re: [fpc-devel] Error compiling trunk on FreeBSD
In our previous episode, Leonardo M. Ram? said: > objdump -d cpu.o???(the > InterlockedCompareExchange128 part). > > Thanks. (this is also in fixes, and needs to be fixes asap > because of 2.4.4) Thanks, fixed. ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel
Re: [fpc-devel] Error compiling trunk on FreeBSD
Am 02.03.2011 14:01, schrieb Marco van de Voort: > In our previous episode, Tomas Hajny said: >>> Ok. Then I don't know why they are stuck at 2.15, I got that answer then >>> (at >>> the Fosdem LLVM talk), but didn't check it further. I'll ask around. >>> >>> But anyway, 8.2 is days old, so migrating to 2.17 is for now not an >>> option, >>> and the "db" solution will have to be implemented anyway. >> >> FWIW, I had to do something similar in i386/mmx.pp (femms instruction) in >> the past due to AS version available for OS/2 at that time. > > Yes. But that is about way older binutils. OpenBSD had some too before 3.4 > (when they were a.out) > > I asked around, and FreeBSD 9 will migrate to 2.17.50 (+patches). But they > usually don't change toolchains much within stable versions, and FreeBSD7 is > supported till 2013, so FreeBSD8 even longer probably, so we will have to > live with it. Luckily it is a freakish instruction with only one > occurance. x86_64 is FreebSD8 plus (I have no idea how it fares on -7, it > might be that it just works and that the porter did it) Good reason to fix the elf64 writer for FreeBSD :)? ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel