Skip to content

Commit 496b4fb

Browse files
authored
Merge pull request #119 from jayrm/1.06.0 - fbc 1.06.0 pre-release package build updates
fbc 1.06.0 pre-release package build updates - update ./makefile, ./tests/makefile to specifically handle long command lines on windows & DOS builds - update ./contrib/release/build.sh - updates to wiki documentation
2 parents e8c7305 + 59462d1 commit 496b4fb

File tree

143 files changed

+411
-233
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

143 files changed

+411
-233
lines changed

contrib/release/build.sh

Lines changed: 72 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
# to build (or a tag/branch name).
1212
#
1313
# The standalone fbc is built in the same directory as the normal fbc, by just
14-
# rebuilding src/compiler/obj/fbc.o (that's all that's affected by
14+
# rebuilding src/compiler/obj/$fbtarget/fbc.o (that's all that's affected by
1515
# ENABLE_STANDALONE, except for the directory layout). This way we avoid
1616
# unnecessary full rebuilds.
1717
#
@@ -251,7 +251,7 @@ dos)
251251

252252
djver=205
253253
gccver=710
254-
djgppgccversiondir=7.1.0
254+
djgppgccversiondir=7
255255
bnuver=229
256256
gdbver=771
257257
djpkg=current
@@ -268,23 +268,31 @@ dos)
268268
download_djgpp ${djpkg}/v2gnu/ fil41br2
269269
download_djgpp ${djpkg}/v2gnu/ mak421b
270270
download_djgpp ${djpkg}/v2gnu/ shl2011br2
271+
download_djgpp ${djpkg}/v2gnu/ pth207b
272+
273+
download_djgpp ${djpkg}/v2tk/ ls080b
271274

272275
# Sources for stuff that goes into the FB-dos package (needs updating to new versions)
273276
download_djgpp ${djpkg}/v2gnu/ bnu${bnuver}s
274277
download_djgpp ${djpkg}/v2gnu/ gcc${gccver}s
275278
download_djgpp ${djpkg}/v2gnu/ gdb${gdbver}s
276279
download_djgpp ${djpkg}/v2/ djlsr${djver}
277280

278-
unzip -q ../input/DJGPP/djdev${djver}.zip
281+
unzip -qo ../input/DJGPP/djdev${djver}.zip
282+
283+
unzip -qo ../input/DJGPP/shl2011br2.zip
284+
unzip -qo ../input/DJGPP/fil41br2.zip
285+
unzip -qo ../input/DJGPP/mak421b.zip
286+
unzip -qo ../input/DJGPP/pth207b.zip
287+
288+
unzip -qo ../input/DJGPP/ls080b.zip
279289

280-
unzip -q ../input/DJGPP/shl2011br2.zip
281-
unzip -q ../input/DJGPP/fil41br2.zip
282-
unzip -q ../input/DJGPP/mak421b.zip
290+
unzip -qo ../input/DJGPP/gdb${gdbver}b.zip
291+
unzip -qo ../input/DJGPP/bnu${bnuver}b.zip
292+
unzip -qo ../input/DJGPP/gcc${gccver}b.zip
293+
unzip -qo ../input/DJGPP/gpp${gccver}b.zip
283294

284-
unzip -q ../input/DJGPP/gdb${gdbver}b.zip
285-
unzip -q ../input/DJGPP/bnu${bnuver}b.zip
286-
unzip -q ../input/DJGPP/gcc${gccver}b.zip
287-
unzip -q ../input/DJGPP/gpp${gccver}b.zip
295+
patch -p0 < ../djgpp-fix-pthread.patch
288296
;;
289297
win32)
290298
get_mingww64_toolchain 32 i686
@@ -322,8 +330,14 @@ win32-mingworg)
322330
download_extract_mingw mpfr-3.1.2-2-mingw32-dll.tar.lzma
323331

324332
# Add ddraw.h and dinput.h for FB's gfxlib2
325-
copyfile "../input/MinGW.org/ddraw.h" "include/ddraw.h"
326-
copyfile "../input/MinGW.org/dinput.h" "include/dinput.h"
333+
334+
# if ddraw.h & dinput.h were added manually:
335+
# copyfile "../input/MinGW.org/ddraw.h" "include/ddraw.h"
336+
# copyfile "../input/MinGW.org/dinput.h" "include/dinput.h"
337+
338+
# download link for dx80_mgw.zip from https://liballeg.org/old.html
339+
download dx80_mgw.zip https://download.tuxfamily.org/allegro/files/dx80_mgw.zip
340+
unzip ../input/dx80_mgw.zip include/ddraw.h include/dinput.h
327341

328342
# Work around http://sourceforge.net/p/mingw/bugs/2039/
329343
patch -p0 < ../mingworg-fix-wcharh.patch
@@ -422,14 +436,17 @@ EOF
422436
cmd /c build.bat
423437

424438
echo "building standalone fbc:"
425-
rm fbc/src/compiler/obj/fbc.o
439+
rm fbc/src/compiler/obj/$fbtarget/fbc.o
426440
cmd /c buildsa.bat
427441

428442
mkdir -p fbc/bin/dos
429443
cp bin/ar.exe bin/as.exe bin/gdb.exe bin/gprof.exe bin/ld.exe fbc/bin/dos/
444+
cp bin/dxe3gen.exe fbc/bin/dos/
430445
cp lib/crt0.o lib/gcrt0.o lib/libdbg.a lib/libemu.a lib/libm.a fbc/lib/dos/
431446
cp lib/libstdcxx.a fbc/lib/dos/libstdcx.a
432447
cp lib/libsupcxx.a fbc/lib/dos/libsupcx.a
448+
cp lib/libsocket.a fbc/lib/dos/libsocket.a
449+
cp lib/libpthread.a fbc/lib/dos/libpthread.a
433450
cp lib/gcc/djgpp/$djgppgccversiondir/libgcc.a fbc/lib/dos/
434451

435452
cd fbc
@@ -461,11 +478,19 @@ linuxbuild() {
461478
cp fbc/contrib/manifest/FreeBASIC-$fbtarget.lst ../output
462479
}
463480

464-
windowsbuild() {
465-
# Add our toolchain's bin/ to the PATH, so hopefully we'll only use
466-
# its gcc and not one from the host
467-
origPATH="$PATH"
468-
export PATH="$PWD/bin:$PATH"
481+
libffibuild() {
482+
483+
# do we already have the files we need?
484+
if [ -f "../input/$libffi_title/$target/ffi.h" ]; then
485+
if [ -f "../input/$libffi_title/$target/ffitarget.h" ]; then
486+
if [ -f "../input/$libffi_title/$target/libffi.a" ]; then
487+
echo
488+
echo "using cached libffi: $libffi_title/$target"
489+
echo
490+
return
491+
fi
492+
fi
493+
fi
469494

470495
echo
471496
echo "building libffi"
@@ -475,16 +500,32 @@ windowsbuild() {
475500
cd "$libffi_build"
476501
if [ "$target" = win64 ]; then
477502
CFLAGS=-O2 ../$libffi_title/configure --disable-shared --enable-static --build=x86_64-w64-mingw32 --host=x86_64-w64-mingw32
503+
elif [ "$target" = win32 ]; then
504+
# force host even for 32-bit, we might be cross compiling from x86_64 to x86
505+
CFLAGS=-O2 ../$libffi_title/configure --disable-shared --enable-static --host=i686-w64-mingw32
478506
else
479507
CFLAGS=-O2 ../$libffi_title/configure --disable-shared --enable-static
480508
fi
481509
make
482-
case "$target" in
483-
win32) cp include/ffi.h include/ffitarget.h ../i686-w64-mingw32/include;;
484-
win32-mingworg) cp include/ffi.h include/ffitarget.h ../include;;
485-
win64) cp include/ffi.h include/ffitarget.h ../x86_64-w64-mingw32/include;;
486-
esac
510+
# stash some files in the input folder to make rebuilding faster
511+
mkdir -p ../../input/$libffi_title/$target
512+
cp include/ffi.h include/ffitarget.h ../../input/$libffi_title/$target
513+
cp .libs/libffi.a ../../input/$libffi_title/$target
487514
cd ..
515+
}
516+
517+
windowsbuild() {
518+
# Add our toolchain's bin/ to the PATH, so hopefully we'll only use
519+
# its gcc and not one from the host
520+
origPATH="$PATH"
521+
export PATH="$PWD/bin:$PATH"
522+
523+
libffibuild
524+
case "$target" in
525+
win32) cp ../input/$libffi_title/$target/ffi.h ../input/$libffi_title/$target/ffitarget.h ./i686-w64-mingw32/include;;
526+
win32-mingworg) cp ../input/$libffi_title/$target/ffi.h ../input/$libffi_title/$target/ffitarget.h ./include;;
527+
win64) cp ../input/$libffi_title/$target/ffi.h ../input/$libffi_title/$target/ffitarget.h ./x86_64-w64-mingw32/include;;
528+
esac
488529

489530
cd fbc
490531
echo
@@ -503,7 +544,7 @@ windowsbuild() {
503544
echo
504545
echo "building standalone fbc"
505546
echo
506-
rm src/compiler/obj/fbc.o
547+
rm src/compiler/obj/$fbtarget/fbc.o
507548
make ENABLE_STANDALONE=1
508549
cd ..
509550

@@ -540,11 +581,14 @@ windowsbuild() {
540581
;;
541582
esac
542583

543-
# TODO: GoRC.exe should really be taken from its homepage
544-
# <http://www.godevtool.com/>, but it was offline today
545-
cp $bootfb_title/bin/$fbtarget/GoRC.exe fbc/bin/$fbtarget
584+
# get GoRC.exe from previous fb release
585+
# cp $bootfb_title/bin/$fbtarget/GoRC.exe fbc/bin/$fbtarget
586+
587+
# get GoRC.exe from author site
588+
download "Gorc.zip" "http://www.godevtool.com/Gorc.zip"
589+
unzip ../input/Gorc.zip GoRC.exe -d fbc/bin/$fbtarget
546590

547-
cp "$libffi_build"/.libs/libffi.a fbc/lib/$fbtarget
591+
cp ../input/$libffi_title/$target/libffi.a fbc/lib/$fbtarget
548592

549593
# Reduce .exe sizes by dropping debug info
550594
# (this was at least needed for MinGW.org's gdb, and probably nothing else,
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
--- pthread.h.orig 2007-04-13 15:37:00.000000000 -0400
2+
+++ pthread.h 2019-01-03 15:54:18.000000000 -0500
3+
@@ -110,11 +110,17 @@
4+
*/
5+
#include <sys/types.h> /* for ssize_t */
6+
#include <sys/time.h> /* for struct timeval */
7+
+#if 0
8+
#include <sys/socket.h> /* for sockaddr */
9+
+#endif
10+
#include <signal.h> /* for sigset_t */
11+
+#if 0
12+
#include <sys/wtime.h> /* for struct timespec */
13+
+#endif
14+
#include <unistd.h> /* for off_t */
15+
+#if 0
16+
#include <sys/select.h>
17+
+#endif
18+
19+
/*
20+
* Unprotect namespace, so we can define our own variants now

doc/fbc.1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.TH FBC 1 "2014-09-16" "FreeBASIC Compiler 1.06.0" "FreeBASIC Compiler"
1+
.TH FBC 1 "2019-01-01" "FreeBASIC Compiler 1.06.0" "FreeBASIC Compiler"
22
.SH NAME
33
fbc \- The FreeBASIC compiler
44
.SH DESCRIPTION
@@ -196,7 +196,7 @@ The full language specification and help is available in wiki format at
196196
.B
197197
http://www.freebasic.net/wiki/
198198
.SH COPYRIGHT
199-
Copyright \(co 2004\-2013 The FreeBASIC Development Team
199+
Copyright \(co 2004\-2019 The FreeBASIC Development Team
200200
.br
201201
This is free software. You may redistribute copies of it under the terms of
202202
the GNU General Public License <http://www.gnu.org/licenses/gpl.html>.

doc/fbchkdoc/buffer.bas

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
'' fbchkdoc - FreeBASIC Wiki Management Tools
2-
'' Copyright (C) 2008-2018 Jeffery R. Marshall (coder[at]execulink[dot]com)
2+
'' Copyright (C) 2008-2019 Jeffery R. Marshall (coder[at]execulink[dot]com)
33
''
44
'' This program is free software; you can redistribute it and/or modify
55
'' it under the terms of the GNU General Public License as published by

doc/fbchkdoc/chkdocs.bas

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
'' fbchkdoc - FreeBASIC Wiki Management Tools
2-
'' Copyright (C) 2008-2018 Jeffery R. Marshall (coder[at]execulink[dot]com)
2+
'' Copyright (C) 2008-2019 Jeffery R. Marshall (coder[at]execulink[dot]com)
33
''
44
'' This program is free software; you can redistribute it and/or modify
55
'' it under the terms of the GNU General Public License as published by

doc/fbchkdoc/cmd_opts.bas

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
'' fbchkdoc - FreeBASIC Wiki Management Tools
2-
'' Copyright (C) 2018 Jeffery R. Marshall (coder[at]execulink[dot]com)
2+
'' Copyright (C) 2019 Jeffery R. Marshall (coder[at]execulink[dot]com)
33
''
44
'' This program is free software; you can redistribute it and/or modify
55
'' it under the terms of the GNU General Public License as published by

doc/fbchkdoc/cmd_opts.bi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#define __FBCHKDOC_CMD_OPTS_BI__
33

44
'' fbchkdoc - FreeBASIC Wiki Management Tools
5-
'' Copyright (C) 2018 Jeffery R. Marshall (coder[at]execulink[dot]com)
5+
'' Copyright (C) 2019 Jeffery R. Marshall (coder[at]execulink[dot]com)
66
''
77
'' This program is free software; you can redistribute it and/or modify
88
'' it under the terms of the GNU General Public License as published by

doc/fbchkdoc/delextra.bas

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
'' fbchkdoc - FreeBASIC Wiki Management Tools
2-
'' Copyright (C) 2008-2018 Jeffery R. Marshall (coder[at]execulink[dot]com)
2+
'' Copyright (C) 2008-2019 Jeffery R. Marshall (coder[at]execulink[dot]com)
33
''
44
'' This program is free software; you can redistribute it and/or modify
55
'' it under the terms of the GNU General Public License as published by

doc/fbchkdoc/fmtcode.bas

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
'' fbchkdoc - FreeBASIC Wiki Management Tools
2-
'' Copyright (C) 2008-2018 Jeffery R. Marshall (coder[at]execulink[dot]com)
2+
'' Copyright (C) 2008-2019 Jeffery R. Marshall (coder[at]execulink[dot]com)
33
''
44
'' This program is free software; you can redistribute it and/or modify
55
'' it under the terms of the GNU General Public License as published by

doc/fbchkdoc/funcs.bas

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
'' fbchkdoc - FreeBASIC Wiki Management Tools
2-
'' Copyright (C) 2008-2018 Jeffery R. Marshall (coder[at]execulink[dot]com)
2+
'' Copyright (C) 2008-2019 Jeffery R. Marshall (coder[at]execulink[dot]com)
33
''
44
'' This program is free software; you can redistribute it and/or modify
55
'' it under the terms of the GNU General Public License as published by

0 commit comments

Comments
 (0)