From b815f6e1011ef72fdb30694a0a1da04cee025562 Mon Sep 17 00:00:00 2001 From: florian Date: Sat, 13 Aug 2005 20:59:14 +0000 Subject: [PATCH] Merged revisions 855 via svnmerge from /trunk git-svn-id: branches/fixes_2_0@857 - --- .gitattributes | 2 ++ compiler/psub.pas | 6 +++++- compiler/systems.pas | 4 +--- compiler/systems/t_linux.pas | 2 ++ tests/webtbs/tw3964.pp | 18 ++++++++++++++++++ tests/webtbs/uw3964.pp | 16 ++++++++++++++++ 6 files changed, 44 insertions(+), 4 deletions(-) create mode 100644 tests/webtbs/tw3964.pp create mode 100644 tests/webtbs/uw3964.pp diff --git a/.gitattributes b/.gitattributes index 63dffdea9a..38b7e32a3f 100644 --- a/.gitattributes +++ b/.gitattributes @@ -5955,6 +5955,7 @@ tests/webtbs/tw3913.pp svneol=native#text/plain tests/webtbs/tw3939.pp svneol=native#text/plain tests/webtbs/tw3953a.pp svneol=native#text/plain tests/webtbs/tw3953b.pp svneol=native#text/plain +tests/webtbs/tw3964.pp -text tests/webtbs/tw3967.pp svneol=native#text/plain tests/webtbs/tw3968.pp svneol=native#text/plain tests/webtbs/tw3970.pp svneol=native#text/plain @@ -6027,6 +6028,7 @@ tests/webtbs/uw3356.pp svneol=native#text/plain tests/webtbs/uw3429.pp svneol=native#text/plain tests/webtbs/uw3474a.pp svneol=native#text/plain tests/webtbs/uw3474b.pp svneol=native#text/plain +tests/webtbs/uw3964.pp -text tests/webtbs/uw3968.pp svneol=native#text/plain tests/webtbs/uw4140.pp svneol=native#text/plain utils/Makefile svneol=native#text/plain diff --git a/compiler/psub.pas b/compiler/psub.pas index f7d414b3d0..9b308bb8b4 100644 --- a/compiler/psub.pas +++ b/compiler/psub.pas @@ -1382,7 +1382,11 @@ implementation consume_all_until(_SEMICOLON); end else if islibrary or - (target_info.system in [system_i386_WIN32,system_i386_wdosx,system_i386_Netware,system_i386_netwlibc]) then + (target_info.system in [ + system_i386_win32, + system_i386_wdosx, + system_i386_Netware, + system_i386_netwlibc]+system_linux) then read_exports else begin diff --git a/compiler/systems.pas b/compiler/systems.pas index 82ba321034..a00afeaae5 100644 --- a/compiler/systems.pas +++ b/compiler/systems.pas @@ -292,10 +292,8 @@ interface { alias for supported_target field in tasminfo } system_any = system_none; - system_wince : set of tsystem = [system_arm_wince,system_i386_wince]; system_linux : set of tsystem = [system_i386_linux,system_x86_64_linux,system_powerpc_linux, - system_arm_linux,system_sparc_linux,system_alpha_linux,system_m68k_linux, - system_x86_6432_linux]; + system_arm_linux,system_sparc_linux,system_alpha_linux,system_m68k_linux]; cpu2str : array[TSystemCpu] of string = ('','i386','m68k','alpha','powerpc','sparc','vm','ia64','x86_64', diff --git a/compiler/systems/t_linux.pas b/compiler/systems/t_linux.pas index ad920e2976..dc1322dfd4 100644 --- a/compiler/systems/t_linux.pas +++ b/compiler/systems/t_linux.pas @@ -518,6 +518,8 @@ begin { Strip the library ? } if success and (cs_link_strip in aktglobalswitches) then begin + { only remove non global symbols and debugging info for a library } + Info.DllCmd[2]:='strip --discard-all --strip-debug $EXE'; SplitBinCmd(Info.DllCmd[2],binstr,cmdstr); Replace(cmdstr,'$EXE',maybequoted(current_module.sharedlibfilename^)); success:=DoExec(FindUtil(utilsprefix+binstr),cmdstr,true,false); diff --git a/tests/webtbs/tw3964.pp b/tests/webtbs/tw3964.pp new file mode 100644 index 0000000000..f7842e2604 --- /dev/null +++ b/tests/webtbs/tw3964.pp @@ -0,0 +1,18 @@ +{ %target=linux } +{$mode objfpc} + +{$linklib libuw3964} + +function testfunc : longint;public name 'testfunc'; +begin + result:=1234; +end; + +function f : longint;external name 'f'; + +exports + testfunc name 'testfunc'; + +begin + writeln(f); +end. diff --git a/tests/webtbs/uw3964.pp b/tests/webtbs/uw3964.pp new file mode 100644 index 0000000000..e0bf7ee851 --- /dev/null +++ b/tests/webtbs/uw3964.pp @@ -0,0 +1,16 @@ +{ %target=linux } +{$mode objfpc} +library uw3964; + + function testfunc : longint;external name 'testfunc'; + + function f : longint;public; + begin + result:=testfunc; + end; + + exports + f; + +begin +end.