Hi Vladimir,

Vladimir Marek wrote:
> Hi,
> 
>> Please review my changes for 6828622, libnet Makefile invokes gcc
>> directly, it should use $(CC) instead:
>>
>> http://cr.opensolaris.org/~gvasick/6828622/
> 
> - The commit comments looks funny. It says
> 
> --- 1.2 ---
> 6828622 libnet Makefile invokes gcc directly, it should use $(CC) instead.
> 
> The string "--- 1.2 ---" should not be probably there.

The 1.2 is just the revision number, it is not part of the commit comment:

libnet: sccs prs Makefile.sfw
SCCS/s.Makefile.sfw:

D 1.2 10/01/13 16:39:25 gvasick 3 1     00007/00007/00087
MRs:
COMMENTS:
6828622 libnet Makefile invokes gcc directly, it should use $(CC) instead.

D 1.1 08/09/12 08:58:32 dm155201 1 0    00094/00000/00000
MRs:
COMMENTS:
6687609 integrate libnet into solaris

> 
> 
> 
>> There are two makefile fixes:
>>
>> - Makefile.sfw corrected to remove warnings from the build logs
> 
> - So up till now the patches has not been used at all during build, and
> now they are? Can't it break libnet?

No, they have been run but using the wrong patch command.  It worked but 
generated warnings in the build log file.  If it is OK to leave the 
warnings in the build log, I'll revert this change.

> 
> - gpatch is defined in Makefile.master as $(GPATCH)

I updated Makefile.sfw to use $(GPATCH) instead.

> 
> 
> 
>> - gcc replaced by $(CC) in makefile.in.patch
> 
> - If I look at Makefile.sfw:
> 
> ============================= Makefile.sfw =============================
>   56   56  $(VER)/config.status: $(VER)/configure
>   57   57          (cd $(VER); env - \
>   58   58              "CC=$(CC)" "CFLAGS=$(CFLAGS)" \      <---------
>   59   59              "LDFLAGS=$(LDFLAGS)" \
>   60   60              PATH=$(SFW_PATH) \
>   61   61              "MAKE=$(CCSMAKE)" \
>   62   62              $(SHELL) ./configure $(CONFIGURE_OPTIONS))
>   63   63  
>   64   64  $(VER64)/config.status: $(VER64)/configure
>   65   65          (cd $(VER64); env - \                    <---------
>   66   66              "CC=$(CC64)" "CFLAGS=$(CFLAGS64)" \
>   67   67              "LDFLAGS=$(LDFLAGS)" \
>   68   68              PATH=$(SFW_PATH) \
>   69   69              "MAKE=$(CCSMAKE)" \
>   70   70              $(SHELL) ./configure $(CONFIGURE_OPTIONS))
> ========================================================================
> 
> CC is set to $(CC) resp. $(CC64). According to Makefile.master it
> translates to Sun cc. Are you sure that using $(CC) in makefile.in.patch
> resolves to gcc?
> 
> Because the line says
> 
>   28      -+       gcc $(CFLAGS) -shared -o libnet.so $(libnet_a_OBJECTS) 
> $(libnet_a_LIBADD) -Wl,-soname=libnet.so
>        27 ++       $(CC) $(CFLAGS) -shared -o libnet.so $(libnet_a_OBJECTS) 
> $(libnet_a_LIBADD) -Wl,-soname=libnet.so
> 
> and Sun cc AFAIK does not have -shared commandline switch.
> 
> But maybe somewhere in the forest of makefiles $(CC) is reset to
> '/usr/sfw/bin/gcc' ( which is $(GCC) in Makefile.master BTW), it should
> be apparent from build logs (which I don't know where to check them).

CC is set to $(GCC) on line 30 of Makefile.sfw:

27
   28 include ../Makefile.lib
   29
   30 CC =            $(GCC)
   31 CC64 =          $(GCC)

and /usr/sfw/bin/gcc shows up correctly in the build output:

[...]
/usr/sfw/bin/gcc -g -fPIC -Wall -shared -o libnet.so ...
[...]
/usr/sfw/bin/gcc -g -fPIC -m64 -Wall -shared -o libnet.so ...
[...]

I have attached a diff between the original and modified make output if 
you are interested.

Update webrev:

http://cr.opensolaris.org/~gvasick/6828622/


Thanks,
George





-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: mk.out.diff
URL: 
<http://mail.opensolaris.org/pipermail/sfwnv-discuss/attachments/20100114/56fc3814/attachment.ksh>

Reply via email to