aboutsummaryrefslogtreecommitdiff
path: root/lang
diff options
context:
space:
mode:
authorJohn Marino <marino@FreeBSD.org>2015-12-21 09:57:34 +0000
committerJohn Marino <marino@FreeBSD.org>2015-12-21 09:57:34 +0000
commit971c1c596a20439ae4ce3f6c37cda56bd4c150a0 (patch)
tree59be9dd1df50b8bfa22664d411ff0b4c31a4e009 /lang
parentd247ee21500384cdd5efe134cde3f667f5bb9569 (diff)
downloadports-971c1c596a20439ae4ce3f6c37cda56bd4c150a0.tar.gz
ports-971c1c596a20439ae4ce3f6c37cda56bd4c150a0.zip
Notes
Diffstat (limited to 'lang')
-rw-r--r--lang/fpc/Makefile2
-rw-r--r--lang/fpc/files/patch-compiler_cfileutl.pas12
-rw-r--r--lang/fpc/files/patch-compiler_systems_t__bsd.pas23
-rw-r--r--lang/fpc/files/patch-rtl_bsd_ossysc.inc14
-rw-r--r--lang/fpc/files/patch-rtl_bsd_ostypes.inc27
5 files changed, 77 insertions, 1 deletions
diff --git a/lang/fpc/Makefile b/lang/fpc/Makefile
index 010e9c896184..11a414029e02 100644
--- a/lang/fpc/Makefile
+++ b/lang/fpc/Makefile
@@ -115,7 +115,7 @@ do-build:
# build fpc compiler
@${ECHO_MSG} "##### STARTING COMPILER #####"
(cd ${WRKDIR}/${FPCSRCDIR}/compiler && ${SETENV} ${MAKE_ENV} \
- ${MAKE_CMD} cycle ${MAKE_ARGS} ${BOOTPPC})
+ LDVER=ld.bfd ${MAKE_CMD} cycle ${MAKE_ARGS} ${BOOTPPC})
@${ECHO_MSG} "##### COMPLETE COMPILER #####"
# build fpcmkcfg
diff --git a/lang/fpc/files/patch-compiler_cfileutl.pas b/lang/fpc/files/patch-compiler_cfileutl.pas
new file mode 100644
index 000000000000..c5e1f8e6fb5f
--- /dev/null
+++ b/lang/fpc/files/patch-compiler_cfileutl.pas
@@ -0,0 +1,12 @@
+--- compiler/cfileutl.pas.orig 2015-11-13 21:15:29 UTC
++++ compiler/cfileutl.pas
+@@ -23,9 +23,7 @@ unit cfileutl;
+
+ {$i fpcdefs.inc}
+
+-{$ifndef DragonFly}
+ {$define usedircache}
+-{$endif DragonFly}
+
+ interface
+
diff --git a/lang/fpc/files/patch-compiler_systems_t__bsd.pas b/lang/fpc/files/patch-compiler_systems_t__bsd.pas
new file mode 100644
index 000000000000..30263c3c6e84
--- /dev/null
+++ b/lang/fpc/files/patch-compiler_systems_t__bsd.pas
@@ -0,0 +1,23 @@
+--- compiler/systems/t_bsd.pas.orig 2015-11-13 21:15:29 UTC
++++ compiler/systems/t_bsd.pas
+@@ -192,6 +192,8 @@ begin
+ DynamicLinker:='/usr/libexec/ld.so'
+ else if target_info.system in systems_netbsd then
+ DynamicLinker:='/usr/libexec/ld.elf_so'
++ else if target_info.system=system_x86_64_dragonfly then
++ DynamicLinker:='/libexec/ld-elf.so.2'
+ else
+ DynamicLinker:='';
+ end;
+@@ -718,7 +720,10 @@ begin
+ Replace(cmdstr,'$DYNLINK',DynLinkStr);
+ if (target_info.system in systems_darwin) then
+ Replace(cmdstr,'$PRTOBJ',GetDarwinPrtobjName(false));
+- BinStr:=FindUtil(utilsprefix+BinStr);
++ if target_info.system=system_x86_64_dragonfly then
++ BinStr:='/usr/libexec/binutils225/elf/ld.bfd'
++ else
++ BinStr:=FindUtil(utilsprefix+BinStr);
+
+ { create dsym file? }
+ extdbgbinstr:='';
diff --git a/lang/fpc/files/patch-rtl_bsd_ossysc.inc b/lang/fpc/files/patch-rtl_bsd_ossysc.inc
new file mode 100644
index 000000000000..8523477458a8
--- /dev/null
+++ b/lang/fpc/files/patch-rtl_bsd_ossysc.inc
@@ -0,0 +1,14 @@
+--- rtl/bsd/ossysc.inc.orig 2015-11-13 21:15:29 UTC
++++ rtl/bsd/ossysc.inc
+@@ -282,7 +282,11 @@ begin
+ repeat
+ novalid:=false;
+ CurEntry:=pdirent(dirp^.dd_rewind);
++{$ifdef dragonfly}
++ RecLen:=(CurEntry^.d_namlen + 24) and $FFFFFFF8;
++{$else}
+ RecLen:=CurEntry^.d_reclen;
++{$endif}
+ if RecLen<>0 Then
+ begin {valid direntry?}
+ if CurEntry^.d_fileno<>0 then
diff --git a/lang/fpc/files/patch-rtl_bsd_ostypes.inc b/lang/fpc/files/patch-rtl_bsd_ostypes.inc
new file mode 100644
index 000000000000..62fa7e7deeb8
--- /dev/null
+++ b/lang/fpc/files/patch-rtl_bsd_ostypes.inc
@@ -0,0 +1,27 @@
+--- rtl/bsd/ostypes.inc.orig 2015-11-13 21:15:29 UTC
++++ rtl/bsd/ostypes.inc
+@@ -145,6 +145,16 @@ TYPE
+
+ { directory services }
+ {$ifndef darwinarm}
++{$ifdef dragonfly}
++ dirent = record
++ d_fileno : ino_t; // file number of entry
++ d_namlen : cuint16; // strlen (d_name)
++ d_type : cuint8; // file type, see below
++ d_unused1 : cuint8; // padding, reserved
++ d_unused2 : cuint32; // reserved
++ d_name : array[0..255] of char; // name, null terminated
++ end;
++{$else}
+ dirent = record
+ d_fileno : cuint32; // file number of entry
+ d_reclen : cuint16; // length of this record
+@@ -152,6 +162,7 @@ TYPE
+ d_namlen : cuint8; // length of string in d_name
+ d_name : array[0..(255 + 1)-1] of char; // name must be no longer than this
+ end;
++{$endif}
+ {$else not darwinarm}
+ {$packrecords 4}
+ { available on Mac OS X 10.6 and later, and used by all iPhoneOS versions }