components/samba/samba/patches/sun-cc-build.patch
changeset 4433 d35242d8330c
parent 4371 29fdb14099eb
equal deleted inserted replaced
4432:3413062823ea 4433:d35242d8330c
       
     1 gcc allows to build 'empty' shared libraries (with no sources):
       
     2 
       
     3 $ gcc -shared -o a.so -lz
       
     4 
       
     5 Sun CC does not have this ability. Samba guys tried to workaround it by
       
     6 http://git.samba.org/?p=anatoliy/anatoliy.git;a=commitdiff_plain;h=65743f932b511db009655847e77288c95c0aa525
       
     7 
       
     8 The workaround adds - to the end of the command line. That does not seem to
       
     9 work too. So Instead of that I am creating small C source file which will be
       
    10 used as a base of the 'empty' libraries.
       
    11 
       
    12 see: https://bugzilla.samba.org/show_bug.cgi?id=10630
       
    13 
       
    14 --- samba-4.1.7/empty.c	2014-05-23 05:54:51.696077316 -0700
       
    15 +++ samba-4.1.7/empty.c	2014-05-23 04:35:47.190194034 -0700
       
    16 @@ -0,0 +1 @@
       
    17 +static int some_unused_variable_for_waf_build_with_sun_cc = 0;
       
    18 --- samba-4.1.7/source4/librpc/wscript_build	2014-06-03 15:22:35.884858404 -0700
       
    19 +++ samba-4.1.7/source4/librpc/wscript_build	2014-06-03 15:01:45.303523288 -0700
       
    20 @@ -101,7 +101,7 @@ bld.SAMBA_SUBSYSTEM('RPC_NDR_WINBIND',
       
    21  
       
    22  
       
    23  bld.SAMBA_LIBRARY('dcerpc-samr',
       
    24 -	source='',
       
    25 +	source='../../empty.c',
       
    26  	pc_files='dcerpc_samr.pc',
       
    27  	vnum='0.0.1',
       
    28  	public_deps='dcerpc ndr-standard RPC_NDR_SAMR',
       
    29 @@ -111,7 +111,7 @@ bld.SAMBA_LIBRARY('dcerpc-samr',
       
    30  
       
    31  
       
    32  bld.SAMBA_LIBRARY('dcerpc-atsvc',
       
    33 -	source='',
       
    34 +	source='../../empty.c',
       
    35  	pc_files='dcerpc_atsvc.pc',
       
    36  	vnum='0.0.1',
       
    37  	public_deps='dcerpc ndr-standard RPC_NDR_ATSVC',