Skip to content
Permalink
Browse files

re-created SQLite3 static libraries for Darwin 32-bit and 64-bit

  • Loading branch information...
Arnaud Bouchez
Arnaud Bouchez committed Mar 25, 2019
1 parent 4c6c88f commit 09888e078c5de317a8b297afcb602e32a50b16fa
@@ -9,16 +9,15 @@ set dlls=%np%\fpcbootstrap\git\mingw32\bin

set gcc=%bin%\i386-apple-darwin15-clang.exe
set path=%path%;%dlls%;%bin%
set inc=-I%bin%\include\clang\4.0.1\include -I%sdk%\include
set inc=-I%bin%\include\clang\5.0.1\include -I%sdk%\include

cd ..\static\i386-darwin

attrib -r sqlite3.o
del sqlite3.o
attrib -r ..\static\i386-darwin\sqlite3.o
del ..\static\i386-darwin\sqlite3.o

@rem here we use -O1 since -O2 triggers unexpected GPF :(
%gcc% -c -O1 -m32 -target i386-apple-darwin15 -DSQLITE_ENABLE_FTS3 -DNDEBUG -DNO_TCL -D_CRT_SECURE_NO_DEPRECATE -DSQLITE_TEMP_STORE=1 %inc% -I. ..\..\SQLite3\sqlite3.c -o sqlite3.o
@rem try -O1 if -O2 triggers unexpected GPF :(
%gcc% -c -O2 -m32 -target i386-apple-darwin15 -DSQLITE_ENABLE_FTS3 -DNDEBUG -DNO_TCL -D_CRT_SECURE_NO_DEPRECATE -DSQLITE_TEMP_STORE=1 %inc% -I. sqlite3.c -o ..\static\i386-darwin\sqlite3.o

cd ..\static\i386-darwin
%bin%\i386-apple-darwin15-libtool.exe -static sqlite3.o -o libsqlite3.a

attrib +r sqlite3.o
@@ -9,17 +9,17 @@ set dlls=%np%\fpcbootstrap\git\mingw32\bin

set gcc=%bin%\x86_64-apple-darwin15-clang.exe
set path=%path%;%dlls%;%bin%
set inc=-I%bin%\include\clang\4.0.1\include -I%sdk%\include
set inc=-I%bin%\include\clang\5.0.1\include -I%sdk%\include

@rem echo path

cd ..\static\x86_64-darwin
attrib -r ..\static\x86_64-darwin\sqlite3.o
del ..\static\x86_64-darwin\sqlite3.o

attrib -r sqlite3.o
del sqlite3.o
@rem may try to use -O1 if -O2 triggers unexpected GPF :(
%gcc% -c -O2 -m64 -target x86_64-apple-darwin15 -DSQLITE_ENABLE_FTS3 -DNDEBUG -DNO_TCL -D_CRT_SECURE_NO_DEPRECATE -DSQLITE_TEMP_STORE=1 %inc% -I. sqlite3.c -o ..\static\x86_64-darwin\sqlite3.o

@rem here we use -O1 since -O2 triggers unexpected GPF :(
%gcc% -c -O1 -m64 -target x86_64-apple-darwin15 -DSQLITE_ENABLE_FTS3 -DNDEBUG -DNO_TCL -D_CRT_SECURE_NO_DEPRECATE -DSQLITE_TEMP_STORE=1 %inc% -I. ..\..\SQLite3\sqlite3.c -o sqlite3.o
cd ..\static\x86_64-darwin

%bin%\x86_64-apple-darwin15-libtool.exe -static sqlite3.o -o libsqlite3.a

RegisterIdent: integer;
/// used to specify if a floating-point argument is passed as register
// - contains always 0 for x86/x87
// - contains 1 for XMM0, 2 for XMM1 ... 4 for XMM3 for x64
// - contains 1 for D0, 2 D1 ... 8 for D7 for armhf
// - contains 1 for V0, 2 V1 ... 8 for V7 for aarch64
// - contains 1 for XMM0, 2 for XMM1, ..., 4 for XMM3 for x64
// - contains 1 for D0, 2 for D1, ..., 8 for D7 for armhf
// - contains 1 for V0, 2 for V1, ..., 8 for V7 for aarch64
FPRegisterIdent: integer;
/// size (in bytes) of this argument on the stack
SizeInStack: integer;
ErrorMsg: RawUTF8;
dummy: pointer;
{$ifdef HAS_FPREG}
ValueIsInFPR:boolean;
ValueIsInFPR: boolean;
{$endif}
{$ifdef CPUX86}
offs: integer;
((ValueIsInFPR) and (fpreg>FPREG_LAST)) or
(not ValueIsInFPR and (reg>PARAMREG_LAST))
{$else}
(reg>PARAMREG_LAST) // Win64
(reg>PARAMREG_LAST) // Win64: XMMs overlap regular registers
{$endif Linux}
{$endif CPUX86}
{$ifdef FPC}or ((ValueType in [smvRecord]) and
mov rdx, [r12].TCallMethodArgs.StackAddr
jmp @checkstack
@addstack:
push qword ptr[rdx]
dec ecx
push qword ptr[rdx]
sub rdx, 8
@checkstack:
or ecx, ecx
test ecx, ecx
jnz @addstack
// fill registers and call method
{$ifdef LINUX}
@@ -1 +1 @@
'1.18.5135'
'1.18.5136'
BIN +825 KB (170%) static/i386-darwin/libsqlite3.a
Binary file not shown.
BIN +825 KB (170%) static/i386-darwin/sqlite3.o
Binary file not shown.
Binary file not shown.
BIN +427 KB (130%) static/x86_64-darwin/sqlite3.o
Binary file not shown.

0 comments on commit 09888e0

Please sign in to comment.
You can’t perform that action at this time.