Looks good to me.

2012/8/6 Xiaojing Zhang <xiaojing70...@gmail.com>:
> Hi,
> Could a gatekeeper review this new patch again?  thank you very much.
> In the new patch,  A prototype is declared in dwarf_DST_producer.h, which
> should be considered when invoking with "extern C" in other place.
>
> Index: osprey/be/com/clone_DST_utils.cxx
> ===================================================================
> --- osprey/be/com/clone_DST_utils.cxx   (revision 4000)
> +++ osprey/be/com/clone_DST_utils.cxx   (working copy)
> @@ -755,7 +755,6 @@
>          file = DST_FILE_IDX_TO_PTR(callee_idx);
>          file_size = DST_FILE_NAME_size(file);
>          fmod_time = DST_FILE_NAME_modt(file);
> -        extern char *DST_get_dirname(mUINT16 ordinal);
>
>          dirname = DST_get_dirname(DST_FILE_NAME_dir(file));
>          filename =  DST_STR_IDX_TO_PTR(DST_FILE_NAME_name(file));
> Index: osprey/common/com/dwarf_DST_producer.cxx
> ===================================================================
> --- osprey/common/com/dwarf_DST_producer.cxx    (revision 4000)
> +++ osprey/common/com/dwarf_DST_producer.cxx    (working copy)
> @@ -587,7 +587,7 @@
>  }
>
>  /* get the include directory name of a given ordinal */
> -static char *
> +char *
>  DST_get_dirname(mUINT16 ordinal)
>  {
>      DST_DIR_IDX d_idx = DST_get_include_dirs();
> Index: osprey/common/com/dwarf_DST_producer.h
> ===================================================================
> --- osprey/common/com/dwarf_DST_producer.h      (revision 4000)
> +++ osprey/common/com/dwarf_DST_producer.h      (working copy)
> @@ -702,6 +702,9 @@
>  extern char *
>  DST_get_file(mUINT16 , UINT64 *, UINT64 *, char **);
>
> +extern char *
> +DST_get_dirname(mUINT16);
> +
>  extern void
>  DST_subprogram_concrete_to_abstract(DST_INFO_IDX);
>
> Best regards,
>
> xiao-jing
>
>
> 2012/8/2 Xiaojing Zhang <xiaojing70...@gmail.com>
>>
>> Hi,
>>
>>  This is a regression caused by rev 3993.  Could a gatekeeper review this
>> patch? Thank you very much.
>>
>>
>> For a small case below, it will got link failure:
>>
>> > cat 1.c
>>
>> extern void foo(int a);
>>
>> int main()
>>
>> {
>>
>>   foo(5);
>>
>> }
>>
>>
>> >cat 2.c
>>
>> void foo(int a)
>>
>> {
>>
>>   printf("a = %d\n", a);
>>
>> }
>>
>>
>> >opencc -ipa 1.c 2.c
>>
>> /home/zxj/open64/bits/lib/gcc-lib/x86_64-open64-linux/5.0/ipa_link: symbol
>> lookup error:
>> /home/zxj/open64/bits/lib/gcc-lib/x86_64-open64-linux/5.0/ipa.so: undefined
>> symbol: _Z15DST_get_dirnamet
>>
>> openCC INTERNAL ERROR:
>> /home/zxj/open64/bits/lib/gcc-lib/x86_64-open64-linux/5.0/ipa_link returned
>> non-zero status 127
>>
>>
>> In osprey/common/com/dwarf_DST_producer.cxx: the function DST_get_dirname
>> is declared as “static char*”, However, I find in
>> osprey/be/com/clone_DST_utils.cxx, there is an “extern char*
>> DST_get_dirname”, a static function can’t be “extern”, and removing the
>> "static" is able to solve this problem.
>>
>>
>> Index: osprey/common/com/dwarf_DST_producer.cxx
>>
>> ===================================================================
>>
>> --- osprey/common/com/dwarf_DST_producer.cxx    (revision 4000)
>>
>> +++ osprey/common/com/dwarf_DST_producer.cxx    (working copy)
>>
>> @@ -587,7 +587,7 @@
>>
>>  }
>>
>>
>>  /* get the include directory name of a given ordinal */
>>
>> -static char *
>>
>> +char *
>>
>>  DST_get_dirname(mUINT16 ordinal)
>>
>>  {
>>
>>      DST_DIR_IDX d_idx = DST_get_include_dirs();
>>
>>
>> Best regards,
>>
>> xiao-jing
>>
>>
>
>
> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and
> threat landscape has changed and how IT managers can respond. Discussions
> will include endpoint security, mobile security and the latest in malware
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> _______________________________________________
> Open64-devel mailing list
> Open64-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/open64-devel
>



-- 
Regards,
Lai Jian-Xin

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Open64-devel mailing list
Open64-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/open64-devel

Reply via email to